desihub / tutorials

DESI tutorials
BSD 3-Clause "New" or "Revised" License
43 stars 17 forks source link

Some tutorials hard code paths #102

Open akremin opened 5 months ago

akremin commented 5 months ago

Some tutorials use hard-coded pathnames that only work at NERSC. It would be ideal if we could use the standard environment variables DESI_ROOT, DESI_SPECTRO_REDUX, SPECPROD, etc. to allow users to set up their own environment on their own system without needing to edit lines of code. This is also relevant for the desidocker work, which gets around this with setting up fake directory trees, but it would be ideal if we didn't need to have such workarounds.

E.g. tutorials/getting_started/intro_to_DESI_EDR_files.ipynb hardcodes the following:

specprod = 'fuji'    # Internal name for the EDR
specprod_dir = '/global/cfs/cdirs/desi/public/edr/spectro/redux/fuji/'

But it could check for environment variables first, and only default to the above if the variables aren't set.