LsstCamTranslator#

class lsst.obs.lsst.translators.LsstCamTranslator(header: Mapping[str, Any], filename: ResourcePathExpression | None = None)#

Bases: LsstBaseTranslator

Metadata translation for the main LSST Camera.

Attributes Summary

all_properties

All the valid properties for this translator including extensions.

cameraPolicyFile

Path to policy file relative to obs_lsst root.

detectorMapping

Mapping of detector name to detector number and serial.

detectorSerials

Mapping of detector serial number to raft, number, and name.

name

Name of this translation class

supported_instrument

Supports the lsstCam instrument.

Methods Summary

can_translate(header[, filename])

Indicate whether this translation class can translate the supplied header.

fix_header(header, instrument, obsid[, filename])

Fix LSSTCam headers.

observing_date_to_offset(observing_date)

Return the offset to use when calculating the observing day.

to_boresight_rotation_angle()

Angle of the instrument in boresight_rotation_coord frame.

to_can_see_sky()

Return whether the observation can see the sky or not.

to_detector_group()

Collection name of which this detector is a part.

to_detector_name()

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

to_detector_serial()

Serial number/string associated with this detector.

to_exposure_time()

Return value of exposure_time from headers.

to_exposure_time_requested()

Requested duration of the exposure (seconds).

to_instrument()

The instrument used to observe the exposure.

to_object()

Object of interest or field name.

to_observation_id()

Label uniquely identifying this observation (can be related to 'exposure_id').

to_physical_filter()

Calculate the physical filter name.

to_science_program()

Observing program (survey or proposal) identifier.

to_telescope()

Full name of the telescope.

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.

cameraPolicyFile = 'policy/lsstCam.yaml'#

Path to policy file relative to obs_lsst root.

detectorMapping = None#

Mapping of detector name to detector number and serial.

detectorSerials = None#

Mapping of detector serial number to raft, number, and name.

name: str | None = 'LSSTCam'#

Name of this translation class

supported_instrument: str | None = 'LSSTCam'#

Supports the lsstCam instrument.

Methods Documentation

classmethod can_translate(header, filename=None)#

Indicate whether this translation class can translate the supplied header.

Parameters#

headerdict-like

Header to convert to standardized form.

filenamestr, optional

Name of file being translated.

Returns#

canbool

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

classmethod fix_header(header, instrument, obsid, filename=None)#

Fix LSSTCam headers.

Notes#

See fix_header for details of the general process.

classmethod observing_date_to_offset(observing_date: Time) TimeDelta | None#

Return the offset to use when calculating the observing day.

Parameters#

observing_dateastropy.time.Time

The date of the observation. Unused.

Returns#

offsetastropy.time.TimeDelta

The offset to apply. During lab testing the offset is Pacific Time which can mean UTC-7 or UTC-8 depending on daylight savings. In Chile the offset is always UTC-12.

to_boresight_rotation_angle() Angle#

Angle of the instrument in boresight_rotation_coord frame.

Returns:

Translated value derived directly from a single header.

Return type:

astropy.coordinates.angles.core.Angle

to_can_see_sky() bool | None#

Return whether the observation can see the sky or not.

Returns#

can_see_skybool or None

True if the detector is receiving photons from the sky. False if the sky is not visible to the detector. None if the metadata translator does not know one way or the other.

Notes#

The base class translator uses a simple heuristic of returning True if the observation type is “science” or “object” and False if the observation type is “bias” or “dark”. For all other cases it will return None.

to_detector_group() str#

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

Returns:

Translated value derived directly from a single header.

Return type:

str

to_detector_name() str#

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

Returns:

Translated value derived directly from a single header.

Return type:

str

to_detector_serial() str#

Serial number/string associated with this detector.

Returns:

Translated value derived directly from a single header.

Return type:

str

to_exposure_time()#

Return value of exposure_time from headers.

Actual duration of the exposure (seconds).

Returns:

The translated property.

Return type:

astropy.units.quantity.Quantity

to_exposure_time_requested() Quantity#

Requested duration of the exposure (seconds).

Returns:

Translated value derived directly from a single header.

Return type:

astropy.units.quantity.Quantity

to_instrument() str#

The instrument used to observe the exposure.

Returns:

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

Return type:

str

to_object() str#

Object of interest or field name.

Returns:

Translated value derived directly from a single header.

Return type:

str

to_observation_id() str#

Label uniquely identifying this observation (can be related to ‘exposure_id’).

Returns:

Translated value derived directly from a single header.

Return type:

str

to_physical_filter()#

Calculate the physical filter name.

Returns#

filterstr

Name of filter. Can be a combination of FILTER, FILTER1, and FILTER2 headers joined by a “~”. Trailing “~empty” components are stripped. Returns “unknown” if no filter is declared.

to_science_program() str#

Observing program (survey or proposal) identifier.

Returns:

Translated value derived directly from a single header.

Return type:

str

to_telescope() str#

Full name of the telescope.

Returns:

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

Return type:

str