GTIMetaData#

class gammapy.data.GTIMetaData[source]#

Bases: MetaData

Metadata containing information about the GTI.

Parameters:
reference_timeTime, str

The GTI reference time.

creationCreatorMetaData

The creation metadata.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Attributes Summary

model_config

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

Methods Summary

from_header(header[, format])

Import MetaData from a FITS header.

to_header([format])

Export MetaData to a FITS header.

Attributes Documentation

model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'use_enum_values': True, 'validate_assignment': True, 'validate_default': True}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

Methods Documentation

classmethod from_header(header, format='gadf')[source]#

Import MetaData from a FITS header.

Conversion is performed following the definition in the METADATA_FITS_EXPORT_KEYS.

Parameters:
headerdict

The header dictionary.

format{‘gadf’}

Header format. Default is ‘gadf’.

to_header(format='gadf')[source]#

Export MetaData to a FITS header.

Conversion is performed following the definition in the METADATA_FITS_EXPORT_KEYS.

Parameters:
format{‘gadf’}

Header format. Default is ‘gadf’.

Returns:
headerdict

The header dictionary.

__init__(**data)#

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Parameters:

data (Any)

Return type:

None

classmethod __new__(*args, **kwargs)#