Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

resolve symlinks when storing $DESI_SPECTRO_DARK paths #2381

Open
sbailey opened this issue Oct 7, 2024 · 0 comments
Open

resolve symlinks when storing $DESI_SPECTRO_DARK paths #2381

sbailey opened this issue Oct 7, 2024 · 0 comments
Labels

Comments

@sbailey
Copy link
Contributor

sbailey commented Oct 7, 2024

the spectro pipeline records the filepaths of the dark files used to process an exposure in DEPNAMnn/DEPVERnn keywords, e.g.

[login20 daily] fitsheader preproc/20241005/00256520/preproc-b7-00256520.fits.gz | grep DEP | grep -i dark
DEPNAM03= 'CCD_CALIB_DARK'                                                      
DEPVER03= '/global/cfs/cdirs/desi/spectro/desi_spectro_dark/latest/dark_frames&'CONTINUE  '/dark-sm8-b7-20240831.fits.gz'                                       

However, desi_spectro_dark/latest is a symlink which currently points to v2405 but will change in the future, making this provenance ambiguous.

To do: if a filename starts with the value of $DESI_SPECTRO_CALIB, and that value is a symlink, replace it with the full true path.

This would probably be worth a helper function to work out all the symlink checking and file resolution logic so that we can re-use it with other cases that might have symlinks (I don't know what those are yet, but let's not bury this in some preproc code).

@sbailey sbailey added the cleanup label Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant