gemini_instruments.niri package

class gemini_instruments.niri.AstroDataNiri(nddata=None, tables=None, phu=None, indices=None, is_single=False)[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

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

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

Returns the gain (electrons/ADU) for each extension

Returns:

Gains used for the observation

Return type:

list of floats/float

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

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

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

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

saturation_level()

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_width()[source]

Returns the width of the slit in arcseconds

Returns:

the slit width in arcseconds

Return type:

float/None

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

Submodules

gemini_instruments.niri.adclass module

class gemini_instruments.niri.adclass.AstroDataNiri(nddata=None, tables=None, phu=None, indices=None, is_single=False)[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

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

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

Returns the gain (electrons/ADU) for each extension

Returns:

Gains used for the observation

Return type:

list of floats/float

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

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

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

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

saturation_level()

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_width()[source]

Returns the width of the slit in arcseconds

Returns:

the slit width in arcseconds

Return type:

float/None

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.CenwaveAndRes(cenwave, cenpixwave, resolution)

Bases: tuple

cenpixwave

Alias for field number 1

cenwave

Alias for field number 0

resolution

Alias for field number 2

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

Bases: tuple

eta

Alias for field number 3

gamma

Alias for field number 2

max_counts

Alias for field number 0

time_delta

Alias for field number 1