Repository navigation
DM-56697: Add ObservationInfo keywords to raw header retrieval - #564
Conversation
isullivan
left a comment
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Can you tell me which LATISS observation generated the NaN values so I can add a test?
There was a problem hiding this comment.
An example header with problematic values: https://github.com/lsst/obs_lsst/blob/56defa3d2a0fd9c1c61c8647b9534e3533e08115/tests/headers/latiss-AT_O_20190915_000037.yaml
This allows us to recover the information later regardless of any stripping that VisitInfo I/O might do.
58145b9 to
ddc8ebc
Compare
Depends on lsst/astro_metadata_translator#102
Checklist
doc/changes