gemini_instruments.gemini package
- class gemini_instruments.gemini.AstroDataGemini(nddata=None, tables=None, phu=None, indices=None, is_single=False)[source]
Bases:
AstroData
- amp_read_area(pretty=False)[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)
- ao_seeing()[source]
Returns an estimate of the natural seeing as calculated from the adaptive optics systems.
- Returns:
AO estimate of the natural seeing
- Return type:
- array_name()[source]
Returns the name of each array
- Returns:
the array names
- Return type:
list of str/str
- array_section(pretty=False)[source]
Returns the section covered by the array(s) relative to the detector frame. For example, this can be the position of multiple amps read within a CCD. If pretty is False, a tuple of 0-based coordinates is returned with format (x1, x2, y1, y2). If pretty is True, a keyword value is returned without parsing as a string. In this format, the coordinates are generally 1-based.
One tuple or string is return per extension/array, in a list. If the method is called on a single slice, the section is returned as a tuple or a string.
- Parameters:
pretty (bool) – If True, return the formatted string found in the header.
- Returns:
tuple of integers or list of tuples – Position of extension(s) using Python slice values
str/list of str – Position of extension(s) using an IRAF section format (1-based)
- calibration_key()[source]
Returns an object to be used as a key in the Calibrations dict. Multiple ADs can share a key but there can be only one of each type of calibration for each key. data_label() is the default. “_stack” is removed to avoid making a new request for a stacked frame, which will need the same calibration as the original.
- Returns:
identifier
- Return type:
string
- camera(stripID=False, pretty=False)[source]
Returns the name of the camera. The component ID can be removed with either ‘stripID’ or ‘pretty’ set to True.
- cass_rotator_pa()[source]
Returns the position angle of the Cassegrain rotator, in degrees.
- Returns:
Position angle of the Cassegrain rotator.
- Return type:
- central_wavelength(asMicrometers=False, asNanometers=False, asAngstroms=False)[source]
Returns the central wavelength in meters or the specified units
- coadds()[source]
Returns the number of co-adds used for the observation.
- Returns:
Number of co-adds.
- Return type:
- data_label()[source]
Returns the data label of an observation.
- Returns:
the observation’s data label
- Return type:
- data_section(pretty=False)[source]
Returns the rectangular section that includes the pixels that would be exposed to light. If pretty is False, a tuple of 0-based coordinates is returned with format (x1, x2, y1, y2). If pretty is True, a keyword value is returned without parsing as a string. In this format, the coordinates are generally 1-based.
One tuple or string is return per extension/array, in a list. If the method is called on a single slice, the section is returned as a tuple or a string.
- Parameters:
pretty (bool) – If True, return the formatted string found in the header.
- Returns:
tuple of integers or list of tuples – Location of the pixels exposed to light using Python slice values.
string or list of strings – Location of the pixels exposed to light using an IRAF section format (1-based).
- dec()[source]
Returns the Declination of the center of the field, in degrees.
- Returns:
declination in degrees
- Return type:
- decker(stripID=False, pretty=False)[source]
Returns the name of the decker. The component ID can be removed with either ‘stripID’ or ‘pretty’ set to True.
- detector_name(pretty=False)[source]
Returns the name of the detector
- Returns:
the detector name
- Return type:
- detector_roi_setting()[source]
Returns the ROI setting. Most instruments don’t allow this to be changed, so at the Gemini level it just returns ‘Fixed’
- Returns:
Name of the ROI setting used, ie, “Fixed”
- Return type:
- detector_rois_requested()[source]
Returns the ROIs requested. Since most instruments don’t have selectable ROIs, it returns None at the Gemini level
- Returns:
None
- Return type:
NoneType
- detector_section(pretty=False)[source]
Returns the section covered by the detector relative to the whole mosaic of detectors. If pretty is False, a tuple of 0-based coordinates is returned with format (x1, x2, y1, y2). If pretty is True, a keyword value is returned without parsing as a string. In this format, the coordinates are generally 1-based.
One tuple or string is return per extension/array, in a list. If the method is called on a single slice, the section is returned as a tuple or a string.
- Parameters:
pretty (bool) – If True, return the formatted string found in the header.
- Returns:
tuple of integers or list of tuples – Position of the detector using Python slice values.
string or list of strings – Position of the detector using an IRAF section format (1-based).
- detector_x_bin()[source]
Returns the detector binning in the x-direction
- Returns:
The detector binning
- Return type:
- detector_x_offset()[source]
Returns the offset from the reference position in pixels along the positive x-direction of the detector
- Returns:
The offset in pixels
- Return type:
- detector_y_bin()[source]
Returns the detector binning in the y-direction
- Returns:
The detector binning
- Return type:
- detector_y_offset()[source]
Returns the offset from the reference position in pixels along the positive y-direction of the detector
- Returns:
The offset in pixels
- Return type:
- disperser(stripID=False, pretty=False)[source]
Returns the name of the disperser. The “disperser” is a combination of all the dispersing elements along the light path.
The component ID can be removed with either ‘stripID’ or ‘pretty’ set to True.
- dispersion(asMicrometers=False, asNanometers=False, asAngstroms=False)[source]
Returns the dispersion in meters per pixel as a list (one value per extension) or a float if used on a single-extension slice. It is possible to control the units of wavelength using the input arguments.
- dispersion_axis()[source]
Returns the axis along which the light is dispersed.
- Returns:
Dispersion axis.
- Return type:
- effective_wavelength(output_units=None)[source]
Returns the wavelength representing the bandpass or the spectrum. For imaging data this normally is the wavelength at the center of the bandpass as defined by the filter used. For spectra, this is the central wavelength. The returned value is in meters.
This descriptor makes uses of a lookup table to associate filters with their effective_wavelength.
- Returns:
Wavelength representing the bandpass or the spectrum coverage.
- Return type:
- elevation()[source]
Returns the elevation of the telescope, in degrees
- Returns:
elevation
- Return type:
- filter_name(stripID=False, pretty=False)[source]
Returns the name of the filter(s) used. The component ID can be removed with either ‘stripID’ or ‘pretty’. If a combination of filters is used, the filter names will be join into a unique string with ‘&’ as separator. If ‘pretty’ is True, filter positions such as ‘Open’, ‘Dark’, ‘blank’, and others are removed leaving only the relevant filters in the string.
- focal_plane_mask(stripID=False, pretty=False)[source]
Returns the name of the focal plane mask. The component ID can be removed with either ‘stripID’ or ‘pretty’ set to True.
- gain()[source]
Returns the gain (electrons/ADU) for each extension
- Returns:
Gains used for the observation
- Return type:
list of floats/float
- gain_setting()[source]
Returns the gain setting for this observation (e.g., ‘high’, ‘low’)
- Returns:
the gain setting
- Return type:
- gcal_lamp()[source]
Returns the name of the GCAL lamp being used, or “Off” if no lamp is in used. This applies to flats and arc observations when a lamp is used. For other types observation, None is returned.
- Returns:
Name of the GCAL lamp being used, or “Off” if not in use.
- 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 and mode of observation will have its own rules.
At the Gemini class level, the default is to group by the Gemini observation ID.
- Returns:
A group ID for compatible data.
- Return type:
- instrument(generic=False)[source]
Returns the name of the instrument making the observation
- Parameters:
generic (boolean) – If set, don’t specify the specific instrument if there are clones (but that is handled by the instrument-level descriptors)
- Returns:
instrument name
- Return type:
- is_ao()[source]
Tells whether or not the data was taken with adaptive optics.
- Returns:
True if the data is AO, False otherwise.
- Return type:
- is_coadds_summed()[source]
Tells whether or not the co-adds have been summed. If not, they have been averaged.
At the Gemini level, this descriptor is hardcoded to True as it is the default at the observatory.
- Returns:
True if the data has been summed. False if it has been averaged.
- Return type:
- is_in_adu()[source]
Tells whether the data are in ADU (likely to be superseded by use of NDData’s unit attribute)
- Returns:
True if the data are in ADU
- Return type:
- local_time()[source]
Returns the local time stored at the time of the observation.
- Returns:
Local time of the observation.
- Return type:
datetime.datetime.time()
- mdf_row_id()[source]
Returns row ID from the MDF (Mask Definition File) table associated with the spectrum. Applies to “cut” MOS or X-dispersed data.
- Returns:
Row of the MDF associated with the extension.
- Return type:
- nominal_atmospheric_extinction()[source]
Returns the nominal atmospheric extinction at observation airmass and bandpass.
- Returns:
Nominal atmospheric extinction from model.
- Return type:
- nominal_photometric_zeropoint()[source]
Returns the nominal photometric zeropoint (i.e., magnitude corresponding to 1 pixel count) for each extension
- Returns:
Photometric zeropoint
- Return type:
float/list of floats
- non_linear_level()[source]
Returns the level at which the data become non-linear, in ADU. This is expected to be overridden by the individual instruments, so at the Gemini level it returns the values of the NONLINEA keywords (or None)
- Returns:
non-linearity level level in ADU
- Return type:
int/list
- observation_class()[source]
Returns the class of an observation, e.g., ‘science’, ‘acq’, ‘dayCal’.
- Returns:
the observation class
- Return type:
- observation_epoch()[source]
Returns the observation’s epoch.
- Returns:
the observation’s epoch
- Return type:
- observation_id()[source]
Returns the ID of an observation.
- Returns:
the observation ID
- Return type:
- observation_type()[source]
Returns the type of an observation, e.g., ‘OBJECT’, ‘FLAT’, ‘ARC’.
- Returns:
the observation type
- Return type:
- overscan_section(pretty=False)[source]
Returns the section covered by the overscan regions relative to the detector frame. If pretty is False, a tuple of 0-based coordinates is returned with format (x1, x2, y1, y2). If pretty is True, a keyword value is returned without parsing as a string. In this format, the coordinates are generally 1-based.
One tuple or string is return per extension/array. If more than one array, the tuples/strings are return in a list. Otherwise, the section is returned as a tuple or a string.
- Parameters:
pretty (bool) – If True, return the formatted string found in the header.
- Returns:
tuple of integers or list of tuples – Position of extension(s) using Python slice values
str/list of str – Position of extension(s) using an IRAF section format (1-based)
- pixel_scale()[source]
Returns the image scale in arcseconds per pixel, as an average over the extensions
- Returns:
the pixel scale
- Return type:
- program_id()[source]
Returns the ID of the program the observation was taken for
- Returns:
the program ID
- Return type:
- pupil_mask(stripID=False, pretty=False)[source]
Returns the name of the focal plane mask. The component ID can be removed with either ‘stripID’ or ‘pretty’ set to True.
- qa_state()[source]
Returns the Gemini quality assessment flags.
- Returns:
Gemini quality assessment flags.
- Return type:
- ra()[source]
Returns the Right Ascension of the center of the field, in degrees.
- Returns:
right ascension in degrees
- Return type:
- raw_bg()[source]
Returns the BG percentile band of the observation. BG refers to the sky/background brightness.
- Returns:
BG percentile band of the observation.
- Return type:
- raw_cc()[source]
Returns the CC percentile band of the observation. CC refers to the cloud coverage.
- Returns:
CC percentile band of the observation.
- Return type:
- raw_iq()[source]
Returns the IQ percentile band of the observation. IQ refers to the image quality or seeing.
- Returns:
IQ percentile band of the observation.
- Return type:
- raw_wv()[source]
Returns the WV percentile band of the observation. WV refers to the water vapor.
- Returns:
WV percentile band of the observation.
- Return type:
- read_mode()[source]
Returns the readout mode used for the observation
- Returns:
the read mode used
- Return type:
- read_noise()[source]
Returns the read noise in electrons for each extension. A list is returned unless called on a single-extension slice, when a float
- Returns:
the read noise
- Return type:
float/list of floats
- read_speed_setting()[source]
Returns the read speed setting for the observation
- Returns:
the read speed setting
- Return type:
- requested_bg()[source]
Returns the BG percentile band requested by the PI. BG refers to the sky/background brightness.
- Returns:
BG percentile band requested by the PI.
- Return type:
- requested_cc()[source]
Returns the CC percentile band requested by the PI. CC refers to the cloud coverage.
- Returns:
CC percentile band requested by the PI.
- Return type:
- requested_iq()[source]
Returns the IQ percentile band requested by the PI. IQ refers to the image quality or seeing.
- Returns:
IQ percentile band requested by the PI.
- Return type:
- requested_wv()[source]
Returns the WV percentile band requested by the PI. WV refers to the water vapor.
- Returns:
WV percentile band requested by the PI.
- Return type:
- saturation_level()[source]
Returns the saturation level of the data, in the units of the data. This is expected to be overridden by the individual instruments, so at the Gemini level it returns the values of the SATLEVEL keyword (or None).
- Returns:
saturation level (in units of the data)
- Return type:
list/float
- slit()[source]
Returns the name of the entrance slit used for the observation
- Returns:
the slit name
- Return type:
- target_dec(offset=False, pm=True, icrs=False)[source]
Returns the Declination of the target in degrees. Optionally, the telescope offsets can be applied. The proper motion can also be applied if requested. Finally, the RA can be converted to ICRS coordinates.
- target_ra(offset=False, pm=True, icrs=False)[source]
Returns the Right Ascension of the target in degrees. Optionally, the telescope offsets can be applied. The proper motion can also be applied if requested. Finally, the RA can be converted to ICRS coordinates.
- telescope_x_offset()[source]
Returns the telescope offset along the telescope x-axis, in arcseconds.
- Returns:
the telescope offset along the telescope x-axis (arcseconds)
- Return type:
- telescope_y_offset()[source]
Returns the telescope offset along the telescope y-axis, in arcseconds.
- Returns:
the telescope offset along the telescope y-axis (arcseconds)
- Return type:
- ut_date()[source]
Returns the UT date of the observation as a datetime object.
- Returns:
UT date.
- Return type:
- ut_datetime(strict=False, dateonly=False, timeonly=False)[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
- ut_time()[source]
Returns the UT time of the observation as a datetime object.
- Returns:
UT time.
- Return type:
- wavefront_sensor()[source]
Returns the name of the wavefront sensor used for the observation. If more than one is being used, the names will be joined with ‘&’.
- Returns:
Name of the wavefront sensor.
- Return type:
- wavelength_band()[source]
Returns the name of the bandpass of the observation. This is just to broadly know what type of data one is working with, eg. K band, H band, B band, etc.
- Returns:
Name of the bandpass.
- Return type:
- wcs_dec()[source]
Returns the Declination of the center of the field based on the WCS rather than the DEC header keyword.
- Returns:
declination in degrees
- Return type:
- gemini_instruments.gemini.get_specphot_name(ad)[source]
Return the name of the specphotometric standard of which this AD object is an observation, or None if it is not an observation of a specphot. The name is returned in a whitespace-stripped, all-lowercase format corresponding to the filename containing the specphot data in geminidr.gemini.lookups.spectrophotometric_standards
We match to within 2” regardless of name, or a 5’ (sic) match if the name matches. We have found cases where the PMRA/PMDEC keywords in the header (which are used by the target_ra/dec descriptors) are wrong or zero and so there is a larger positional disagreement than you might have thought.
- Parameters:
ad (AstroData object which might be a specphot standard) –
- Returns:
str/None
- Return type:
name of the standard (or None if it’s not a standard)
- gemini_instruments.gemini.use_keyword_if_prepared(fn)[source]
A decorator for descriptors. If decorated, the descriptor will bypass its main code on “PREPARED” data in favour of simply returning the value of the associated header keyword (as defined by the “_keyword_for” method) if this exists in all the headers (if the keyword is missing, it will execute the code in the descriptor method).
Submodules
gemini_instruments.gemini.adclass module
- class gemini_instruments.gemini.adclass.AstroDataGemini(nddata=None, tables=None, phu=None, indices=None, is_single=False)[source]
Bases:
AstroData
- amp_read_area(pretty=False)[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)
- ao_seeing()[source]
Returns an estimate of the natural seeing as calculated from the adaptive optics systems.
- Returns:
AO estimate of the natural seeing
- Return type:
- array_name()[source]
Returns the name of each array
- Returns:
the array names
- Return type:
list of str/str
- array_section(pretty=False)[source]
Returns the section covered by the array(s) relative to the detector frame. For example, this can be the position of multiple amps read within a CCD. If pretty is False, a tuple of 0-based coordinates is returned with format (x1, x2, y1, y2). If pretty is True, a keyword value is returned without parsing as a string. In this format, the coordinates are generally 1-based.
One tuple or string is return per extension/array, in a list. If the method is called on a single slice, the section is returned as a tuple or a string.
- Parameters:
pretty (bool) – If True, return the formatted string found in the header.
- Returns:
tuple of integers or list of tuples – Position of extension(s) using Python slice values
str/list of str – Position of extension(s) using an IRAF section format (1-based)
- calibration_key()[source]
Returns an object to be used as a key in the Calibrations dict. Multiple ADs can share a key but there can be only one of each type of calibration for each key. data_label() is the default. “_stack” is removed to avoid making a new request for a stacked frame, which will need the same calibration as the original.
- Returns:
identifier
- Return type:
string
- camera(stripID=False, pretty=False)[source]
Returns the name of the camera. The component ID can be removed with either ‘stripID’ or ‘pretty’ set to True.
- cass_rotator_pa()[source]
Returns the position angle of the Cassegrain rotator, in degrees.
- Returns:
Position angle of the Cassegrain rotator.
- Return type:
- central_wavelength(asMicrometers=False, asNanometers=False, asAngstroms=False)[source]
Returns the central wavelength in meters or the specified units
- coadds()[source]
Returns the number of co-adds used for the observation.
- Returns:
Number of co-adds.
- Return type:
- data_label()[source]
Returns the data label of an observation.
- Returns:
the observation’s data label
- Return type:
- data_section(pretty=False)[source]
Returns the rectangular section that includes the pixels that would be exposed to light. If pretty is False, a tuple of 0-based coordinates is returned with format (x1, x2, y1, y2). If pretty is True, a keyword value is returned without parsing as a string. In this format, the coordinates are generally 1-based.
One tuple or string is return per extension/array, in a list. If the method is called on a single slice, the section is returned as a tuple or a string.
- Parameters:
pretty (bool) – If True, return the formatted string found in the header.
- Returns:
tuple of integers or list of tuples – Location of the pixels exposed to light using Python slice values.
string or list of strings – Location of the pixels exposed to light using an IRAF section format (1-based).
- dec()[source]
Returns the Declination of the center of the field, in degrees.
- Returns:
declination in degrees
- Return type:
- decker(stripID=False, pretty=False)[source]
Returns the name of the decker. The component ID can be removed with either ‘stripID’ or ‘pretty’ set to True.
- detector_name(pretty=False)[source]
Returns the name of the detector
- Returns:
the detector name
- Return type:
- detector_roi_setting()[source]
Returns the ROI setting. Most instruments don’t allow this to be changed, so at the Gemini level it just returns ‘Fixed’
- Returns:
Name of the ROI setting used, ie, “Fixed”
- Return type:
- detector_rois_requested()[source]
Returns the ROIs requested. Since most instruments don’t have selectable ROIs, it returns None at the Gemini level
- Returns:
None
- Return type:
NoneType
- detector_section(pretty=False)[source]
Returns the section covered by the detector relative to the whole mosaic of detectors. If pretty is False, a tuple of 0-based coordinates is returned with format (x1, x2, y1, y2). If pretty is True, a keyword value is returned without parsing as a string. In this format, the coordinates are generally 1-based.
One tuple or string is return per extension/array, in a list. If the method is called on a single slice, the section is returned as a tuple or a string.
- Parameters:
pretty (bool) – If True, return the formatted string found in the header.
- Returns:
tuple of integers or list of tuples – Position of the detector using Python slice values.
string or list of strings – Position of the detector using an IRAF section format (1-based).
- detector_x_bin()[source]
Returns the detector binning in the x-direction
- Returns:
The detector binning
- Return type:
- detector_x_offset()[source]
Returns the offset from the reference position in pixels along the positive x-direction of the detector
- Returns:
The offset in pixels
- Return type:
- detector_y_bin()[source]
Returns the detector binning in the y-direction
- Returns:
The detector binning
- Return type:
- detector_y_offset()[source]
Returns the offset from the reference position in pixels along the positive y-direction of the detector
- Returns:
The offset in pixels
- Return type:
- disperser(stripID=False, pretty=False)[source]
Returns the name of the disperser. The “disperser” is a combination of all the dispersing elements along the light path.
The component ID can be removed with either ‘stripID’ or ‘pretty’ set to True.
- dispersion(asMicrometers=False, asNanometers=False, asAngstroms=False)[source]
Returns the dispersion in meters per pixel as a list (one value per extension) or a float if used on a single-extension slice. It is possible to control the units of wavelength using the input arguments.
- dispersion_axis()[source]
Returns the axis along which the light is dispersed.
- Returns:
Dispersion axis.
- Return type:
- effective_wavelength(output_units=None)[source]
Returns the wavelength representing the bandpass or the spectrum. For imaging data this normally is the wavelength at the center of the bandpass as defined by the filter used. For spectra, this is the central wavelength. The returned value is in meters.
This descriptor makes uses of a lookup table to associate filters with their effective_wavelength.
- Returns:
Wavelength representing the bandpass or the spectrum coverage.
- Return type:
- elevation()[source]
Returns the elevation of the telescope, in degrees
- Returns:
elevation
- Return type:
- filter_name(stripID=False, pretty=False)[source]
Returns the name of the filter(s) used. The component ID can be removed with either ‘stripID’ or ‘pretty’. If a combination of filters is used, the filter names will be join into a unique string with ‘&’ as separator. If ‘pretty’ is True, filter positions such as ‘Open’, ‘Dark’, ‘blank’, and others are removed leaving only the relevant filters in the string.
- focal_plane_mask(stripID=False, pretty=False)[source]
Returns the name of the focal plane mask. The component ID can be removed with either ‘stripID’ or ‘pretty’ set to True.
- gain()[source]
Returns the gain (electrons/ADU) for each extension
- Returns:
Gains used for the observation
- Return type:
list of floats/float
- gain_setting()[source]
Returns the gain setting for this observation (e.g., ‘high’, ‘low’)
- Returns:
the gain setting
- Return type:
- gcal_lamp()[source]
Returns the name of the GCAL lamp being used, or “Off” if no lamp is in used. This applies to flats and arc observations when a lamp is used. For other types observation, None is returned.
- Returns:
Name of the GCAL lamp being used, or “Off” if not in use.
- 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 and mode of observation will have its own rules.
At the Gemini class level, the default is to group by the Gemini observation ID.
- Returns:
A group ID for compatible data.
- Return type:
- instrument(generic=False)[source]
Returns the name of the instrument making the observation
- Parameters:
generic (boolean) – If set, don’t specify the specific instrument if there are clones (but that is handled by the instrument-level descriptors)
- Returns:
instrument name
- Return type:
- is_ao()[source]
Tells whether or not the data was taken with adaptive optics.
- Returns:
True if the data is AO, False otherwise.
- Return type:
- is_coadds_summed()[source]
Tells whether or not the co-adds have been summed. If not, they have been averaged.
At the Gemini level, this descriptor is hardcoded to True as it is the default at the observatory.
- Returns:
True if the data has been summed. False if it has been averaged.
- Return type:
- is_in_adu()[source]
Tells whether the data are in ADU (likely to be superseded by use of NDData’s unit attribute)
- Returns:
True if the data are in ADU
- Return type:
- local_time()[source]
Returns the local time stored at the time of the observation.
- Returns:
Local time of the observation.
- Return type:
datetime.datetime.time()
- mdf_row_id()[source]
Returns row ID from the MDF (Mask Definition File) table associated with the spectrum. Applies to “cut” MOS or X-dispersed data.
- Returns:
Row of the MDF associated with the extension.
- Return type:
- nominal_atmospheric_extinction()[source]
Returns the nominal atmospheric extinction at observation airmass and bandpass.
- Returns:
Nominal atmospheric extinction from model.
- Return type:
- nominal_photometric_zeropoint()[source]
Returns the nominal photometric zeropoint (i.e., magnitude corresponding to 1 pixel count) for each extension
- Returns:
Photometric zeropoint
- Return type:
float/list of floats
- non_linear_level()[source]
Returns the level at which the data become non-linear, in ADU. This is expected to be overridden by the individual instruments, so at the Gemini level it returns the values of the NONLINEA keywords (or None)
- Returns:
non-linearity level level in ADU
- Return type:
int/list
- observation_class()[source]
Returns the class of an observation, e.g., ‘science’, ‘acq’, ‘dayCal’.
- Returns:
the observation class
- Return type:
- observation_epoch()[source]
Returns the observation’s epoch.
- Returns:
the observation’s epoch
- Return type:
- observation_id()[source]
Returns the ID of an observation.
- Returns:
the observation ID
- Return type:
- observation_type()[source]
Returns the type of an observation, e.g., ‘OBJECT’, ‘FLAT’, ‘ARC’.
- Returns:
the observation type
- Return type:
- overscan_section(pretty=False)[source]
Returns the section covered by the overscan regions relative to the detector frame. If pretty is False, a tuple of 0-based coordinates is returned with format (x1, x2, y1, y2). If pretty is True, a keyword value is returned without parsing as a string. In this format, the coordinates are generally 1-based.
One tuple or string is return per extension/array. If more than one array, the tuples/strings are return in a list. Otherwise, the section is returned as a tuple or a string.
- Parameters:
pretty (bool) – If True, return the formatted string found in the header.
- Returns:
tuple of integers or list of tuples – Position of extension(s) using Python slice values
str/list of str – Position of extension(s) using an IRAF section format (1-based)
- pixel_scale()[source]
Returns the image scale in arcseconds per pixel, as an average over the extensions
- Returns:
the pixel scale
- Return type:
- program_id()[source]
Returns the ID of the program the observation was taken for
- Returns:
the program ID
- Return type:
- pupil_mask(stripID=False, pretty=False)[source]
Returns the name of the focal plane mask. The component ID can be removed with either ‘stripID’ or ‘pretty’ set to True.
- qa_state()[source]
Returns the Gemini quality assessment flags.
- Returns:
Gemini quality assessment flags.
- Return type:
- ra()[source]
Returns the Right Ascension of the center of the field, in degrees.
- Returns:
right ascension in degrees
- Return type:
- raw_bg()[source]
Returns the BG percentile band of the observation. BG refers to the sky/background brightness.
- Returns:
BG percentile band of the observation.
- Return type:
- raw_cc()[source]
Returns the CC percentile band of the observation. CC refers to the cloud coverage.
- Returns:
CC percentile band of the observation.
- Return type:
- raw_iq()[source]
Returns the IQ percentile band of the observation. IQ refers to the image quality or seeing.
- Returns:
IQ percentile band of the observation.
- Return type:
- raw_wv()[source]
Returns the WV percentile band of the observation. WV refers to the water vapor.
- Returns:
WV percentile band of the observation.
- Return type:
- read_mode()[source]
Returns the readout mode used for the observation
- Returns:
the read mode used
- Return type:
- read_noise()[source]
Returns the read noise in electrons for each extension. A list is returned unless called on a single-extension slice, when a float
- Returns:
the read noise
- Return type:
float/list of floats
- read_speed_setting()[source]
Returns the read speed setting for the observation
- Returns:
the read speed setting
- Return type:
- requested_bg()[source]
Returns the BG percentile band requested by the PI. BG refers to the sky/background brightness.
- Returns:
BG percentile band requested by the PI.
- Return type:
- requested_cc()[source]
Returns the CC percentile band requested by the PI. CC refers to the cloud coverage.
- Returns:
CC percentile band requested by the PI.
- Return type:
- requested_iq()[source]
Returns the IQ percentile band requested by the PI. IQ refers to the image quality or seeing.
- Returns:
IQ percentile band requested by the PI.
- Return type:
- requested_wv()[source]
Returns the WV percentile band requested by the PI. WV refers to the water vapor.
- Returns:
WV percentile band requested by the PI.
- Return type:
- saturation_level()[source]
Returns the saturation level of the data, in the units of the data. This is expected to be overridden by the individual instruments, so at the Gemini level it returns the values of the SATLEVEL keyword (or None).
- Returns:
saturation level (in units of the data)
- Return type:
list/float
- slit()[source]
Returns the name of the entrance slit used for the observation
- Returns:
the slit name
- Return type:
- target_dec(offset=False, pm=True, icrs=False)[source]
Returns the Declination of the target in degrees. Optionally, the telescope offsets can be applied. The proper motion can also be applied if requested. Finally, the RA can be converted to ICRS coordinates.
- target_ra(offset=False, pm=True, icrs=False)[source]
Returns the Right Ascension of the target in degrees. Optionally, the telescope offsets can be applied. The proper motion can also be applied if requested. Finally, the RA can be converted to ICRS coordinates.
- telescope_x_offset()[source]
Returns the telescope offset along the telescope x-axis, in arcseconds.
- Returns:
the telescope offset along the telescope x-axis (arcseconds)
- Return type:
- telescope_y_offset()[source]
Returns the telescope offset along the telescope y-axis, in arcseconds.
- Returns:
the telescope offset along the telescope y-axis (arcseconds)
- Return type:
- ut_date()[source]
Returns the UT date of the observation as a datetime object.
- Returns:
UT date.
- Return type:
- ut_datetime(strict=False, dateonly=False, timeonly=False)[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
- ut_time()[source]
Returns the UT time of the observation as a datetime object.
- Returns:
UT time.
- Return type:
- wavefront_sensor()[source]
Returns the name of the wavefront sensor used for the observation. If more than one is being used, the names will be joined with ‘&’.
- Returns:
Name of the wavefront sensor.
- Return type:
- wavelength_band()[source]
Returns the name of the bandpass of the observation. This is just to broadly know what type of data one is working with, eg. K band, H band, B band, etc.
- Returns:
Name of the bandpass.
- Return type:
- wcs_dec()[source]
Returns the Declination of the center of the field based on the WCS rather than the DEC header keyword.
- Returns:
declination in degrees
- Return type:
- gemini_instruments.gemini.adclass.get_specphot_name(ad)[source]
Return the name of the specphotometric standard of which this AD object is an observation, or None if it is not an observation of a specphot. The name is returned in a whitespace-stripped, all-lowercase format corresponding to the filename containing the specphot data in geminidr.gemini.lookups.spectrophotometric_standards
We match to within 2” regardless of name, or a 5’ (sic) match if the name matches. We have found cases where the PMRA/PMDEC keywords in the header (which are used by the target_ra/dec descriptors) are wrong or zero and so there is a larger positional disagreement than you might have thought.
- Parameters:
ad (AstroData object which might be a specphot standard) –
- Returns:
str/None
- Return type:
name of the standard (or None if it’s not a standard)
- gemini_instruments.gemini.adclass.use_keyword_if_prepared(fn)[source]
A decorator for descriptors. If decorated, the descriptor will bypass its main code on “PREPARED” data in favour of simply returning the value of the associated header keyword (as defined by the “_keyword_for” method) if this exists in all the headers (if the keyword is missing, it will execute the code in the descriptor method).