Skip to content

DM-56697: Add ObservationInfo keywords to raw header retrieval - #564

Merged
timj merged 2 commits into
mainfrom
tickets/DM-56697
Oct 16, 2026
Merged

timj merged 2 commits into
mainfrom
tickets/DM-56697

Conversation

@timj

@timj timj commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

Depends on lsst/astro_metadata_translator#102

Checklist

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

@isullivan isullivan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Make sure to squash the fixup commit. My only substantial concern is that the new to_flat_dict appears to assume that there are no NaN values in the metadata, and that is unfortunately not always true. Either add a sanitization step here, or make to_flat_dict handle bad values.

headers embedded. This is a copy so the original metadata is
not affected.
"""
obs_info_md = self.observationInfo.to_flat_dict(prefix=FITS_FLAT_DICT_PREFIX, sep=FITS_FLAT_DICT_SEP)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

See my comment on astro_metadata_translator about test data with unexpected NaNs making it through, and failing. I think the other place to fix that would be to check here for NaN values in self.observationInfo

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Can you tell me which LATISS observation generated the NaN values so I can add a test?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Comment thread python/lsst/obs/base/_fitsRawFormatterBase.py
timj added 2 commits October 16, 2026 14:48
This allows us to recover the information later regardless
of any stripping that VisitInfo I/O might do.
@timj
timj force-pushed the tickets/DM-56697 branch from 58145b9 to ddc8ebc Compare October 16, 2026 21:50
@timj
timj merged commit 4ac7b27 into main Oct 16, 2026
9 checks passed
@timj
timj deleted the tickets/DM-56697 branch October 16, 2026 21:51
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.

2 participants