HscTranslator#

class astro_metadata_translator.HscTranslator(header, filename=None)#

Bases: SuprimeCamTranslator

Metadata translator for HSC standard headers.

Parameters:

Attributes Summary

all_properties

All the valid properties for this translator including extensions.

default_resource_root

Default resource path root to use to locate header correction files.

name

Name of this translation class

supported_instrument

Supports the HSC instrument.

Methods Summary

can_translate(header[, filename])

Indicate whether this translation class can translate the supplied header.

to_boresight_rotation_angle()

Return value of boresight_rotation_angle from headers.

to_boresight_rotation_coord()

Coordinate frame of the instrument rotation angle (options: sky, unknown).

to_detector_exposure_id()

Return value of detector_exposure_id from headers.

to_detector_group()

Collection name of which this detector is a part.

to_detector_name()

Return value of detector_name from headers.

to_detector_num()

Calculate the detector number.

to_detector_serial()

Serial number/string associated with this detector.

to_detector_unique_name()

Return a unique name for the detector.

to_exposure_id()

Calculate unique exposure integer for this observation.

to_focus_z()

Return a default defocal distance of 0.0 mm if there is no keyword for defocal distance in the header.

to_instrument()

The instrument used to observe the exposure.

Attributes Documentation

all_properties: dict[str, PropertyDefinition] = {'altaz_begin': <astro_metadata_translator.properties.PropertyDefinition object>, 'altaz_end': <astro_metadata_translator.properties.PropertyDefinition object>, 'boresight_airmass': <astro_metadata_translator.properties.PropertyDefinition object>, 'boresight_rotation_angle': <astro_metadata_translator.properties.PropertyDefinition object>, 'boresight_rotation_coord': <astro_metadata_translator.properties.PropertyDefinition object>, 'can_see_sky': <astro_metadata_translator.properties.PropertyDefinition object>, 'dark_time': <astro_metadata_translator.properties.PropertyDefinition object>, 'datetime_begin': <astro_metadata_translator.properties.PropertyDefinition object>, 'datetime_end': <astro_metadata_translator.properties.PropertyDefinition object>, 'detector_exposure_id': <astro_metadata_translator.properties.PropertyDefinition object>, 'detector_group': <astro_metadata_translator.properties.PropertyDefinition object>, 'detector_name': <astro_metadata_translator.properties.PropertyDefinition object>, 'detector_num': <astro_metadata_translator.properties.PropertyDefinition object>, 'detector_serial': <astro_metadata_translator.properties.PropertyDefinition object>, 'detector_unique_name': <astro_metadata_translator.properties.PropertyDefinition object>, 'exposure_group': <astro_metadata_translator.properties.PropertyDefinition object>, 'exposure_id': <astro_metadata_translator.properties.PropertyDefinition object>, 'exposure_time': <astro_metadata_translator.properties.PropertyDefinition object>, 'exposure_time_requested': <astro_metadata_translator.properties.PropertyDefinition object>, 'focus_z': <astro_metadata_translator.properties.PropertyDefinition object>, 'group_counter_end': <astro_metadata_translator.properties.PropertyDefinition object>, 'group_counter_start': <astro_metadata_translator.properties.PropertyDefinition object>, 'has_simulated_content': <astro_metadata_translator.properties.PropertyDefinition object>, 'instrument': <astro_metadata_translator.properties.PropertyDefinition object>, 'location': <astro_metadata_translator.properties.PropertyDefinition object>, 'object': <astro_metadata_translator.properties.PropertyDefinition object>, 'observation_counter': <astro_metadata_translator.properties.PropertyDefinition object>, 'observation_id': <astro_metadata_translator.properties.PropertyDefinition object>, 'observation_reason': <astro_metadata_translator.properties.PropertyDefinition object>, 'observation_type': <astro_metadata_translator.properties.PropertyDefinition object>, 'observing_day': <astro_metadata_translator.properties.PropertyDefinition object>, 'observing_day_offset': <astro_metadata_translator.properties.PropertyDefinition object>, 'physical_filter': <astro_metadata_translator.properties.PropertyDefinition object>, 'pressure': <astro_metadata_translator.properties.PropertyDefinition object>, 'relative_humidity': <astro_metadata_translator.properties.PropertyDefinition object>, 'science_program': <astro_metadata_translator.properties.PropertyDefinition object>, 'telescope': <astro_metadata_translator.properties.PropertyDefinition object>, 'temperature': <astro_metadata_translator.properties.PropertyDefinition object>, 'tracking_radec': <astro_metadata_translator.properties.PropertyDefinition object>, 'visit_id': <astro_metadata_translator.properties.PropertyDefinition object>}#

All the valid properties for this translator including extensions.

default_resource_root: str | None = 'corrections/HSC'#

Default resource path root to use to locate header correction files.

name: str | None = 'HSC'#

Name of this translation class

supported_instrument: str | None = 'HSC'#

Supports the HSC instrument.

Methods Documentation

classmethod can_translate(header, filename=None)#

Indicate whether this translation class can translate the supplied header.

There is no INSTRUME header in early HSC files, so this method looks for HSC mentions in other headers. In more recent files the instrument is called “Hyper Suprime-Cam”.

Parameters:
  • header (dict-like) – Header to convert to standardized form.

  • filename (str, optional) – Name of file being translated.

Returns:

canTrue if the header is recognized by this class. False otherwise.

Return type:

bool

to_boresight_rotation_angle()#

Return value of boresight_rotation_angle from headers.

Angle of the instrument in boresight_rotation_coord frame.

Returns:

The translated property.

Return type:

astropy.coordinates.angles.core.Angle

to_boresight_rotation_coord()#

Coordinate frame of the instrument rotation angle (options: sky, unknown).

Returns:

Translated property that is fixed to a single value by the translator.

Return type:

str

Parameters:

self (MetadataTranslator)

to_detector_exposure_id()#

Return value of detector_exposure_id from headers.

Unique integer identifier for this detector in this exposure.

Returns:

The translated property.

Return type:

int

to_detector_group()#

Collection name of which this detector is a part. Can be None if there are no detector groupings.

Returns:

Translated property that is fixed to a single value by the translator.

Return type:

str

to_detector_name()#

Return value of detector_name from headers.

Name of the detector within the instrument (might not be unique if there are detector groups).

Returns:

The translated property.

Return type:

str

to_detector_num()#

Calculate the detector number.

Focus CCDs were numbered incorrectly in the readout software during commissioning run 2. This method maps to the correct ones.

Returns:

num – Detector number.

Return type:

int

to_detector_serial()#

Serial number/string associated with this detector.

Returns:

Translated value derived directly from a single header.

Return type:

str

Parameters:

self (MetadataTranslator)

to_detector_unique_name()#

Return a unique name for the detector.

Base class implementation attempts to combine detector_name with detector_group. Group is only used if not None.

Can be over-ridden by specialist translator class.

Returns:

namedetector_group``_``detector_name if detector_group is defined, else the detector_name is assumed to be unique. If neither return a valid value an exception is raised.

Return type:

str

Raises:

NotImplementedError – Raised if neither detector_name nor detector_group is defined.

to_exposure_id()#

Calculate unique exposure integer for this observation.

Returns:

visit – Integer uniquely identifying this exposure.

Return type:

int

to_focus_z()#

Return a default defocal distance of 0.0 mm if there is no keyword for defocal distance in the header. The default keyword for defocal distance is FOCUSZ.

Returns:

focus_z – The defocal distance from header or the 0.0mm default.

Return type:

astropy.units.Quantity

to_instrument()#

The instrument used to observe the exposure.

Returns:

Translated property that is fixed to a single value by the translator.

Return type:

str

Parameters:

self (MetadataTranslator)