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

DM-35396: Add dataset provenance to FITS headers #498

Open
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

timj
Copy link
Member

@timj timj commented Jan 23, 2025

Requires lsst/daf_butler#1147.

Checklist

  • ran Jenkins
  • added a release note for user-visible changes to doc/changes

@timj timj force-pushed the tickets/DM-35396 branch from 5af8e22 to 108fdc6 Compare January 24, 2025 20:02
@timj timj force-pushed the tickets/DM-35396 branch 3 times, most recently from 14b421b to e9527a7 Compare January 30, 2025 20:07
Copy link
Contributor

@andy-slac andy-slac left a 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:
Copy link
Contributor

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
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
hdr: PropertyList | MutableMapping, ref: DatasetRef, provenance: DatasetProvenance | None = None
hdr: PropertyList | MutableMapping | None, ref: DatasetRef, provenance: DatasetProvenance | None = None

?

@timj timj force-pushed the tickets/DM-35396 branch from a9aff7d to 0d16388 Compare January 31, 2025 21:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants