specsr.paths¶
Filesystem locations used by specsr.
Nothing here is hard-coded to one machine. Every location can be overridden by an environment variable, which is what makes the package usable outside the original development checkout:
SPECSR_JADES_ROOTRoot of the raw JWST/JADES release tree (the directory containing
DR3/,DR4/,DR5/). Raw data is large and is deliberately kept outside the repository; only derived products are built here.SPECSR_DATA_DIRWhere derived products (paired/augmented
.npzdatasets) are written. Defaults to./datarelative to the current working directory.SPECSR_CACHE_DIRScratch space for downloaded checkpoints and intermediate caches. Defaults to the platform cache directory.
SPECSR_OUTPUT_DIRWhere anything a user might want to keep is written – figures, predictions, evaluation tables. Defaults to
./outputsrelative to the current working directory.
The distinction between the last two is deliberate. A cache may be deleted at any time without losing anything; an output is a result. Scattering results across the working directory is how they get mixed up with the code and then committed by accident, which is a large part of why this repository’s git history is twenty times the size of its contents.
Functions
Scratch/cache directory. |
|
|
Where derived datasets are written. |
Root of the raw JADES release tree, or |
|
|
Where the package writes results, created on demand. |
|
Directory for a specific data release, e.g. |
Like |
- specsr.paths.jades_root()[source]¶
Root of the raw JADES release tree, or
Noneif unset.- Return type:
Path | None
- specsr.paths.data_dir()[source]¶
Where derived datasets are written. Created on demand.
- Return type:
- specsr.paths.output_dir(subdir=None)[source]¶
Where the package writes results, created on demand.
Everything a user might want to keep goes here: figures, prediction caches, evaluation tables. Resolved from
SPECSR_OUTPUT_DIR, defaulting to./outputs.subdirnames a category, e.g.output_dir("figures"). Categories are created lazily, so an installation that never makes a figure never grows afigures/directory.Point
SPECSR_OUTPUT_DIRsomewhere outside the checkout to keep results entirely separate from the source tree.
- specsr.paths.release_dir(release='DR4')[source]¶
Directory for a specific data release, e.g.
release_dir('DR4').
- specsr.paths.require_jades_root()[source]¶
Like
jades_root()but raises with an actionable message.- Return type: