Details
-
Type:
Bug
-
Status: Done
-
Resolution: Done
-
Fix Version/s: None
-
Component/s: afw
-
Labels:None
-
Story Points:1
-
Epic Link:
-
Team:Data Release Production
Description
When writing an ExposureCatalog to FITS, the metadata property list is not persisted. When writing a test case for this I ran into the problem that the case of the property list values is not always round-trippable ( https://community.lsst.org/t/fits-and-lowercase-header-keys/1184/3 ) but by looking at the header of the persisted file I see that this is unrelated to the current issue. That is, the metadata is not persisted to the FITS file for an ExposureCatalog with any case.
import lsst.afw.table as afwTable |
import lsst.daf.base as dafBase |
import lsst.geom |
|
name = 'TEST' |
|
schema = afwTable.ExposureTable.makeMinimalSchema() |
cat = afwTable.ExposureCatalog(schema) |
cat.reserve(1) |
rec = cat.addNew() |
|
plist = dafBase.PropertyList() |
plist.addDouble(name, 1.0) |
|
cat.setMetadata(plist)
|
|
print(cat.getMetadata()[name]) |
|
cat.writeFits('%s_expcatalog_metadata.fits' % (name)) |
|
cat2 = afwTable.ExposureCatalog.readFits('%s_expcatalog_metadata.fits' % (name)) |
|
print(cat2.getMetadata()[name]) |
|
This results in a KeyError: 'TEST not found'.
Attachments
Issue Links
- blocks
-
DM-20163 Investigate using WCS Jacobian BoundedField in fgcmcal fit
- Done
We know that metadata is written for BaseCatalog so what's special about ExposureCatalog? Do we have no tests of ExposureCatalog that use setMetadata?