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.

Python API reference

astro_metadata_translator Package

Classes

DecamTranslator(header) Metadata translator for DECam standard headers.
FitsTranslator(header) Metadata translator for FITS standard headers.
HscTranslator(header) Metadata translator for HSC standard headers.
MegaPrimeTranslator(header) Metadata translator for CFHT MegaPrime standard headers.
MetadataTranslator(header) Per-instrument metadata translation support
ObservationInfo(header[, translator_class, …]) Standardized representation of an instrument header for a single exposure observation.
StubTranslator(header) Translator where all the translations are stubbed out and issue warnings.
SubaruTranslator(header) Metadata translator for Subaru telescope headers.
SuprimeCamTranslator(header) Metadata translator for HSC standard headers.

Class Inheritance Diagram

Inheritance diagram of astro_metadata_translator.translators.decam.DecamTranslator, astro_metadata_translator.translators.fits.FitsTranslator, astro_metadata_translator.translators.hsc.HscTranslator, astro_metadata_translator.translators.megaprime.MegaPrimeTranslator, astro_metadata_translator.translator.MetadataTranslator, astro_metadata_translator.observationInfo.ObservationInfo, astro_metadata_translator.translator.StubTranslator, astro_metadata_translator.translators.subaru.SubaruTranslator, astro_metadata_translator.translators.suprimecam.SuprimeCamTranslator