LsstTS3Translator#
- class lsst.obs.lsst.translators.LsstTS3Translator(header: Mapping[str, Any], filename: ResourcePathExpression | None = None)#
Bases:
LsstBaseTranslatorMetadata translator for LSST BNL Test Stand 3 data.
Attributes Summary
Fixed name of single sensor.
All the valid properties for this translator including extensions.
Path to policy file relative to obs_lsst root.
Mapping of detector name to detector number and serial.
Mapping of detector serial number to raft, number, and name.
Name of this translation class
Methods Summary
can_translate(header[, filename])Indicate whether this translation class can translate the supplied header.
compute_detector_exposure_id(exposure_id, ...)Compute the detector exposure ID from detector number and exposure ID.
compute_exposure_id(dateobs[, seqnum, ...])Helper method to calculate the TS3 exposure_id.
The maximum exposure ID expected from this instrument.
Telescope boresight azimuth and elevation at start of observation.
Airmass of the boresight of the telescope.
Angle of the instrument in boresight_rotation_coord frame.
Coordinate frame of the instrument rotation angle (options: sky, unknown).
True if the observation is looking at sky, False if it is definitely not looking at the sky.
Calculate start time of observation.
Return value of detector_group from headers.
Name of the detector within the instrument (might not be unique if there are detector groups).
Serial number/string associated with this detector.
Generate a unique exposure ID number
Actual duration of the exposure (seconds).
The instrument used to observe the exposure.
Location of the observatory.
Object of interest or field name.
Return value of observation_id from headers.
The bandpass filter used for this observation.
Atmospheric pressure outside the dome.
Relative humidity outside the dome.
Calculate the science program information.
Full name of the telescope.
Temperature outside the dome.
Requested RA/Dec to track.
Generate a unique exposure ID number
Attributes Documentation
- DETECTOR_NAME = 'S00'#
Fixed name of single sensor.
- 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/ts3.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 = 'LSST-TS3'#
Name of this translation class
Methods Documentation
- classmethod can_translate(header, filename=None)#
Indicate whether this translation class can translate the supplied header.
There is no usable
INSTRUMEheader in TS3 data. Instead we use theTSTANDheader.Parameters#
- header
dict-like Header to convert to standardized form.
- filename
str, optional Name of file being translated.
Returns#
- can
bool Trueif the header is recognized by this class.Falseotherwise.
- header
- classmethod compute_detector_exposure_id(exposure_id, detector_num)#
Compute the detector exposure ID from detector number and exposure ID.
This is a helper method to allow code working outside the translator infrastructure to use the same algorithm.
Parameters#
- exposure_id
int Unique exposure ID.
- detector_num
int Detector number.
Returns#
- detector_exposure_id
int The calculated ID.
- exposure_id
- static compute_exposure_id(dateobs, seqnum=0, controller=None)#
Helper method to calculate the TS3 exposure_id.
Parameters#
- dateobs
str Date of observation in FITS ISO format.
- seqnum
int, unused Sequence number. Ignored.
- controller
str, unused Controller type. Ignored.
Returns#
- exposure_id
int Exposure ID.
- dateobs
- classmethod max_exposure_id()#
The maximum exposure ID expected from this instrument.
Returns#
- max_exposure_id
int The maximum value.
Notes#
The value is hard-coded to reflect historical values that were used for various controllers before the sequence counter was unified.
- max_exposure_id
- to_altaz_begin() AltAz#
Telescope boresight azimuth and elevation at start of observation.
- Returns:
Translated property that is fixed to a single value by the translator.
- Return type:
astropy.coordinates.builtin_frames.altaz.AltAz
- to_boresight_airmass() float#
Airmass of the boresight of the telescope.
- Returns:
Translated property that is fixed to a single value by the translator.
- Return type:
float
- to_boresight_rotation_angle() Angle#
Angle of the instrument in boresight_rotation_coord frame.
- Returns:
Translated property that is fixed to a single value by the translator.
- Return type:
astropy.coordinates.angles.core.Angle
- to_boresight_rotation_coord() str#
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
- to_can_see_sky() bool#
True if the observation is looking at sky, False if it is definitely not looking at the sky. None indicates that it is not known whether sky could be seen.
- Returns:
Translated property that is fixed to a single value by the translator.
- Return type:
bool
- to_datetime_begin()#
Calculate start time of observation.
Uses FITS standard
MJD-BEGorDATE-BEG, in conjunction with theTIMESYSheader. Will fallback to usingMJD-OBSorDATE-OBSif the-BEGvariants are not found.Returns#
- start_time
astropy.time.TimeorNone Time corresponding to the start of the observation. Returns
Noneif no date can be found.
- start_time
- to_detector_group()#
Return value of detector_group from headers.
Collection name of which this detector is a part. Can be None if there are no detector groupings.
- Returns:
The translated property.
- 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 property that is fixed to a single value by the translator.
- 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_id()#
Generate a unique exposure ID number
Note that SEQNUM is not unique for a given day in TS3 data so instead we convert the ISO date of observation directly to an integer.
Returns#
- exposure_id
int Unique exposure number.
- exposure_id
- to_exposure_time() Quantity#
Actual 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_location() EarthLocation#
Location of the observatory.
- Returns:
Translated property that is fixed to a single value by the translator.
- Return type:
astropy.coordinates.earth.EarthLocation
- to_object() str#
Object of interest or field name.
- Returns:
Translated property that is fixed to a single value by the translator.
- Return type:
str
- to_observation_id()#
Return value of observation_id from headers.
Label uniquely identifying this observation (can be related to ‘exposure_id’).
- Returns:
The translated property.
- Return type:
str
- to_physical_filter() str#
The bandpass filter used for this observation.
- Returns:
Translated value derived directly from a single header.
- Return type:
str
- to_pressure() Quantity#
Atmospheric pressure outside the dome.
- Returns:
Translated property that is fixed to a single value by the translator.
- Return type:
astropy.units.quantity.Quantity
- to_relative_humidity() float#
Relative humidity outside the dome.
- Returns:
Translated property that is fixed to a single value by the translator.
- Return type:
float
- to_science_program()#
Calculate the science program information.
There is no header recording this in TS3 data so instead return the observing day in YYYY-MM-DD format.
Returns#
- run
str Observing day in YYYY-MM-DD format.
- run
- to_telescope() str#
Full name of the telescope.
- Returns:
Translated property that is fixed to a single value by the translator.
- Return type:
str
- to_temperature() Quantity#
Temperature outside the dome.
- Returns:
Translated property that is fixed to a single value by the translator.
- Return type:
astropy.units.quantity.Quantity
- to_tracking_radec() SkyCoord#
Requested RA/Dec to track.
- Returns:
Translated property that is fixed to a single value by the translator.
- Return type:
astropy.coordinates.sky_coordinate.SkyCoord