gemini_instruments.niri package

class gemini_instruments.niri.AstroDataNiri(provider)[source]

Bases: AstroDataGemini

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)

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

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

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_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_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_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 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) – Does nothing. Exists for compatibility.

Returns

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

Return type

str

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

Returns the name of the filter(s) used. If a combination of filters is used, the filter names will be join into a unique string with ‘&’ as separator. The component IDs can be removed from the filter names. Alternatively, a single descriptive filter name can be returned, based on a lookup table.

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

  • pretty (bool) – Returns a single filter name

Returns

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

Return type

str

gain()[source]

Returns the gain (electrons/ADU) for each extension

Returns

gain

Return type

float/list

group_id()[source]

Returns a string representing a group of data that are compatible with each other. This is used when stacking, for example. Each instrument, mode of observation, and data type will have its own rules.

Returns

A group ID for compatible data.

Return type

str

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 ADU level at which the data become non-linear. A list is returned with a value for each extension (i.e., one value for NIRI) unless called on a single-extension slice.

Returns

non-linearity level in ADU

Return type

int/list

nonlinearity_coeffs()[source]

Returns a namedtuple containing the necessary information to perform a nonlinearity correction.

Returns

nonlinearity info (max counts, exptime correction, gamma, eta)

Return type

namedtuple/list

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

Returns the name of the pupil mask used for the observation

Returns

the pupil mask

Return type

str

read_mode()[source]

Returns the readout mode used for the observation. This has one of 3 settings, depending on the number of reads and averages. If these numbers do not conform to a standard setting, ‘Invalid’ is returned

Returns

the read mode used

Return type

str

read_noise()[source]

Returns the read noise in electrons, as a list unless called on a single-extension slice.

Returns

read noise

Return type

float/list

saturation_level()[source]

Returns the saturation level of the data, in ADU.

Returns

saturation level in ADU

Return type

int/list

well_depth_setting()[source]

Returns a string describing the well-depth setting of the instrument. NIRI has ‘Shallow’ and ‘Deep’ options. ‘Invalid’ is returned if the bias voltage doesn’t match either setting.

Returns

the well-depth setting

Return type

str

Subpackages

Submodules

gemini_instruments.niri.adclass module

class gemini_instruments.niri.adclass.AstroDataNiri(provider)[source]

Bases: AstroDataGemini

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)

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

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

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_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_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_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 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) – Does nothing. Exists for compatibility.

Returns

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

Return type

str

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

Returns the name of the filter(s) used. If a combination of filters is used, the filter names will be join into a unique string with ‘&’ as separator. The component IDs can be removed from the filter names. Alternatively, a single descriptive filter name can be returned, based on a lookup table.

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

  • pretty (bool) – Returns a single filter name

Returns

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

Return type

str

gain()[source]

Returns the gain (electrons/ADU) for each extension

Returns

gain

Return type

float/list

group_id()[source]

Returns a string representing a group of data that are compatible with each other. This is used when stacking, for example. Each instrument, mode of observation, and data type will have its own rules.

Returns

A group ID for compatible data.

Return type

str

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 ADU level at which the data become non-linear. A list is returned with a value for each extension (i.e., one value for NIRI) unless called on a single-extension slice.

Returns

non-linearity level in ADU

Return type

int/list

nonlinearity_coeffs()[source]

Returns a namedtuple containing the necessary information to perform a nonlinearity correction.

Returns

nonlinearity info (max counts, exptime correction, gamma, eta)

Return type

namedtuple/list

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

Returns the name of the pupil mask used for the observation

Returns

the pupil mask

Return type

str

read_mode()[source]

Returns the readout mode used for the observation. This has one of 3 settings, depending on the number of reads and averages. If these numbers do not conform to a standard setting, ‘Invalid’ is returned

Returns

the read mode used

Return type

str

read_noise()[source]

Returns the read noise in electrons, as a list unless called on a single-extension slice.

Returns

read noise

Return type

float/list

saturation_level()[source]

Returns the saturation level of the data, in ADU.

Returns

saturation level in ADU

Return type

int/list

well_depth_setting()[source]

Returns a string describing the well-depth setting of the instrument. NIRI has ‘Shallow’ and ‘Deep’ options. ‘Invalid’ is returned if the bias voltage doesn’t match either setting.

Returns

the well-depth setting

Return type

str

gemini_instruments.niri.lookup module

class gemini_instruments.niri.lookup.NonLinCoeffs(max_counts, time_delta, gamma, eta)

Bases: tuple

property eta

Alias for field number 3

property gamma

Alias for field number 2

property max_counts

Alias for field number 0

property time_delta

Alias for field number 1