gemini_instruments.ghost package
- class gemini_instruments.ghost.AstroDataGhost(nddata=None, tables=None, phu=None, indices=None, is_single=False)[source]
Bases:
AstroDataGemini
Class for adding tags and descriptors to GHOST data.
- amp_read_area(*args, **kwargs)[source]
Returns the readout area of each amplifier, as a 0-based tuple or 1-based string
- Returns:
the amp readout areas
- Return type:
list/(tuple or string)
- arm()[source]
Returns a string indicating whether these data are from the red or blue arm of the spectrograph.
- Returns:
Color of the arm (
'blue'
,'red'
), or'slitv'
in case of slit viewer data. ReturnsNone
if arm/slit status can’t be determined.- Return type:
str/None
- array_name(*args, **kwargs)[source]
Returns the name of each array
- Returns:
the array names
- Return type:
list of str/str
- binning(*args, **kwargs)[source]
Returns an “MxN”-style string because CJS is fed up with not having this!
- central_wavelength(asMicrometers=False, asNanometers=False, asAngstroms=False)[source]
Dummy to work around current Gemini cal_mgr
- data_label()[source]
Returns the data label of an observation.
- Returns:
the observation’s data label
- Return type:
- detector_name(*args, **kwargs)[source]
Returns the name of the detector
- Returns:
the detector name
- Return type:
- detector_x_bin(*args, **kwargs)[source]
Returns the detector binning in the x-direction
- Returns:
The detector binning
- Return type:
- detector_y_bin(*args, **kwargs)[source]
Returns the detector binning in the y-direction
- Returns:
The detector binning
- Return type:
- exposure_time(*args, **kwargs)[source]
Returns the exposure time in seconds.
- Returns:
Exposure time.
- Return type:
- focal_plane_mask(*args, **kwargs)[source]
Returns the “focal plane mask”, primarily to populate the archive’s Header table so it can be searched on.
- Returns:
“HR”/”SR” as appropriate
- Return type:
- gain_setting(*args, **kwargs)[source]
Returns the gain setting for this observation (e.g., ‘high’, ‘low’)
- Returns:
the gain setting
- Return type:
- group_id()[source]
Returns a string representing a group of data that are compatible with each other. This is used when stacking, for example. Each instrument, mode of observation, and data type will have its own rules.
- Returns:
A group ID for compatible data
- Return type:
- non_linear_level()[source]
Returns the level at which the data become non-linear. This is the same as the saturation level for the GHOST CCDs.
- Returns:
non-linearity level
- Return type:
int/list
- number_of_exposures()[source]
Return the number of individual exposures
- Returns:
number of exposures
- Return type:
int/dict
- read_mode(*args, **kwargs)[source]
Returns the readout mode used for the observation
- Returns:
the read mode used
- Return type:
- read_speed_setting(*args, **kwargs)[source]
Returns the read speed setting for the observation
- Returns:
the read speed setting
- Return type:
- res_mode()[source]
Get the GHOST resolution mode of this dataset
- Returns:
Resolution of the dataset (‘high’ | ‘std’). Returns
None
if resolution mode cannot be determined.- Return type:
str/None
- ut_datetime(*args, **kwargs)[source]
Returns the UT date and/or time of the observation as a datetime or date or time object.
- Parameters:
- Returns:
UT date and/or time
- Return type:
datetime.datetime / datetime.date / datetime.time
- want_before_arc()[source]
This is a special descriptor which is being used as a calibration system work-around. Outside of active reduction, this descriptor should always return None, as the relevant header keyword should only exist very briefly during the fetching of bracketed arc files.
- Return type:
bool or
None
Submodules
gemini_instruments.ghost.adclass module
This module contains the AstroDataGhost class, used for adding tags and descriptors to GHOST data.
- class gemini_instruments.ghost.adclass.AstroDataGhost(nddata=None, tables=None, phu=None, indices=None, is_single=False)[source]
Bases:
AstroDataGemini
Class for adding tags and descriptors to GHOST data.
- amp_read_area(*args, **kwargs)[source]
Returns the readout area of each amplifier, as a 0-based tuple or 1-based string
- Returns:
the amp readout areas
- Return type:
list/(tuple or string)
- arm()[source]
Returns a string indicating whether these data are from the red or blue arm of the spectrograph.
- Returns:
Color of the arm (
'blue'
,'red'
), or'slitv'
in case of slit viewer data. ReturnsNone
if arm/slit status can’t be determined.- Return type:
str/None
- array_name(*args, **kwargs)[source]
Returns the name of each array
- Returns:
the array names
- Return type:
list of str/str
- binning(*args, **kwargs)[source]
Returns an “MxN”-style string because CJS is fed up with not having this!
- central_wavelength(asMicrometers=False, asNanometers=False, asAngstroms=False)[source]
Dummy to work around current Gemini cal_mgr
- data_label()[source]
Returns the data label of an observation.
- Returns:
the observation’s data label
- Return type:
- detector_name(*args, **kwargs)[source]
Returns the name of the detector
- Returns:
the detector name
- Return type:
- detector_x_bin(*args, **kwargs)[source]
Returns the detector binning in the x-direction
- Returns:
The detector binning
- Return type:
- detector_y_bin(*args, **kwargs)[source]
Returns the detector binning in the y-direction
- Returns:
The detector binning
- Return type:
- exposure_time(*args, **kwargs)[source]
Returns the exposure time in seconds.
- Returns:
Exposure time.
- Return type:
- focal_plane_mask(*args, **kwargs)[source]
Returns the “focal plane mask”, primarily to populate the archive’s Header table so it can be searched on.
- Returns:
“HR”/”SR” as appropriate
- Return type:
- gain_setting(*args, **kwargs)[source]
Returns the gain setting for this observation (e.g., ‘high’, ‘low’)
- Returns:
the gain setting
- Return type:
- group_id()[source]
Returns a string representing a group of data that are compatible with each other. This is used when stacking, for example. Each instrument, mode of observation, and data type will have its own rules.
- Returns:
A group ID for compatible data
- Return type:
- non_linear_level()[source]
Returns the level at which the data become non-linear. This is the same as the saturation level for the GHOST CCDs.
- Returns:
non-linearity level
- Return type:
int/list
- number_of_exposures()[source]
Return the number of individual exposures
- Returns:
number of exposures
- Return type:
int/dict
- read_mode(*args, **kwargs)[source]
Returns the readout mode used for the observation
- Returns:
the read mode used
- Return type:
- read_speed_setting(*args, **kwargs)[source]
Returns the read speed setting for the observation
- Returns:
the read speed setting
- Return type:
- res_mode()[source]
Get the GHOST resolution mode of this dataset
- Returns:
Resolution of the dataset (‘high’ | ‘std’). Returns
None
if resolution mode cannot be determined.- Return type:
str/None
- ut_datetime(*args, **kwargs)[source]
Returns the UT date and/or time of the observation as a datetime or date or time object.
- Parameters:
- Returns:
UT date and/or time
- Return type:
datetime.datetime / datetime.date / datetime.time
- want_before_arc()[source]
This is a special descriptor which is being used as a calibration system work-around. Outside of active reduction, this descriptor should always return None, as the relevant header keyword should only exist very briefly during the fetching of bracketed arc files.
- Return type:
bool or
None
- gemini_instruments.ghost.adclass.return_dict_for_bundle(desc_fn)[source]
A decorator that will return a dict with keys “blue” and “red” and values equal to the descriptor return if it was sent the split files. A check is made that all the returns are equal, and None is returned otherwise.
This works by splitting the bundle and evaluating the descriptor on all of the blue and then red arms in turn. It therefore works regardless of whether the required information is in the extensions or the nascent PHU.
Its behaviour on multi-extension slices is unclear.