gemini_instruments.f2 package
- class gemini_instruments.f2.AstroDataF2(nddata=None, tables=None, phu=None, indices=None, is_single=False)[source]
Bases:
AstroDataGemini
- array_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).
- camera(stripID=False, pretty=False)[source]
Returns the string defining the f-ratio being used.
- Returns:
The string that defines the f-ratio which changes depending on whether AO is used or not. Historical value.
- Return type:
string
- central_wavelength(asMicrometers=False, asNanometers=False, asAngstroms=False)[source]
Returns the central wavelength in meters or the specified units For F2, central wavelength is specified for the middle of the grism + filter transmission window, not for the central row.
- 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_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:
- 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:
- 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:
(list of) int (2)
- filter_name(stripID=False, pretty=False, keepID=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:
- Returns:
The name of the filter combination with or without the component ID.
- Return type:
- focal_plane_mask(stripID=False, pretty=False)[source]
Returns the focal plane mask used for the observation. This is generally the MASKNAME header. For imaging data, MASKNAME sometimes has strange values, so we check MOSPOS and if MOSPOS is ‘Open’ we return that for consistency.
The stripID and pretty arguments are ignored.
- Returns:
focal plane mask name, or None
- Return type:
- 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 and mode of observation will have its own rules. F2’s is quite a mouthful.
- Returns:
A group ID for compatible data.
- Return type:
- lyot_stop()[source]
Returns the LYOT stop used for the observation. This works around inconsistencies in the header keywords.
- Returns:
LYOT stop name, or None
- Return type:
- 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.
- Returns:
zeropoint values, one per SCI extension
- Return type:
list/float
- 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
- observation_type()[source]
Returns the observation type (OBJECT, DARK, BIAS, etc.)
- Returns:
Observation type
- Return type:
- pixel_scale()[source]
Returns the image scale in arcseconds per pixel
- Returns:
pixel scale
- Return type:
- position_angle()[source]
Returns the position angle of the instruement
- Returns:
the position angle (East of North) of the +ve y-direction
- Return type:
- read_mode()[source]
Returns the read mode (i.e., the number of non-destructive read pairs)
- Returns:
readout mode
- Return type:
- 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
Submodules
gemini_instruments.f2.adclass module
- class gemini_instruments.f2.adclass.AstroDataF2(nddata=None, tables=None, phu=None, indices=None, is_single=False)[source]
Bases:
AstroDataGemini
- array_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).
- camera(stripID=False, pretty=False)[source]
Returns the string defining the f-ratio being used.
- Returns:
The string that defines the f-ratio which changes depending on whether AO is used or not. Historical value.
- Return type:
string
- central_wavelength(asMicrometers=False, asNanometers=False, asAngstroms=False)[source]
Returns the central wavelength in meters or the specified units For F2, central wavelength is specified for the middle of the grism + filter transmission window, not for the central row.
- 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_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:
- 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:
- 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:
(list of) int (2)
- filter_name(stripID=False, pretty=False, keepID=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:
- Returns:
The name of the filter combination with or without the component ID.
- Return type:
- focal_plane_mask(stripID=False, pretty=False)[source]
Returns the focal plane mask used for the observation. This is generally the MASKNAME header. For imaging data, MASKNAME sometimes has strange values, so we check MOSPOS and if MOSPOS is ‘Open’ we return that for consistency.
The stripID and pretty arguments are ignored.
- Returns:
focal plane mask name, or None
- Return type:
- 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 and mode of observation will have its own rules. F2’s is quite a mouthful.
- Returns:
A group ID for compatible data.
- Return type:
- lyot_stop()[source]
Returns the LYOT stop used for the observation. This works around inconsistencies in the header keywords.
- Returns:
LYOT stop name, or None
- Return type:
- 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.
- Returns:
zeropoint values, one per SCI extension
- Return type:
list/float
- 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
- observation_type()[source]
Returns the observation type (OBJECT, DARK, BIAS, etc.)
- Returns:
Observation type
- Return type:
- pixel_scale()[source]
Returns the image scale in arcseconds per pixel
- Returns:
pixel scale
- Return type:
- position_angle()[source]
Returns the position angle of the instruement
- Returns:
the position angle (East of North) of the +ve y-direction
- Return type:
- read_mode()[source]
Returns the read mode (i.e., the number of non-destructive read pairs)
- Returns:
readout mode
- Return type:
- 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
gemini_instruments.f2.lookup module
- class gemini_instruments.f2.lookup.ArrayProperties(readnoise, gain, welldepth, linlimit, nonlinlimit, coeffs)
Bases:
tuple
- coeffs
Alias for field number 5
- gain
Alias for field number 1
- linlimit
Alias for field number 3
- nonlinlimit
Alias for field number 4
- readnoise
Alias for field number 0
- welldepth
Alias for field number 2