ObservationInfo¶
-
class
astro_metadata_translator.
ObservationInfo
(header, filename=None, translator_class=None, pedantic=False, search_path=None)¶ Bases:
object
Standardized representation of an instrument header for a single exposure observation.
Parameters: - header :
dict
-like Representation of an instrument header accessible as a
dict
. May be updated with header corrections if corrections are found.- filename :
str
, optional Name of the file whose header is being translated. For some datasets with missing header information this can sometimes allow for some fixups in translations.
- translator_class :
MetadataTranslator
-class, optional If not
None
, the class to use to translate the supplied headers into standard form. Otherwise each registered translator class will be asked in turn if it knows how to translate the supplied header.- pedantic :
bool
, optional If True the translation must succeed for all properties. If False individual property translations must all be implemented but can fail and a warning will be issued.
- search_path : iterable, optional
Override search paths to use during header fix up.
Raises: - ValueError
Raised if the supplied header was not recognized by any of the registered translators.
- TypeError
Raised if the supplied translator class was not a MetadataTranslator.
- KeyError
Raised if a translation fails and pedantic mode is enabled.
- NotImplementedError
Raised if the selected translator does not support a required property.
Notes
Headers will be corrected if correction files are located and this will modify the header provided to the constructor.
Attributes Summary
altaz_begin
Telescope boresight azimuth and elevation at start of observation. boresight_airmass
Airmass of the boresight of the telescope. boresight_rotation_angle
Angle of the instrument in boresight_rotation_coord frame. boresight_rotation_coord
Coordinate frame of the instrument rotation angle (options: sky, unknown). cards_used
Header cards used for the translation. dark_time
Duration of the exposure with shutter closed (seconds). datetime_begin
Time of the start of the observation. datetime_end
Time of the end of the observation. detector_exposure_id
Unique integer identifier for this detector in this exposure. detector_group
Collection name of which this detector is a part. detector_name
Name of the detector within the instrument (might not be unique if there are detector groups). detector_num
Unique (for instrument) integer identifier for the sensor. detector_serial
Serial number/string associated with this detector. detector_unique_name
Unique name of the detector within the focal plane, generally combining detector_group with detector_name. exposure_id
Unique (with instrument) integer identifier for this observation. exposure_time
Duration of the exposure with shutter open (seconds). instrument
The instrument used to observe the exposure. location
Location of the observatory. object
Object of interest or field name. observation_id
Label uniquely identifying this observation (can be related to ‘exposure_id’). observation_type
Type of observation (currently: science, dark, flat, bias, focus). physical_filter
The bandpass filter used for this observation. pressure
Atmospheric pressure outside the dome. relative_humidity
Relative humidity outside the dome. science_program
Observing program (survey or proposal) identifier. telescope
Full name of the telescope. temperature
Temperature outside the dome. tracking_radec
Requested RA/Dec to track. visit_id
ID of the Visit this Exposure is associated with. Methods Summary
makeObservationInfo
(**kwargs)Construct an ObservationInfo
from the supplied parameters.stripped_header
()Return a copy of the supplied header with used keywords removed. Attributes Documentation
-
altaz_begin
¶ Telescope boresight azimuth and elevation at start of observation.
Returns: - altaz_begin :
astropy.coordinates.AltAz
Access the property.
- altaz_begin :
-
boresight_airmass
¶ Airmass of the boresight of the telescope.
Returns: - boresight_airmass :
float
Access the property.
- boresight_airmass :
-
boresight_rotation_angle
¶ Angle of the instrument in boresight_rotation_coord frame.
Returns: - boresight_rotation_angle :
astropy.coordinates.Angle
Access the property.
- boresight_rotation_angle :
-
boresight_rotation_coord
¶ Coordinate frame of the instrument rotation angle (options: sky, unknown).
Returns: - boresight_rotation_coord :
str
Access the property.
- boresight_rotation_coord :
-
cards_used
¶ Header cards used for the translation.
Returns:
-
dark_time
¶ Duration of the exposure with shutter closed (seconds).
Returns: - dark_time :
astropy.units.Quantity
Access the property.
- dark_time :
-
datetime_begin
¶ Time of the start of the observation.
Returns: - datetime_begin :
astropy.time.Time
Access the property.
- datetime_begin :
-
datetime_end
¶ Time of the end of the observation.
Returns: - datetime_end :
astropy.time.Time
Access the property.
- datetime_end :
-
detector_exposure_id
¶ Unique integer identifier for this detector in this exposure.
Returns: - detector_exposure_id :
int
Access the property.
- detector_exposure_id :
-
detector_group
¶ Collection name of which this detector is a part. Can be None if there are no detector groupings.
Returns: - detector_group :
str
Access the property.
- detector_group :
-
detector_name
¶ Name of the detector within the instrument (might not be unique if there are detector groups).
Returns: - detector_name :
str
Access the property.
- detector_name :
-
detector_num
¶ Unique (for instrument) integer identifier for the sensor.
Returns: - detector_num :
int
Access the property.
- detector_num :
-
detector_serial
¶ Serial number/string associated with this detector.
Returns: - detector_serial :
str
Access the property.
- detector_serial :
-
detector_unique_name
¶ Unique name of the detector within the focal plane, generally combining detector_group with detector_name.
Returns: - detector_unique_name :
str
Access the property.
- detector_unique_name :
-
exposure_id
¶ Unique (with instrument) integer identifier for this observation.
Returns: - exposure_id :
int
Access the property.
- exposure_id :
-
exposure_time
¶ Duration of the exposure with shutter open (seconds).
Returns: - exposure_time :
astropy.units.Quantity
Access the property.
- exposure_time :
-
instrument
¶ The instrument used to observe the exposure.
Returns: - instrument :
str
Access the property.
- instrument :
-
location
¶ Location of the observatory.
Returns: - location :
astropy.coordinates.EarthLocation
Access the property.
- location :
-
observation_id
¶ Label uniquely identifying this observation (can be related to ‘exposure_id’).
Returns: - observation_id :
str
Access the property.
- observation_id :
-
observation_type
¶ Type of observation (currently: science, dark, flat, bias, focus).
Returns: - observation_type :
str
Access the property.
- observation_type :
-
physical_filter
¶ The bandpass filter used for this observation.
Returns: - physical_filter :
str
Access the property.
- physical_filter :
-
pressure
¶ Atmospheric pressure outside the dome.
Returns: - pressure :
astropy.units.Quantity
Access the property.
- pressure :
-
relative_humidity
¶ Relative humidity outside the dome.
Returns: - relative_humidity :
float
Access the property.
- relative_humidity :
-
science_program
¶ Observing program (survey or proposal) identifier.
Returns: - science_program :
str
Access the property.
- science_program :
-
temperature
¶ Temperature outside the dome.
Returns: - temperature :
astropy.units.Quantity
Access the property.
- temperature :
-
tracking_radec
¶ Requested RA/Dec to track.
Returns: - tracking_radec :
astropy.coordinates.SkyCoord
Access the property.
- tracking_radec :
-
visit_id
¶ 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: - visit_id :
int
Access the property.
- visit_id :
Methods Documentation
-
classmethod
makeObservationInfo
(**kwargs)¶ Construct an
ObservationInfo
from the supplied parameters.Raises: - KeyError
Raised if a supplied parameter key is not a known property.
- TypeError
Raised if a supplied value does not match the expected type of the property.
Notes
The supplied parameters should use names matching the property. The type of the supplied value will be checked against the property. Any properties not supplied will be assigned a value of
None
.
- header :