LsstCamPhoSimTranslator#
- class lsst.obs.lsst.translators.LsstCamPhoSimTranslator(header: Mapping[str, Any], filename: ResourcePathExpression | None = None)#
Bases:
LsstSimTranslatorMetadata translator for LSSTCam PhoSim data.
Attributes Summary
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.
determine_translatable_headers(filename[, ...])Given a file return all the headers usable for metadata translation.
Return value of altaz_begin from headers.
Airmass of the boresight of the telescope.
Return value of boresight_rotation_angle from headers.
Coordinate frame of the instrument rotation angle (options: sky, unknown).
Duration of the exposure with shutter closed (seconds).
Collection name of which this detector is a part.
Name of the detector within the instrument (might not be unique if there are detector groups).
Serial number/string associated with this detector.
Unique (with instrument) integer identifier for this observation.
Actual duration of the exposure (seconds).
The instrument used to observe the exposure.
Object of interest or field name.
Label uniquely identifying this observation (can be related to 'exposure_id').
Type of observation (currently: science, dark, flat, bias, focus).
The bandpass filter used for this observation.
Atmospheric pressure outside the dome.
Relative humidity outside the dome.
Observing program (survey or proposal) identifier.
Temperature outside the dome.
Return value of tracking_radec from headers.
ID of the Visit this Exposure is associated with.
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/phosim.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-PhoSim'#
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
INSTRUMEheader in PhoSim data. Instead we use theCREATORheader.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 determine_translatable_headers(filename, primary=None)#
Given a file return all the headers usable for metadata translation.
Phosim splits useful metadata between the primary header and the amplifier headers. A single header is returned as a merge of the first two.
Parameters#
- filename
strorlsst.resources.ResourcePathExpression Path to a file in a format understood by this translator.
- primary
dict-like, optional The primary header obtained by the caller. This is sometimes already known, for example if a system is trying to bootstrap without already knowing what data is in the file. Will be ignored.
Yields#
- headersiterator of
dict-like The primary header merged with the secondary header.
Notes#
This translator class is specifically tailored to raw PhoSim data and is not designed to work with general FITS files. The normal paradigm is for the caller to have read the first header and then called
determine_translator()on the result to work out which translator class to then call to obtain the real headers to be used for translation.- filename
- to_altaz_begin()#
Return value of altaz_begin from headers.
Telescope boresight azimuth and elevation at start of observation.
- Returns:
The translated property.
- Return type:
astropy.coordinates.builtin_frames.altaz.AltAz
- to_boresight_airmass() float#
Airmass of the boresight of the telescope.
- Returns:
Translated value derived directly from a single header.
- Return type:
float
- 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() 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_dark_time() Quantity#
Duration of the exposure with shutter closed (seconds).
- Returns:
Translated value derived directly from a single header.
- Return type:
astropy.units.quantity.Quantity
- 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_id() int#
Unique (with instrument) integer identifier for this observation.
- Returns:
Translated value derived directly from a single header.
- Return type:
int
- 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_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() 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_observation_type() str#
Type of observation (currently: science, dark, flat, bias, focus).
- Returns:
Translated property that is fixed to a single value by the translator.
- 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 value derived directly from a single header.
- 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() str#
Observing program (survey or proposal) identifier.
- Returns:
Translated value derived directly from a single header.
- Return type:
str
- to_temperature() Quantity#
Temperature outside the dome.
- Returns:
Translated value derived directly from a single header.
- Return type:
astropy.units.quantity.Quantity
- to_tracking_radec()#
Return value of tracking_radec from headers.
Requested RA/Dec to track.
- Returns:
The translated property.
- Return type:
astropy.coordinates.sky_coordinate.SkyCoord
- to_visit_id() int#
ID of the Visit this Exposure is associated with.
Science observations should essentially always be associated with a visit, but calibration observations may not be.
- Returns:
Translated value derived directly from a single header.
- Return type:
int