pypeit.spectrographs.gtc_osiris module
Module for GTC OSIRIS specific methods.
- class pypeit.spectrographs.gtc_osiris.GTCMAATSpectrograph[source]
Bases:
GTCOSIRISPlusSpectrograph
- classmethod default_pypeit_par()[source]
Return the default parameters to use for this instrument.
- Returns:
Parameters required by all of PypeIt methods.
- Return type:
- get_datacube_bins(slitlength, minmax, num_wave)[source]
Calculate the bin edges to be used when making a datacube.
- Parameters:
slitlength (
int
) – Length of the slit in pixelsminmax (numpy.ndarray) – An array with the minimum and maximum pixel locations on each slit relative to the reference location (usually the centre of the slit). Shape must be \((N_{\rm slits},2)\), and is typically the array returned by
get_radec_image()
.num_wave (
int
) –- Number of wavelength steps. Given by::
int(round((wavemax-wavemin)/delta_wave))
:param
tuple
: Three 1D numpy.ndarray providing the bins to use :param when constructing a histogram of the spec2d files. The elements: :param are \(: :type are :math:\): x,y,lambda
- get_wcs(hdr, slits, platescale, wave0, dwv, spatial_scale=None)[source]
Construct/Read a World-Coordinate System for a frame.
- Parameters:
hdr (astropy.io.fits.Header) – The header of the raw frame. The information in this header will be extracted and returned as a WCS.
slits (
SlitTraceSet
) – Slit traces.platescale (
float
) – The platescale of an unbinned pixel in arcsec/pixel (e.g. detector.platescale).wave0 (
float
) – The wavelength zeropoint.dwv (
float
) – Change in wavelength per spectral pixel.
- Returns:
The world-coordinate system.
- Return type:
- init_meta()[source]
Define how metadata are derived from the spectrograph files.
That is, this associates the PypeIt-specific metadata keywords with the instrument-specific header cards using
meta
.
- name = 'gtc_maat'
The name of the spectrograph. See Spectrographs for the currently supported spectrographs.
- pypeline = 'SlicerIFU'
String used to select the general pipeline approach for this spectrograph.
- class pypeit.spectrographs.gtc_osiris.GTCOSIRISPlusSpectrograph[source]
Bases:
Spectrograph
Child of Spectrograph to handle GTC/OSIRIS specific code
- bpm(filename, det, shape=None, msbias=None)[source]
Generate a default bad-pixel mask.
Even though they are both optional, either the precise shape for the image (
shape
) or an example file that can be read to get the shape (filename
usingget_image_shape()
) must be provided.- Parameters:
filename (
str
or None) – An example file to use to get the image shape.det (
int
) – 1-indexed detector number to use when getting the image shape from the example file.shape (tuple, optional) – Processed image shape Required if filename is None Ignored if filename is not None
msbias (numpy.ndarray, optional) – Processed bias frame used to identify bad pixels. This is ignored for KCWI.
- Returns:
An integer array with a masked value set to 1 and an unmasked value set to 0. All values are set to 0.
- Return type:
- camera = 'OSIRIS'
Name of the spectrograph camera or arm. This is used by specdb, so use that naming convention
- check_frame_type(ftype, fitstbl, exprng=None)[source]
Check for frames of the provided type.
- Parameters:
ftype (
str
) – Type of frame to check. Must be a valid frame type; see frame-type Definitions.fitstbl (astropy.table.Table) – The table with the metadata for one or more frames to check.
exprng (
list
, optional) – Range in the allowed exposure time for a frame of typeftype
. Seepypeit.core.framematch.check_frame_exptime()
.
- Returns:
Boolean array with the flags selecting the exposures in
fitstbl
that areftype
type frames.- Return type:
- comment = 'See :doc:`gtc_osiris`'
A brief comment or description regarding PypeIt usage with this spectrograph.
- compound_meta(headarr, meta_key)[source]
Methods to generate metadata requiring interpretation of the header data, instead of simply reading the value of a header card.
- Parameters:
headarr (
list
) – List of astropy.io.fits.Header objects.meta_key (
str
) – Metadata keyword to construct.
- Returns:
Metadata value read from the header(s).
- Return type:
- config_independent_frames()[source]
Define frame types that are independent of the fully defined instrument configuration.
Bias and dark frames are considered independent of a configuration. Standards are assigned to the correct configuration frame group by grism (i.e. ignoring that they are taken with a wider slit). See
set_configurations()
.- Returns:
Dictionary where the keys are the frame types that are configuration independent and the values are the metadata keywords that can be used to assign the frames to a configuration group.
- Return type:
- config_specific_par(scifile, inp_par=None)[source]
Modify the PypeIt parameters to hard-wired values used for specific instrument configurations.
- Parameters:
scifile (
str
) – File to use when determining the configuration and how to adjust the input parameters.inp_par (
ParSet
, optional) – Parameter set used for the full run of PypeIt. If None, usedefault_pypeit_par()
.
- Returns:
The PypeIt parameter set adjusted for configuration specific parameter values.
- Return type:
- configuration_keys()[source]
Return the metadata keys that define a unique instrument configuration.
This list is used by
PypeItMetaData
to identify the unique configurations among the list of frames read for a given reduction.- Returns:
List of keywords of data pulled from file headers and used to constuct the
PypeItMetaData
object.- Return type:
- classmethod default_pypeit_par()[source]
Return the default parameters to use for this instrument.
- Returns:
Parameters required by all of PypeIt methods.
- Return type:
- get_detector_par(det, hdu=None)[source]
Return metadata for the selected detector.
Detector data from here.
- Parameters:
det (
int
) – 1-indexed detector number.hdu (astropy.io.fits.HDUList, optional) – The open fits file with the raw image of interest. If not provided, frame-dependent parameters are set to a default.
- Returns:
Object with the detector metadata.
- Return type:
- header_name = 'OSIRIS'
Name of the spectrograph camera or arm from the Header. Usually the INSTRUME card.
- init_meta()[source]
Define how metadata are derived from the spectrograph files.
That is, this associates the PypeIt-specific metadata keywords with the instrument-specific header cards using
meta
.
- name = 'gtc_osiris_plus'
The name of the spectrograph. See Spectrographs for the currently supported spectrographs.
- ndet = 1
Number of detectors for this instrument.
- raw_header_cards()[source]
Return additional raw header cards to be propagated in downstream output files for configuration identification.
The list of raw data FITS keywords should be those used to populate the
configuration_keys()
or are used inconfig_specific_par()
for a particular spectrograph, if different from the name of the PypeIt metadata keyword.This list is used by
subheader_for_spec()
to include additional FITS keywords in downstream output files.- Returns:
List of keywords from the raw data files that should be propagated in output files.
- Return type:
- supported = True
Flag that PypeIt code base has been sufficiently tested with data from this spectrograph that it is officially supported by the development team.
- telescope = Parameter Value Default Type Callable ---------------------------------------------------------------- name GTC KECK str False longitude -17.879999999999995 None int, float False latitude 28.758333333333336 None int, float False elevation 2326.999999998442 None int, float False fratio None None int, float False diameter None None int, float False eff_aperture 73.0 None int, float False
Instance of
TelescopePar
providing telescope-specific metadata.
- url = 'http://www.gtc.iac.es/instruments/osiris/'
Reference url
- class pypeit.spectrographs.gtc_osiris.GTCOSIRISSpectrograph[source]
Bases:
Spectrograph
Child of Spectrograph to handle GTC/OSIRIS specific code (old detector: MAT-44-82)
- bpm(filename, det, shape=None, msbias=None)[source]
Generate a default bad-pixel mask.
Even though they are both optional, either the precise shape for the image (
shape
) or an example file that can be read to get the shape (filename
usingget_image_shape()
) must be provided.- Parameters:
filename (
str
or None) – An example file to use to get the image shape.det (
int
) – 1-indexed detector number to use when getting the image shape from the example file.shape (tuple, optional) – Processed image shape Required if filename is None Ignored if filename is not None
msbias (numpy.ndarray, optional) – Processed bias frame used to identify bad pixels. This is ignored for KCWI.
- Returns:
An integer array with a masked value set to 1 and an unmasked value set to 0. All values are set to 0.
- Return type:
- camera = 'OSIRIS'
Name of the spectrograph camera or arm. This is used by specdb, so use that naming convention
- check_frame_type(ftype, fitstbl, exprng=None)[source]
Check for frames of the provided type.
- Parameters:
ftype (
str
) – Type of frame to check. Must be a valid frame type; see frame-type Definitions.fitstbl (astropy.table.Table) – The table with the metadata for one or more frames to check.
exprng (
list
, optional) – Range in the allowed exposure time for a frame of typeftype
. Seepypeit.core.framematch.check_frame_exptime()
.
- Returns:
Boolean array with the flags selecting the exposures in
fitstbl
that areftype
type frames.- Return type:
- comment = 'See :doc:`gtc_osiris`'
A brief comment or description regarding PypeIt usage with this spectrograph.
- compound_meta(headarr, meta_key)[source]
Methods to generate metadata requiring interpretation of the header data, instead of simply reading the value of a header card.
- Parameters:
headarr (
list
) – List of astropy.io.fits.Header objects.meta_key (
str
) – Metadata keyword to construct.
- Returns:
Metadata value read from the header(s).
- Return type:
- config_independent_frames()[source]
Define frame types that are independent of the fully defined instrument configuration.
Bias and dark frames are considered independent of a configuration. Standards are assigned to the correct configuration frame group by grism (i.e. ignoring that they are taken with a wider slit). See
set_configurations()
.- Returns:
Dictionary where the keys are the frame types that are configuration independent and the values are the metadata keywords that can be used to assign the frames to a configuration group.
- Return type:
- config_specific_par(scifile, inp_par=None)[source]
Modify the PypeIt parameters to hard-wired values used for specific instrument configurations.
- Parameters:
scifile (
str
) – File to use when determining the configuration and how to adjust the input parameters.inp_par (
ParSet
, optional) – Parameter set used for the full run of PypeIt. If None, usedefault_pypeit_par()
.
- Returns:
The PypeIt parameter set adjusted for configuration specific parameter values.
- Return type:
- configuration_keys()[source]
Return the metadata keys that define a unique instrument configuration.
This list is used by
PypeItMetaData
to identify the unique configurations among the list of frames read for a given reduction.- Returns:
List of keywords of data pulled from file headers and used to constuct the
PypeItMetaData
object.- Return type:
- classmethod default_pypeit_par()[source]
Return the default parameters to use for this instrument.
- Returns:
Parameters required by all of PypeIt methods.
- Return type:
- get_detector_par(det, hdu=None)[source]
Return metadata for the selected detector.
Detector data from here.
- Parameters:
det (
int
) – 1-indexed detector number.hdu (astropy.io.fits.HDUList, optional) – The open fits file with the raw image of interest. If not provided, frame-dependent parameters are set to a default.
- Returns:
Object with the detector metadata.
- Return type:
- header_name = 'OSIRIS'
Name of the spectrograph camera or arm from the Header. Usually the INSTRUME card.
- init_meta()[source]
Define how metadata are derived from the spectrograph files.
That is, this associates the PypeIt-specific metadata keywords with the instrument-specific header cards using
meta
.
- name = 'gtc_osiris'
The name of the spectrograph. See Spectrographs for the currently supported spectrographs.
- ndet = 2
Number of detectors for this instrument.
- raw_header_cards()[source]
Return additional raw header cards to be propagated in downstream output files for configuration identification.
The list of raw data FITS keywords should be those used to populate the
configuration_keys()
or are used inconfig_specific_par()
for a particular spectrograph, if different from the name of the PypeIt metadata keyword.This list is used by
subheader_for_spec()
to include additional FITS keywords in downstream output files.- Returns:
List of keywords from the raw data files that should be propagated in output files.
- Return type:
- supported = True
Flag that PypeIt code base has been sufficiently tested with data from this spectrograph that it is officially supported by the development team.
- telescope = Parameter Value Default Type Callable ---------------------------------------------------------------- name GTC KECK str False longitude -17.879999999999995 None int, float False latitude 28.758333333333336 None int, float False elevation 2326.999999998442 None int, float False fratio None None int, float False diameter None None int, float False eff_aperture 73.0 None int, float False
Instance of
TelescopePar
providing telescope-specific metadata.
- url = 'http://www.gtc.iac.es/instruments/osiris/'
Reference url