-
Notifications
You must be signed in to change notification settings - Fork 10
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
DM-35396: Add dataset provenance to FITS headers #498
base: main
Are you sure you want to change the base?
Conversation
5af8e22
to
108fdc6
Compare
14b421b
to
e9527a7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, a couple of questions.
|
||
# Purge old headers from metadata (important for data ID and input headers | ||
# and to prevent headers accumulating in a PropertyList). | ||
for k in hdr: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, does this need list(hdr)
if you delete items during iteration?
from lsst.resources import ResourcePath | ||
from lsst.utils.classes import cached_getter | ||
from lsst.utils.introspection import find_outside_stacklevel | ||
|
||
|
||
def add_provenance_to_fits_header( | ||
hdr: PropertyList | MutableMapping, ref: DatasetRef, provenance: DatasetProvenance | None = None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hdr: PropertyList | MutableMapping, ref: DatasetRef, provenance: DatasetProvenance | None = None | |
hdr: PropertyList | MutableMapping | None, ref: DatasetRef, provenance: DatasetProvenance | None = None |
?
This adds "LSST BUTLER" headers to reflect the DatasetRef associated with this file.
This turned up in fgcmcal testing.
a9aff7d
to
0d16388
Compare
Requires lsst/daf_butler#1147.
Checklist
doc/changes