Reference#
- class ctapipe.io.metadata.Reference(*args: t.Any, **kwargs: t.Any)[source]#
Bases:
HasTraitsComplete metadata record using the legacy CTA reference schema.
A reference combines contact, product, process, activity, and instrument metadata. Use
to_dict()to flatten it into file-header attributes.Attributes Summary
A trait whose value must be an instance of a specified class.
A trait whose value must be an instance of a specified class.
A trait whose value must be an instance of a specified class.
A trait whose value must be an instance of a specified class.
A trait whose value must be an instance of a specified class.
Methods Summary
from_dict(metadata)Create a legacy reference record from flattened CTA metadata.
from_fits(header)Create a legacy reference record from a FITS header.
from_json(json_data)Create a legacy reference record from a JSON metadata mapping.
to_dict([fits])Convert the reference metadata to a flat dictionary.
Attributes Documentation
- activity#
A trait whose value must be an instance of a specified class.
The value can also be an instance of a subclass of the specified class.
Subclasses can declare default classes by overriding the klass attribute
- contact#
A trait whose value must be an instance of a specified class.
The value can also be an instance of a subclass of the specified class.
Subclasses can declare default classes by overriding the klass attribute
- instrument#
A trait whose value must be an instance of a specified class.
The value can also be an instance of a subclass of the specified class.
Subclasses can declare default classes by overriding the klass attribute
- process#
A trait whose value must be an instance of a specified class.
The value can also be an instance of a subclass of the specified class.
Subclasses can declare default classes by overriding the klass attribute
- product#
A trait whose value must be an instance of a specified class.
The value can also be an instance of a subclass of the specified class.
Subclasses can declare default classes by overriding the klass attribute
Methods Documentation
- classmethod from_dict(metadata)[source]#
Create a legacy reference record from flattened CTA metadata.
- Parameters:
- metadatacollections.abc.Mapping
Metadata containing flattened
CTA ...keys. Unrelated keys are ignored.
- Returns:
- Reference
Parsed legacy reference metadata.