Changes#
ctao_datamodel 1.1.0rc2.dev9+ga32fe53fc (2026-07-17)#
API Changes#
Bug Fixes#
New Features#
Maintenance#
Data Model Changes#
Refactoring and Optimization#
Adds
ValidationErrorexception that contains a collection ofValidationIssue, generalizing what we had in_table.py(e.g.TableValidationError). This will be used in future model validation code, and allows for more user-friendly error messages. [!60]
ctao_datamodel 1.1.0#
API Changes#
Models now fully support units, using the
ctao_datamodel.Quantitytype annotation, for exampleenergy: Quantity[u.TeV]Quantity values can be specified as bare floats as before, with the documented unit attached automatically (for backward compatibility, and for reading FITS headers where the units are lost. )
Fields with Quantity values are now de-serialized as _astropy_
u.Quantityobjects (not as bare floats as before: this is the only non-backward-compatible change)Three methods of serializing
Quantityfields are provided, and can be chosen when callingctao_datamodel.flatten_model_instanceusing thequantity_formatoption (see alsoctao_datamodel.QuantityFormat):
Bug Fixes#
Fixed bug where unit was not included in docstring of HIERARCH FITS keywords. [!34]
Fixed serialization of
TimeSystem, which must be upper-case for FITS. [!44]FITS headers using the HIERARCH standard now appear at the end of the generated header. [!49]
Fixed small bugs in latex rendering of examples [!50]
Fixed bug where examples provided in field metadata were not propegated to the table or latex output. [!51]
Fixed bug where units were not properly discovered for optional Quantity fields. [!52]
New Features#
Minor style update for PlantUML diagrams: include units for Quantities, and improve readability. [!39]
Added ability to define and validate astropy (and thus FITS) table schemas. This adds a new metadata item:
fits_column_dtypetoAstroFieldthat allows that field to be used to validate an astropy Table column.It also adds two new conversion functions:
model_to_astropy_table: creates an empty Table object from a modelmodel_validate_astropy_table: validates an existing Table object columnsvalidate_fits_bintable_hdu: validates a FITS BINTABLE HDU’s column schema and metadata at the same time [!43]
Added support for model versioning and automatic migration of old versions to the current one. This introduces a new
VersionedModelbase class, and aMigrationclass hierarchy that defines basic migrations like _rename_, _drop_, _update_metadata_, as well as support for user-defined complex transforms. The versioning needs only to be applied to top-level models that are serialized, child model changes can be handled at the parent level. A new tutorial under _Development_ in the documentation, describes how this is used. [!47]Added an
addmigration, to keep track of additions [!50]
Data Model Changes#
Auto-generated Summary for dataproducts.Product:
- 1.0.0 -> 1.1.0
Updated ‘fits_keyword’ metadata for ‘activity.configuration_id’ from ‘ANAMODE’ to ‘ACTCONF’
- 1.1.0 -> 2.0.0
Transformed ‘observation.coverage.time.t_min’ using transform_met_time_to_iso (MET to ISO)
Transformed ‘observation.coverage.time.t_max’ using transform_met_time_to_iso (MET to ISO)
Dropped ‘observation.coverage.time.reference’
Added ‘simulation’
Details:
Changed FITS serialization of
activity.configuration_nameto serialize toACTCONFinstead ofANAMODE. Note thatANAMODEcomes from the IVOA HEIG note, and was meant for DL3 data, but doesn’t make sense for most of CTAO data products, for example DL0 products where there is no “analysis” happening, but there is an activity configuration. [!37]Added missing short FITS keyword for
data.category:DATACAT[!38]Removed
observation.coverage.time.reference: aTimeReferenceis not longer included, sot_startandt_stopmust be ISO strings in UTC. This simplifies the model and serialization. Time references are still allowed in specific cases like EVENT HDUs, but are out of scope for the DataProducts metadata. The correspondingTimeReferenceand related classes are moved tomodels.commonfor future use. A version migration was added tomodels.dataproducts.Productso that this is a backward-compatible change. [!45]Added Simulation context metadata. This includes the production name and the optional simulation grid node in both zenith/azimuth and hourangle/declination format. If the latter format is set to None, it is filled in automatically by the
Productmodel validator using the observation location.. [!50]Added
instance.messengerfrom the IVOA High-Energy extension note. [!53]
ctao_datamodel 1.0.1#
Bug Fixes#
Fixed bug for
disclaimerwhen serialized to a FITS headerCOMMENTfield, where long values were truncated when reading back to the python class, due to how astropy serialized that header to multiple cards. [!30]Fixed bug in
flatten_model_instancewhere keys that had value 0 were dropped. Now only null values are dropped. [!31]Using an underscore as a flattened key separator now raises an exception, as it is used as a word separator in keys, and thus prevents un-flattening. [!32]
ctao_datamodel 1.0.0#
First release, covering DataProducts data model document version A001