gemini_instruments.gemini package

class gemini_instruments.gemini.AstroDataGemini(provider)[source]

Bases: AstroDataFits

airmass()[source]

Returns the airmass of the observation.

Returns

Airmass value.

Return type

float

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

float

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)

azimuth()[source]

Returns the azimuth of the telescope, in degrees

Returns

azimuth

Return type

float

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.

Parameters
  • stripID (bool) – If True, removes the component ID and returns only the name of the camera.

  • pretty (bool) – Same as for stripID. Pretty here does not do anything more.

Returns

The name of the camera with or without the component ID.

Return type

str

cass_rotator_pa()[source]

Returns the position angle of the Cassegrain rotator, in degrees.

Returns

Position angle of the Cassegrain rotator.

Return type

float

central_wavelength(asMicrometers=False, asNanometers=False, asAngstroms=False)[source]

Returns the central wavelength in meters or the specified units

Parameters
  • asMicrometers (bool) – If True, return the wavelength in microns

  • asNanometers (bool) – If True, return the wavelength in nanometers

  • asAngstroms (bool) – If True, return the wavelength in Angstroms

Returns

The central wavelength setting

Return type

float

coadds()[source]

Returns the number of co-adds used for the observation.

Returns

Number of co-adds.

Return type

int

data_label()[source]

Returns the data label of an observation.

Returns

the observation’s data label

Return type

str

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

float

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.

Parameters
  • stripID (bool) – If True, removes the component ID and returns only the name of the decker.

  • pretty (bool) – Same as for stripID. Pretty here does not do anything more.

Returns

The name of the decker with or without the component ID.

Return type

str

detector_name(pretty=False)[source]

Returns the name of the detector

Returns

the detector name

Return type

str

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

str

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

int

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

float

detector_y_bin()[source]

Returns the detector binning in the y-direction

Returns

The detector binning

Return type

int

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

float

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.

Parameters
  • stripID (bool) – If True, removes the component ID and returns only the name of the disperser.

  • pretty (bool) – Same as for stripID. Pretty here does not do anything more.

Returns

The name of the disperser with or without the component ID.

Return type

str

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.

Parameters
  • asMicrometers (bool) – If True, return the wavelength in microns

  • asNanometers (bool) – If True, return the wavelength in nanometers

  • asAngstroms (bool) – If True, return the wavelength in Angstroms

Returns

The dispersion(s)

Return type

list/float

dispersion_axis()[source]

Returns the axis along which the light is dispersed.

Returns

Dispersion axis.

Return type

int

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

float

elevation()[source]

Returns the elevation of the telescope, in degrees

Returns

elevation

Return type

float

exposure_time()[source]

Returns the exposure time in seconds.

Returns

Exposure time.

Return type

float

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.

Parameters
  • stripID (bool) – If True, removes the component ID and returns only the name of the filter.

  • pretty (bool) – Same as for stripID. Pretty here does not do anything more.

Returns

The name of the filter combination with or without the component ID.

Return type

str

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.

Parameters
  • stripID (bool) – If True, removes the component ID and returns only the name of the focal plane mask.

  • pretty (bool) – Same as for stripID. Pretty here does not do anything more.

Returns

The name of the focal plane mask with or without the component ID.

Return type

str

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

str

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

str

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

str

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

str

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

bool

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

bool

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

bool

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()

lyot_stop(stripID=False, pretty=False)[source]

Returns the Lyot stop used for the observation

Parameters
  • stripID (bool) – If True, removes the component ID.

  • pretty (bool) – Same as for stripID.

Returns

Lyot stop used for the observation

Return type

str

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

int

nominal_atmospheric_extinction()[source]

Returns the nominal atmospheric extinction at observation airmass and bandpass.

Returns

Nominal atmospheric extinction from model.

Return type

float

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

str

observation_epoch()[source]

Returns the observation’s epoch.

Returns

the observation’s epoch

Return type

str

observation_id()[source]

Returns the ID of an observation.

Returns

the observation ID

Return type

str

observation_type()[source]

Returns the type of an observation, e.g., ‘OBJECT’, ‘FLAT’, ‘ARC’.

Returns

the observation type

Return type

str

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

float

program_id()[source]

Returns the ID of the program the observation was taken for

Returns

the program ID

Return type

str

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.

Parameters
  • stripID (bool) – If True, removes the component ID and returns only the name of the focal plane mask.

  • pretty (bool) – Same as for stripID. Pretty here does not do anything more.

Returns

The name of the focal plane mask with or without the component ID.

Return type

str

qa_state()[source]

Returns the Gemini quality assessment flags.

Returns

Gemini quality assessment flags.

Return type

str

ra()[source]

Returns the Right Ascension of the center of the field, in degrees.

Returns

right ascension in degrees

Return type

float

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

str

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

str

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

str

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

str

read_mode()[source]

Returns the readout mode used for the observation

Returns

the read mode used

Return type

str

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

str

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

str

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

str

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

str

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

str

saturation_level()[source]

Returns the saturation level of the data, in ADU. This is expected to be overridden by the individual instruments, so at the Gemini level it returns the values of the SATLEVEL keywords (or None)

Returns

saturation level in ADU

Return type

list/float

slit()[source]

Returns the name of the entrance slit used for the observation

Returns

the slit name

Return type

str

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.

Parameters
  • offset (bool) – If True, applies the telescope offsets.

  • pm (bool) – If True, applies proper motion parameters.

  • icrs (bool) – If True, convert the Declination to the ICRS coordinate system.

Returns

Declination of the target in degrees.

Return type

float

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.

Parameters
  • offset (bool) – If True, applies the telescope offsets.

  • pm (bool) – If True, applies proper motion parameters.

  • icrs (bool) – If True, convert the RA to the ICRS coordinate system.

Returns

Right Ascension of the target in degrees.

Return type

float

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

float

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

float

ut_date()[source]

Returns the UT date of the observation as a datetime object.

Returns

UT date.

Return type

datetime.datetime

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
  • strict (bool) – if True, only information in the header can be used

  • dateonly (bool) – if True, return a date object with just the date

  • timeonly (bool) – if True, return a time object with just the time

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

datetime.datetime

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

str

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

str

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

float

wcs_ra()[source]

Returns the Right Ascension of the center of the field based on the WCS rather than the RA header keyword.

Returns

right ascension in degrees

Return type

float

well_depth_setting()[source]

Returns a string describing the well-depth setting of the instrument

Returns

the well-depth setting

Return type

str

gemini_instruments.gemini.addInstrumentFilterWavelengths(instrument, wl)[source]

Subpackages

Submodules

gemini_instruments.gemini.adclass module

class gemini_instruments.gemini.adclass.AstroDataGemini(provider)[source]

Bases: AstroDataFits

airmass()[source]

Returns the airmass of the observation.

Returns

Airmass value.

Return type

float

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

float

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)

azimuth()[source]

Returns the azimuth of the telescope, in degrees

Returns

azimuth

Return type

float

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.

Parameters
  • stripID (bool) – If True, removes the component ID and returns only the name of the camera.

  • pretty (bool) – Same as for stripID. Pretty here does not do anything more.

Returns

The name of the camera with or without the component ID.

Return type

str

cass_rotator_pa()[source]

Returns the position angle of the Cassegrain rotator, in degrees.

Returns

Position angle of the Cassegrain rotator.

Return type

float

central_wavelength(asMicrometers=False, asNanometers=False, asAngstroms=False)[source]

Returns the central wavelength in meters or the specified units

Parameters
  • asMicrometers (bool) – If True, return the wavelength in microns

  • asNanometers (bool) – If True, return the wavelength in nanometers

  • asAngstroms (bool) – If True, return the wavelength in Angstroms

Returns

The central wavelength setting

Return type

float

coadds()[source]

Returns the number of co-adds used for the observation.

Returns

Number of co-adds.

Return type

int

data_label()[source]

Returns the data label of an observation.

Returns

the observation’s data label

Return type

str

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

float

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.

Parameters
  • stripID (bool) – If True, removes the component ID and returns only the name of the decker.

  • pretty (bool) – Same as for stripID. Pretty here does not do anything more.

Returns

The name of the decker with or without the component ID.

Return type

str

detector_name(pretty=False)[source]

Returns the name of the detector

Returns

the detector name

Return type

str

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

str

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

int

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

float

detector_y_bin()[source]

Returns the detector binning in the y-direction

Returns

The detector binning

Return type

int

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

float

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.

Parameters
  • stripID (bool) – If True, removes the component ID and returns only the name of the disperser.

  • pretty (bool) – Same as for stripID. Pretty here does not do anything more.

Returns

The name of the disperser with or without the component ID.

Return type

str

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.

Parameters
  • asMicrometers (bool) – If True, return the wavelength in microns

  • asNanometers (bool) – If True, return the wavelength in nanometers

  • asAngstroms (bool) – If True, return the wavelength in Angstroms

Returns

The dispersion(s)

Return type

list/float

dispersion_axis()[source]

Returns the axis along which the light is dispersed.

Returns

Dispersion axis.

Return type

int

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

float

elevation()[source]

Returns the elevation of the telescope, in degrees

Returns

elevation

Return type

float

exposure_time()[source]

Returns the exposure time in seconds.

Returns

Exposure time.

Return type

float

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.

Parameters
  • stripID (bool) – If True, removes the component ID and returns only the name of the filter.

  • pretty (bool) – Same as for stripID. Pretty here does not do anything more.

Returns

The name of the filter combination with or without the component ID.

Return type

str

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.

Parameters
  • stripID (bool) – If True, removes the component ID and returns only the name of the focal plane mask.

  • pretty (bool) – Same as for stripID. Pretty here does not do anything more.

Returns

The name of the focal plane mask with or without the component ID.

Return type

str

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

str

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

str

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

str

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

str

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

bool

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

bool

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

bool

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()

lyot_stop(stripID=False, pretty=False)[source]

Returns the Lyot stop used for the observation

Parameters
  • stripID (bool) – If True, removes the component ID.

  • pretty (bool) – Same as for stripID.

Returns

Lyot stop used for the observation

Return type

str

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

int

nominal_atmospheric_extinction()[source]

Returns the nominal atmospheric extinction at observation airmass and bandpass.

Returns

Nominal atmospheric extinction from model.

Return type

float

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

str

observation_epoch()[source]

Returns the observation’s epoch.

Returns

the observation’s epoch

Return type

str

observation_id()[source]

Returns the ID of an observation.

Returns

the observation ID

Return type

str

observation_type()[source]

Returns the type of an observation, e.g., ‘OBJECT’, ‘FLAT’, ‘ARC’.

Returns

the observation type

Return type

str

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

float

program_id()[source]

Returns the ID of the program the observation was taken for

Returns

the program ID

Return type

str

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.

Parameters
  • stripID (bool) – If True, removes the component ID and returns only the name of the focal plane mask.

  • pretty (bool) – Same as for stripID. Pretty here does not do anything more.

Returns

The name of the focal plane mask with or without the component ID.

Return type

str

qa_state()[source]

Returns the Gemini quality assessment flags.

Returns

Gemini quality assessment flags.

Return type

str

ra()[source]

Returns the Right Ascension of the center of the field, in degrees.

Returns

right ascension in degrees

Return type

float

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

str

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

str

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

str

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

str

read_mode()[source]

Returns the readout mode used for the observation

Returns

the read mode used

Return type

str

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

str

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

str

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

str

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

str

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

str

saturation_level()[source]

Returns the saturation level of the data, in ADU. This is expected to be overridden by the individual instruments, so at the Gemini level it returns the values of the SATLEVEL keywords (or None)

Returns

saturation level in ADU

Return type

list/float

slit()[source]

Returns the name of the entrance slit used for the observation

Returns

the slit name

Return type

str

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.

Parameters
  • offset (bool) – If True, applies the telescope offsets.

  • pm (bool) – If True, applies proper motion parameters.

  • icrs (bool) – If True, convert the Declination to the ICRS coordinate system.

Returns

Declination of the target in degrees.

Return type

float

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.

Parameters
  • offset (bool) – If True, applies the telescope offsets.

  • pm (bool) – If True, applies proper motion parameters.

  • icrs (bool) – If True, convert the RA to the ICRS coordinate system.

Returns

Right Ascension of the target in degrees.

Return type

float

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

float

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

float

ut_date()[source]

Returns the UT date of the observation as a datetime object.

Returns

UT date.

Return type

datetime.datetime

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
  • strict (bool) – if True, only information in the header can be used

  • dateonly (bool) – if True, return a date object with just the date

  • timeonly (bool) – if True, return a time object with just the time

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

datetime.datetime

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

str

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

str

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

float

wcs_ra()[source]

Returns the Right Ascension of the center of the field based on the WCS rather than the RA header keyword.

Returns

right ascension in degrees

Return type

float

well_depth_setting()[source]

Returns a string describing the well-depth setting of the instrument

Returns

the well-depth setting

Return type

str

gemini_instruments.gemini.lookup module