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

add desi_link_calibnight script #2165

Merged
merged 2 commits into from Jan 30, 2024
Merged

add desi_link_calibnight script #2165

merged 2 commits into from Jan 30, 2024

Conversation

sbailey
Copy link
Contributor

@sbailey sbailey commented Jan 25, 2024

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 sbailey requested a review from akremin January 25, 2024 04:53
@sbailey
Copy link
Contributor Author

sbailey commented Jan 25, 2024

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.

Copy link
Member

@akremin akremin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the useful script that does exactly what we need, and kudos for the unit tests. This is very well covered. I have made some comments throughout. Some of these I have already discussed with you, while others are new. None of these are critical blocking factors, but there are choices that I'd like more insights on, and a few comments that you can choose to consider or ignore.

bin/desi_link_calibnight Show resolved Hide resolved
py/desispec/scripts/link_calibnight.py Outdated Show resolved Hide resolved
py/desispec/scripts/link_calibnight.py Show resolved Hide resolved
py/desispec/scripts/link_calibnight.py Outdated Show resolved Hide resolved
py/desispec/scripts/link_calibnight.py Outdated Show resolved Hide resolved
py/desispec/test/test_link_calibnight.py Show resolved Hide resolved
@sbailey
Copy link
Contributor Author

sbailey commented Jan 30, 2024

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

Copy link
Member

@akremin akremin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the responses and for the revisions. I originally had a question but have since understood the answer based on the code comments. I'm happy to approve this and merge it whenever you are ready.

@akremin akremin merged commit de1bcac into main Jan 30, 2024
24 checks passed
@akremin akremin deleted the link_calibnight branch January 30, 2024 23:43
@sbailey sbailey self-assigned this Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants