desihub / desispec

DESI spectral pipeline
BSD 3-Clause "New" or "Revised" License
35 stars 24 forks source link

add desi_link_calibnight script #2165

Closed sbailey closed 6 months ago

sbailey commented 7 months ago

New desi_link_calibnight script to simplify linking calibnight files from one night to another:

usage: desi_link_calibnight [-h] --refnight REFNIGHT --newnight NEWNIGHT [-c CAMERAS]
                            [--include INCLUDE] [--exclude EXCLUDE] [--dryrun]

options:
  -h, --help            show this help message and exit
  --refnight REFNIGHT   Reference night with calibs
  --newnight NEWNIGHT   New night without calibs, to link to refnight
  -c CAMERAS, --cameras CAMERAS
                        Camword of cameras to link, e.g. a0123b6r7z8
  --include INCLUDE     prefixes of types of calibnight files to create links
  --exclude EXCLUDE     prefixes of types of calibnight files to exclude from links
  --dryrun              dry run; don't actually create links

By default this links badcolumns,biasnight,fiberflatnight,psfnight files, with a placeholder for ctecorr (to be updated after PR #2163), but the --include and --exclude options can adjust that.

It won't overwrite pre-existing files, unless those file happen to already be links to the same destination anyway.

Includes a full suite of unit tests. @akremin please review. Does this match what you need for pipeline calibnight linking?

sbailey commented 7 months ago

Tests failed while installing astropy 5.0 (mis-match of checksums). Will retry in morning in case it is transient download and/or packaging glitch.

sbailey commented 6 months ago

@akremin thanks for the review comments. I think I have addressed all of them; please re-review.