StubTranslator#
- class astro_metadata_translator.StubTranslator(header, filename=None)#
Bases:
MetadataTranslatorTranslator where all the translations are stubbed out and issue warnings.
This translator can be used as a base class whilst developing a new translator. It allows testing to proceed without being required to fully define all translation methods. Once complete the class should be removed from the inheritance tree.
- Parameters:
filename (
str|ParseResult|ResourcePath|Path|None, default:None)
Attributes Summary
All the valid properties for this translator including extensions.
Methods Summary
Unimplemented forwarding translator for altaz_begin.
Unimplemented forwarding translator for altaz_end.
Unimplemented forwarding translator for boresight_airmass.
Unimplemented forwarding translator for boresight_rotation_angle.
Unimplemented forwarding translator for boresight_rotation_coord.
Unimplemented forwarding translator for can_see_sky.
Unimplemented forwarding translator for dark_time.
Unimplemented forwarding translator for datetime_begin.
Unimplemented forwarding translator for datetime_end.
Unimplemented forwarding translator for detector_exposure_id.
Unimplemented forwarding translator for detector_group.
Unimplemented forwarding translator for detector_name.
Unimplemented forwarding translator for detector_num.
Unimplemented forwarding translator for detector_serial.
Unimplemented forwarding translator for detector_unique_name.
Unimplemented forwarding translator for exposure_group.
Unimplemented forwarding translator for exposure_id.
Unimplemented forwarding translator for exposure_time.
Unimplemented forwarding translator for exposure_time_requested.
Unimplemented forwarding translator for focus_z.
Unimplemented forwarding translator for group_counter_end.
Unimplemented forwarding translator for group_counter_start.
Unimplemented forwarding translator for has_simulated_content.
Unimplemented forwarding translator for instrument.
Unimplemented forwarding translator for location.
Unimplemented forwarding translator for object.
Unimplemented forwarding translator for observation_counter.
Unimplemented forwarding translator for observation_id.
Unimplemented forwarding translator for observation_reason.
Unimplemented forwarding translator for observation_type.
Unimplemented forwarding translator for observing_day.
Unimplemented forwarding translator for observing_day_offset.
Unimplemented forwarding translator for physical_filter.
Unimplemented forwarding translator for pressure.
Unimplemented forwarding translator for relative_humidity.
Unimplemented forwarding translator for science_program.
Unimplemented forwarding translator for telescope.
Unimplemented forwarding translator for temperature.
Unimplemented forwarding translator for tracking_radec.
Unimplemented forwarding translator for visit_id.
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.
Methods Documentation
- to_altaz_begin()#
Unimplemented forwarding translator for altaz_begin.
Telescope boresight azimuth and elevation at start of observation.
Calls the base class translation method and if that fails with
NotImplementedErrorissues a warning reminding the implementer to override this method.- Returns:
Always returns
None.- Return type:
- Parameters:
self (
MetadataTranslator)
- to_altaz_end()#
Unimplemented forwarding translator for altaz_end.
Telescope boresight azimuth and elevation at end of observation.
Calls the base class translation method and if that fails with
NotImplementedErrorissues a warning reminding the implementer to override this method.- Returns:
Always returns
None.- Return type:
- Parameters:
self (
MetadataTranslator)
- to_boresight_airmass()#
Unimplemented forwarding translator for boresight_airmass.
Airmass of the boresight of the telescope.
Calls the base class translation method and if that fails with
NotImplementedErrorissues a warning reminding the implementer to override this method.- Returns:
Always returns
None.- Return type:
- Parameters:
self (
MetadataTranslator)
- to_boresight_rotation_angle()#
Unimplemented forwarding translator for boresight_rotation_angle.
Angle of the instrument in boresight_rotation_coord frame.
Calls the base class translation method and if that fails with
NotImplementedErrorissues a warning reminding the implementer to override this method.- Returns:
Always returns
None.- Return type:
- Parameters:
self (
MetadataTranslator)
- to_boresight_rotation_coord()#
Unimplemented forwarding translator for boresight_rotation_coord.
Coordinate frame of the instrument rotation angle (options: sky, unknown).
Calls the base class translation method and if that fails with
NotImplementedErrorissues a warning reminding the implementer to override this method.- Returns:
Always returns
None.- Return type:
- Parameters:
self (
MetadataTranslator)
- to_can_see_sky()#
Unimplemented forwarding translator for can_see_sky.
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.
Calls the base class translation method and if that fails with
NotImplementedErrorissues a warning reminding the implementer to override this method.- Returns:
Always returns
None.- Return type:
- Parameters:
self (
MetadataTranslator)
- to_dark_time()#
Unimplemented forwarding translator for dark_time.
Duration of the exposure with shutter closed (seconds).
Calls the base class translation method and if that fails with
NotImplementedErrorissues a warning reminding the implementer to override this method.- Returns:
Always returns
None.- Return type:
- Parameters:
self (
MetadataTranslator)
- to_datetime_begin()#
Unimplemented forwarding translator for datetime_begin.
Time of the start of the observation.
Calls the base class translation method and if that fails with
NotImplementedErrorissues a warning reminding the implementer to override this method.- Returns:
Always returns
None.- Return type:
- Parameters:
self (
MetadataTranslator)
- to_datetime_end()#
Unimplemented forwarding translator for datetime_end.
Time of the end of the observation.
Calls the base class translation method and if that fails with
NotImplementedErrorissues a warning reminding the implementer to override this method.- Returns:
Always returns
None.- Return type:
- Parameters:
self (
MetadataTranslator)
- to_detector_exposure_id()#
Unimplemented forwarding translator for detector_exposure_id.
Unique integer identifier for this detector in this exposure.
Calls the base class translation method and if that fails with
NotImplementedErrorissues a warning reminding the implementer to override this method.- Returns:
Always returns
None.- Return type:
- Parameters:
self (
MetadataTranslator)
- to_detector_group()#
Unimplemented forwarding translator for detector_group.
Collection name of which this detector is a part. Can be None if there are no detector groupings.
Calls the base class translation method and if that fails with
NotImplementedErrorissues a warning reminding the implementer to override this method.- Returns:
Always returns
None.- Return type:
- Parameters:
self (
MetadataTranslator)
- to_detector_name()#
Unimplemented forwarding translator for detector_name.
Name of the detector within the instrument (might not be unique if there are detector groups).
Calls the base class translation method and if that fails with
NotImplementedErrorissues a warning reminding the implementer to override this method.- Returns:
Always returns
None.- Return type:
- Parameters:
self (
MetadataTranslator)
- to_detector_num()#
Unimplemented forwarding translator for detector_num.
Unique (for instrument) integer identifier for the sensor.
Calls the base class translation method and if that fails with
NotImplementedErrorissues a warning reminding the implementer to override this method.- Returns:
Always returns
None.- Return type:
- Parameters:
self (
MetadataTranslator)
- to_detector_serial()#
Unimplemented forwarding translator for detector_serial.
Serial number/string associated with this detector.
Calls the base class translation method and if that fails with
NotImplementedErrorissues a warning reminding the implementer to override this method.- Returns:
Always returns
None.- Return type:
- Parameters:
self (
MetadataTranslator)
- to_detector_unique_name()#
Unimplemented forwarding translator for detector_unique_name.
Unique name of the detector within the focal plane, generally combining detector_group with detector_name.
Calls the base class translation method and if that fails with
NotImplementedErrorissues a warning reminding the implementer to override this method.- Returns:
Always returns
None.- Return type:
- Parameters:
self (
MetadataTranslator)
- to_exposure_group()#
Unimplemented forwarding translator for exposure_group.
Label to use to associate this exposure with others (can be related to ‘exposure_id’).
Calls the base class translation method and if that fails with
NotImplementedErrorissues a warning reminding the implementer to override this method.- Returns:
Always returns
None.- Return type:
- Parameters:
self (
MetadataTranslator)
- to_exposure_id()#
Unimplemented forwarding translator for exposure_id.
Unique (with instrument) integer identifier for this observation.
Calls the base class translation method and if that fails with
NotImplementedErrorissues a warning reminding the implementer to override this method.- Returns:
Always returns
None.- Return type:
- Parameters:
self (
MetadataTranslator)
- to_exposure_time()#
Unimplemented forwarding translator for exposure_time.
Actual duration of the exposure (seconds).
Calls the base class translation method and if that fails with
NotImplementedErrorissues a warning reminding the implementer to override this method.- Returns:
Always returns
None.- Return type:
- Parameters:
self (
MetadataTranslator)
- to_exposure_time_requested()#
Unimplemented forwarding translator for exposure_time_requested.
Requested duration of the exposure (seconds).
Calls the base class translation method and if that fails with
NotImplementedErrorissues a warning reminding the implementer to override this method.- Returns:
Always returns
None.- Return type:
- Parameters:
self (
MetadataTranslator)
- to_focus_z()#
Unimplemented forwarding translator for focus_z.
Defocal distance.
Calls the base class translation method and if that fails with
NotImplementedErrorissues a warning reminding the implementer to override this method.- Returns:
Always returns
None.- Return type:
- Parameters:
self (
MetadataTranslator)
- to_group_counter_end()#
Unimplemented forwarding translator for group_counter_end.
Observation counter for the end of the exposure group. Depending on the instrument the relevant group may be visit_id or exposure_group.
Calls the base class translation method and if that fails with
NotImplementedErrorissues a warning reminding the implementer to override this method.- Returns:
Always returns
None.- Return type:
- Parameters:
self (
MetadataTranslator)
- to_group_counter_start()#
Unimplemented forwarding translator for group_counter_start.
Observation counter for the start of the exposure group.Depending on the instrument the relevant group may be visit_id or exposure_group.
Calls the base class translation method and if that fails with
NotImplementedErrorissues a warning reminding the implementer to override this method.- Returns:
Always returns
None.- Return type:
- Parameters:
self (
MetadataTranslator)
- to_has_simulated_content()#
Unimplemented forwarding translator for has_simulated_content.
Boolean indicating whether any part of this observation was simulated.
Calls the base class translation method and if that fails with
NotImplementedErrorissues a warning reminding the implementer to override this method.- Returns:
Always returns
None.- Return type:
- Parameters:
self (
MetadataTranslator)
- to_instrument()#
Unimplemented forwarding translator for instrument.
The instrument used to observe the exposure.
Calls the base class translation method and if that fails with
NotImplementedErrorissues a warning reminding the implementer to override this method.- Returns:
Always returns
None.- Return type:
- Parameters:
self (
MetadataTranslator)
- to_location()#
Unimplemented forwarding translator for location.
Location of the observatory.
Calls the base class translation method and if that fails with
NotImplementedErrorissues a warning reminding the implementer to override this method.- Returns:
Always returns
None.- Return type:
- Parameters:
self (
MetadataTranslator)
- to_object()#
Unimplemented forwarding translator for object.
Object of interest or field name.
Calls the base class translation method and if that fails with
NotImplementedErrorissues a warning reminding the implementer to override this method.- Returns:
Always returns
None.- Return type:
- Parameters:
self (
MetadataTranslator)
- to_observation_counter()#
Unimplemented forwarding translator for observation_counter.
Counter of this observation. Can be counter within observing_day or a global counter. Likely to be observatory specific.
Calls the base class translation method and if that fails with
NotImplementedErrorissues a warning reminding the implementer to override this method.- Returns:
Always returns
None.- Return type:
- Parameters:
self (
MetadataTranslator)
- to_observation_id()#
Unimplemented forwarding translator for observation_id.
Label uniquely identifying this observation (can be related to ‘exposure_id’).
Calls the base class translation method and if that fails with
NotImplementedErrorissues a warning reminding the implementer to override this method.- Returns:
Always returns
None.- Return type:
- Parameters:
self (
MetadataTranslator)
- to_observation_reason()#
Unimplemented forwarding translator for observation_reason.
Reason this observation was taken, or its purpose (‘science’ and ‘calibration’ are common values)
Calls the base class translation method and if that fails with
NotImplementedErrorissues a warning reminding the implementer to override this method.- Returns:
Always returns
None.- Return type:
- Parameters:
self (
MetadataTranslator)
- to_observation_type()#
Unimplemented forwarding translator for observation_type.
Type of observation (currently: science, dark, flat, bias, focus).
Calls the base class translation method and if that fails with
NotImplementedErrorissues a warning reminding the implementer to override this method.- Returns:
Always returns
None.- Return type:
- Parameters:
self (
MetadataTranslator)
- to_observing_day()#
Unimplemented forwarding translator for observing_day.
Integer in YYYYMMDD format corresponding to the day of observation.
Calls the base class translation method and if that fails with
NotImplementedErrorissues a warning reminding the implementer to override this method.- Returns:
Always returns
None.- Return type:
- Parameters:
self (
MetadataTranslator)
- to_observing_day_offset()#
Unimplemented forwarding translator for observing_day_offset.
Offset to subtract from an observation date when calculating the observing day. Conversely, the offset to add to an observing day when calculating the time span of a day.
Calls the base class translation method and if that fails with
NotImplementedErrorissues a warning reminding the implementer to override this method.- Returns:
Always returns
None.- Return type:
- Parameters:
self (
MetadataTranslator)
- to_physical_filter()#
Unimplemented forwarding translator for physical_filter.
The bandpass filter used for this observation.
Calls the base class translation method and if that fails with
NotImplementedErrorissues a warning reminding the implementer to override this method.- Returns:
Always returns
None.- Return type:
- Parameters:
self (
MetadataTranslator)
- to_pressure()#
Unimplemented forwarding translator for pressure.
Atmospheric pressure outside the dome.
Calls the base class translation method and if that fails with
NotImplementedErrorissues a warning reminding the implementer to override this method.- Returns:
Always returns
None.- Return type:
- Parameters:
self (
MetadataTranslator)
- to_relative_humidity()#
Unimplemented forwarding translator for relative_humidity.
Relative humidity outside the dome.
Calls the base class translation method and if that fails with
NotImplementedErrorissues a warning reminding the implementer to override this method.- Returns:
Always returns
None.- Return type:
- Parameters:
self (
MetadataTranslator)
- to_science_program()#
Unimplemented forwarding translator for science_program.
Observing program (survey or proposal) identifier.
Calls the base class translation method and if that fails with
NotImplementedErrorissues a warning reminding the implementer to override this method.- Returns:
Always returns
None.- Return type:
- Parameters:
self (
MetadataTranslator)
- to_telescope()#
Unimplemented forwarding translator for telescope.
Full name of the telescope.
Calls the base class translation method and if that fails with
NotImplementedErrorissues a warning reminding the implementer to override this method.- Returns:
Always returns
None.- Return type:
- Parameters:
self (
MetadataTranslator)
- to_temperature()#
Unimplemented forwarding translator for temperature.
Temperature outside the dome.
Calls the base class translation method and if that fails with
NotImplementedErrorissues a warning reminding the implementer to override this method.- Returns:
Always returns
None.- Return type:
- Parameters:
self (
MetadataTranslator)
- to_tracking_radec()#
Unimplemented forwarding translator for tracking_radec.
Requested RA/Dec to track.
Calls the base class translation method and if that fails with
NotImplementedErrorissues a warning reminding the implementer to override this method.- Returns:
Always returns
None.- Return type:
- Parameters:
self (
MetadataTranslator)
- to_visit_id()#
Unimplemented forwarding translator for 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.
Calls the base class translation method and if that fails with
NotImplementedErrorissues a warning reminding the implementer to override this method.- Returns:
Always returns
None.- Return type:
- Parameters:
self (
MetadataTranslator)