yippy.datasets#
Public catalog and loader for yield input packages (YIPs).
The CATALOG dict is the source of truth: keys are flat YIP names like
eac1_aavc_2d; values carry just enough metadata to drive downloads
and filtered discovery (telescope, coronagraph, sampling,
md5). Descriptive metadata (designer, wavelengths, dark-zone
extent, …) lives in the FITS headers inside each YIP, not here.
Archives are hosted as assets on a tagged GitHub release of this repo
(currently data-v1) and fetched via pooch over HTTPS. The release
tag is separate from the code-release lifecycle managed by
release-please. To publish new YIPs: bump DATA_RELEASE_TAG to a new
data-vN, attach the updated zips to that release, and refresh the
md5 hashes here.
The catalog currently includes only the two reference YIPs used by the yippy paper validation pipeline. Long-term YIP hosting will be provided by ExEP, and when that catalog comes online the discovery API here will grow back into a thin proxy over it.
Public API: - ``fetch_yip(name=None, *, telescope=None, coronagraph=None, sampling=None,
cache_path=None) -> str``
cache_dir() -> Pathlist_yips(**filters) -> list[str]yip_exists(name) -> boolyip_info(name) -> dict
Attributes#
Functions#
|
Build a pooch instance for the YIP catalog at |
Return the directory where yippy caches YIP archives by default. |
|
|
Download a YIP archive (if not cached), unpack, and return its path. |
|
Return catalog names matching all filters. No filters returns all names. |
|
True iff |
|
Return the catalog metadata dict for |
Module Contents#
- yippy.datasets.logger#
- yippy.datasets.CACHE_DIR_ENV_VAR = 'YIPPY_CACHE_DIR'#
- yippy.datasets._DATA_BASE_URL: str = 'https://github.com/CoreySpohn/yippy/releases/download/data-v2/'#
- yippy.datasets._make_pikachu(cache_dir_path)[source]#
Build a pooch instance for the YIP catalog at
cache_dir_path.- Parameters:
cache_dir_path (str | pathlib.Path)
- Return type:
pooch.Pooch
- yippy.datasets._PIKACHU#
- yippy.datasets.cache_dir()[source]#
Return the directory where yippy caches YIP archives by default.
- Resolution order:
YIPPY_CACHE_DIRenvironment variable, if set.pooch.os_cache("yippy")– the OS-conventional cache directory provided by platformdirs (e.g.~/Library/Caches/yippyon macOS,~/.cache/yippyon Linux).
Override per call by passing
cache_pathtofetch_yip().- Return type:
- yippy.datasets.fetch_yip(name=None, *, telescope=None, coronagraph=None, sampling=None, cache_path=None)[source]#
Download a YIP archive (if not cached), unpack, and return its path.
Pass either
name(flat:"eac1_aavc_2d") OR keyword filters (structured:telescope="eac1", coronagraph="aavc", sampling="2d"). The keyword form must resolve to exactly one catalog entry; passsamplingwhenever a(telescope, coronagraph)pair has both 1D and 2D variants.YIPs are cached at
cache_dir()(which honors theYIPPY_CACHE_DIRenvironment variable). Passcache_pathto override the cache location for this call only – useful for shared institutional setups or project-scoped caches.- Raises:
TypeError: if both
nameand filters are passed (or neither). KeyError: ifnameis not in the catalog. ValueError: if the structured query has zero or multiple matches.
- yippy.datasets._FILTERABLE_FIELDS#
- yippy.datasets.list_yips(**filters)[source]#
Return catalog names matching all filters. No filters returns all names.
- Raises:
TypeError: if a filter key is not a valid catalog field.