gemini_instruments.gmos package

class gemini_instruments.gmos.AstroDataGmos(provider)[source]

Bases: AstroDataGemini

amp_read_area()[source]

Returns a list of amplifier read areas, one per extension, made by combining the amplifier name and detector section. Or returns a string if called on a single-extension slice.

Returns

read_area of each extension

Return type

list/str

array_name()[source]

Returns a list of the names of the arrays of the extensions, or a string if called on a single-extension slice

Returns

names of the arrays

Return type

list/str

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

Returns the central wavelength in meters or 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

detector_name(pretty=False)[source]

Returns the name(s) of the detector(s), from the PHU DETID keyword. Calling with pretty=True will provide a single descriptive string.

Parameters

pretty (bool) – If True, return a single descriptive string

Returns

detector name

Return type

str

detector_roi_setting()[source]

Looks at the first ROI and returns a descriptive string describing it These are more or less the options in the OT

Returns

Name of the ROI setting used or “Custom” if the ROI doesn’t match “Undefined” if there’s no ROI in the header

Return type

str

detector_rois_requested()[source]

Returns a list of ROIs, as tuples in a 1-based inclusive (IRAF-like) format (x1, x2, y1, y2), in physical (unbinned) pixels.

Return type

list of tuples, one per ROI

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 used for the observation. In GMOS, the disperser is a grating.

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

  • pretty (bool, also removed the trailing '+') – If True,

Returns

name of the grating

Return type

str

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

Returns the dispersion in meters per binned 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

(list of) int (1)

exposure_time()[source]

Returns the exposure time in seconds.

Returns

Exposure time.

Return type

float

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

Returns the name of the focal plane mask.

Parameters
  • stripID (bool) – Doesn’t actually do anything.

  • pretty (bool) – Same as for stripID

Returns

The name of the focal plane mask

Return type

str

gain()[source]

Returns the gain (electrons/ADU) for each extension

Returns

Gains used for the observation

Return type

list/float

gain_setting()[source]

Returns the gain settings of the observation.

Returns

Gain setting

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.

GMOS uses the detector binning, amp_read_area, gain_setting, and read_speed_setting. Flats and twilights have the pretty version of the filter name included. Science data have the pretty filter name and observation_id as well. And spectroscopic data have the grating. Got all that?

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 (e.g., return “GMOS” rather than “GMOS-N” or “GMOS-S”)

Returns

instrument name

Return type

str

nod_count()[source]

Returns a tuple with the number of integrations made in each of the nod-and-shuffle positions

Returns

number of integrations in the A and B positions

Return type

tuple

nod_offsets()[source]

Returns a tuple with the offsets from the default telescope position of the A and B nod-and-shuffle positions (in arcseconds)

Returns

offsets in arcseconds

Return type

tuple

nominal_photometric_zeropoint()[source]

Returns the nominal zeropoints (i.e., the magnitude corresponding to a pixel value of 1) for the extensions in an AD object. Zeropoints in table are for electrons, so subtract 2.5*lg(gain) if the data are in ADU

Returns

zeropoint values, one per SCI extension

Return type

float/list

non_linear_level()[source]

Returns the level at which the data become non-linear, in ADU. For GMOS, this is just the saturation level.

Returns

Value(s) at which the data become non-linear

Return type

int/list

overscan_section(pretty=False)[source]

Returns the overscan (or bias) section. 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 the overscan section using Python slice values.

  • string or list of strings – Position of the overscan section using an IRAF section format (1-based).

pixel_scale()[source]

Returns the image scale in arcsec per pixel, accounting for binning

Returns

pixel scale

Return type

float

read_mode()[source]

Returns a string describing the readout mode, which sets the gain and readout speed

Returns

read mode used

Return type

str

read_noise()[source]

Returns the read noise in electrons. Returns a list if multiple extensions, or a float on a single-extension slice.

Returns

read noise

Return type

float/list

read_speed_setting()[source]

Returns the setting for the readout speed (slow or fast)

Returns

the setting for the readout speed

Return type

str

saturation_level()[source]

Returns the saturation level (in ADU)

Returns

saturation level

Return type

int/list

shuffle_pixels()[source]

Returns the number of rows that the charge has been shuffled, in nod-and-shuffle data

Returns

The number of rows by which the charge is shuffled

Return type

int

wcs_dec()[source]

Returns the Declination of the center of the field based on the WCS rather than the DEC keyword. This just uses the CRVAL2 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 keyword. This just uses the CRVAL1 keyword.

Returns

right ascension in degrees

Return type

float

Subpackages

Submodules

gemini_instruments.gmos.adclass module

class gemini_instruments.gmos.adclass.AstroDataGmos(provider)[source]

Bases: AstroDataGemini

amp_read_area()[source]

Returns a list of amplifier read areas, one per extension, made by combining the amplifier name and detector section. Or returns a string if called on a single-extension slice.

Returns

read_area of each extension

Return type

list/str

array_name()[source]

Returns a list of the names of the arrays of the extensions, or a string if called on a single-extension slice

Returns

names of the arrays

Return type

list/str

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

Returns the central wavelength in meters or 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

detector_name(pretty=False)[source]

Returns the name(s) of the detector(s), from the PHU DETID keyword. Calling with pretty=True will provide a single descriptive string.

Parameters

pretty (bool) – If True, return a single descriptive string

Returns

detector name

Return type

str

detector_roi_setting()[source]

Looks at the first ROI and returns a descriptive string describing it These are more or less the options in the OT

Returns

Name of the ROI setting used or “Custom” if the ROI doesn’t match “Undefined” if there’s no ROI in the header

Return type

str

detector_rois_requested()[source]

Returns a list of ROIs, as tuples in a 1-based inclusive (IRAF-like) format (x1, x2, y1, y2), in physical (unbinned) pixels.

Return type

list of tuples, one per ROI

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 used for the observation. In GMOS, the disperser is a grating.

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

  • pretty (bool, also removed the trailing '+') – If True,

Returns

name of the grating

Return type

str

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

Returns the dispersion in meters per binned 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

(list of) int (1)

exposure_time()[source]

Returns the exposure time in seconds.

Returns

Exposure time.

Return type

float

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

Returns the name of the focal plane mask.

Parameters
  • stripID (bool) – Doesn’t actually do anything.

  • pretty (bool) – Same as for stripID

Returns

The name of the focal plane mask

Return type

str

gain()[source]

Returns the gain (electrons/ADU) for each extension

Returns

Gains used for the observation

Return type

list/float

gain_setting()[source]

Returns the gain settings of the observation.

Returns

Gain setting

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.

GMOS uses the detector binning, amp_read_area, gain_setting, and read_speed_setting. Flats and twilights have the pretty version of the filter name included. Science data have the pretty filter name and observation_id as well. And spectroscopic data have the grating. Got all that?

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 (e.g., return “GMOS” rather than “GMOS-N” or “GMOS-S”)

Returns

instrument name

Return type

str

nod_count()[source]

Returns a tuple with the number of integrations made in each of the nod-and-shuffle positions

Returns

number of integrations in the A and B positions

Return type

tuple

nod_offsets()[source]

Returns a tuple with the offsets from the default telescope position of the A and B nod-and-shuffle positions (in arcseconds)

Returns

offsets in arcseconds

Return type

tuple

nominal_photometric_zeropoint()[source]

Returns the nominal zeropoints (i.e., the magnitude corresponding to a pixel value of 1) for the extensions in an AD object. Zeropoints in table are for electrons, so subtract 2.5*lg(gain) if the data are in ADU

Returns

zeropoint values, one per SCI extension

Return type

float/list

non_linear_level()[source]

Returns the level at which the data become non-linear, in ADU. For GMOS, this is just the saturation level.

Returns

Value(s) at which the data become non-linear

Return type

int/list

overscan_section(pretty=False)[source]

Returns the overscan (or bias) section. 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 the overscan section using Python slice values.

  • string or list of strings – Position of the overscan section using an IRAF section format (1-based).

pixel_scale()[source]

Returns the image scale in arcsec per pixel, accounting for binning

Returns

pixel scale

Return type

float

read_mode()[source]

Returns a string describing the readout mode, which sets the gain and readout speed

Returns

read mode used

Return type

str

read_noise()[source]

Returns the read noise in electrons. Returns a list if multiple extensions, or a float on a single-extension slice.

Returns

read noise

Return type

float/list

read_speed_setting()[source]

Returns the setting for the readout speed (slow or fast)

Returns

the setting for the readout speed

Return type

str

saturation_level()[source]

Returns the saturation level (in ADU)

Returns

saturation level

Return type

int/list

shuffle_pixels()[source]

Returns the number of rows that the charge has been shuffled, in nod-and-shuffle data

Returns

The number of rows by which the charge is shuffled

Return type

int

wcs_dec()[source]

Returns the Declination of the center of the field based on the WCS rather than the DEC keyword. This just uses the CRVAL2 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 keyword. This just uses the CRVAL1 keyword.

Returns

right ascension in degrees

Return type

float

gemini_instruments.gmos.lookup module

gemini_instruments.gmos.pixel_functions module

gemini_instruments.gmos.pixel_functions.get_bias_level(adinput=None, estimate=True)[source]