You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Steven Beard from the MIRI IDT tried setting units for table columns in a reference file schema via the TUNITn keywords and found that all reserved FITS keywords (like TUNITn) get ignored and stripped out of a data model when it's serialized to a FITS file (by design). The current method of setting table column units is to set the table.columns[name].unit attribute in an instance of the data model itself, rather than defining it in the schema. It would be nice if column units could be defined in the schema, along with other column attributes like name and datatype, e.g.
- name: wavelength
datatype: float32
unit: um
Steven seems to have devised a way to do this in the MIRI version of the jwst code:
With your guidance, I have solved the problem in a way which works with all the existing
MIRI data models. The schema now defines the default unit for each table column. If a
user provides a table with no units defined, those defaults are adopted. If a user
provides table units explicitly, those units are used but the user receives a warning if
there is a mismatch. I think this solution works for the MIRI calibration data products,
where each data product is described in an accompanying document, and the units
described in the document must match the ones defined in the schema. There is no
requirement to convert units, since each CDP only passes its verification test when
the units match.
The text was updated successfully, but these errors were encountered:
Steven Beard from the MIRI IDT tried setting units for table columns in a reference file schema via the TUNITn keywords and found that all reserved FITS keywords (like TUNITn) get ignored and stripped out of a data model when it's serialized to a FITS file (by design). The current method of setting table column units is to set the
table.columns[name].unit
attribute in an instance of the data model itself, rather than defining it in the schema. It would be nice if column units could be defined in the schema, along with other column attributes likename
anddatatype
, e.g.Steven seems to have devised a way to do this in the MIRI version of the jwst code:
The text was updated successfully, but these errors were encountered: