astro_metadata_translator¶
The astro_metadata_translator
package provides generalized infrastructure
for handling metadata extraction for astronomical instrumentation.
There are header translation classes implemented as subclasses of
MetadataTranslator
. These translation subclasses
implement methods corresponding to each derived property defined in
ObservationInfo
. The methods are named
to_{property}
and can be implemented explicitly by a translation class, or
implicitly by defining trivial mappings from a header item to a property, or
constant mappings that are fixed for all headers independent of any header
values.
Defining a new translator subclass that inherits from
MetadataTranslator
and giving it a name,
automatically registers the translator as being available for automated header
translation.
A translation class does not need to reside in the
astro_metadata_translator
package.
ObservationInfo
is a class summarizing the
information from the translators.
An instance of this class can be instantiated from
any dict
-like header. By default the header translation class to use
is determined by asking each registered translator whether it knows how to
translate it. If an explicit translation class should be used it can be
specified explicitly.
Warning
The existing set of property names in
ObservationInfo
should be considered as beta
quality.
Some of the names could yet be changed for consistency with other data
dictionaries.
Project info¶
Python API reference¶
astro_metadata_translator Package¶
Functions¶
cache_translation (func[, method]) |
Decorator to cache the result of a translation method. |
merge_headers (headers[, mode]) |
Merge multiple headers into a single dict. |
Classes¶
DecamTranslator (header[, filename]) |
Metadata translator for DECam standard headers. |
FitsTranslator (header[, filename]) |
Metadata translator for FITS standard headers. |
HscTranslator (header[, filename]) |
Metadata translator for HSC standard headers. |
MegaPrimeTranslator (header[, filename]) |
Metadata translator for CFHT MegaPrime standard headers. |
MetadataTranslator (header[, filename]) |
Per-instrument metadata translation support |
ObservationInfo (header[, filename, …]) |
Standardized representation of an instrument header for a single exposure observation. |
StubTranslator (header[, filename]) |
Translator where all the translations are stubbed out and issue warnings. |
SubaruTranslator (header[, filename]) |
Metadata translator for Subaru telescope headers. |
SuprimeCamTranslator (header[, filename]) |
Metadata translator for HSC standard headers. |