pypeit.spectrographs.vlt_xshooter module
Module for VLT X-Shooter
- class pypeit.spectrographs.vlt_xshooter.VLTXShooterNIRSpectrograph[source]
Bases:
VLTXShooterSpectrograph
Child to handle VLT/XSHOOTER 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
- 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 = 'XShooter_NIR'
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:`xshooter`'
A brief comment or description regarding PypeIt usage with this spectrograph.
- classmethod default_pypeit_par()[source]
Return the default parameters to use for this instrument.
- Returns:
Parameters required by all of PypeIt methods.
- Return type:
- property dloglam
Return the logarithmic step in wavelength for output spectra.
- get_detector_par(det, hdu=None)[source]
Return metadata for the selected detector.
- 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:
- 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
.
- property loglam_minmax
Return the base-10 logarithm of the first and last wavelength for ouput spectra.
- name = 'vlt_xshooter_nir'
The name of the spectrograph. See Spectrographs for the currently supported spectrographs.
- property norders
Number of orders for this spectograph. Should only defined for echelle spectrographs, and it is undefined for the base class.
- order_platescale(order_vec, binning=None)[source]
Return the platescale for each echelle order.
This routine is only defined for echelle spectrographs, and it is undefined in the base class.
- Parameters:
order_vec (numpy.ndarray) – The vector providing the order numbers.
binning (
str
, optional) – The string defining the spectral and spatial binning.
- Returns:
An array with the platescale for each order provided by
order
.- Return type:
- property order_spat_pos
Return the expected spatial position of each echelle order.
- property orders
Return the order number for each echelle order.
- pypeit_file_keys()[source]
Define the list of keys to be output into a standard PypeIt file.
- Returns:
The list of keywords in the relevant
PypeItMetaData
instance to print to the PypeIt Reduction File.- Return type:
- property spec_min_max
Return the minimum and maximum spectral pixel expected for the spectral range of each order.
- 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.
- class pypeit.spectrographs.vlt_xshooter.VLTXShooterSpectrograph[source]
Bases:
Spectrograph
Child to handle VLT/XSHOOTER specific code
- 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:
- 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.
This method returns a dictionary where the keys of the dictionary are the list of configuration-independent frame types. The value of each dictionary element can be set to one or more metadata keys that can be used to assign each frame type to a given configuration group. See
set_configurations()
and how it interprets the dictionary values, which can be None.- 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:
- 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 construct the
PypeItMetaData
object.- Return type:
- ech_fixed_format = True
If an echelle spectrograph, this will be set to a boolean indicating whether it is a fixed format or tiltable echelle.
- header_name = 'XSHOOTER'
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
.
- ndet = 1
Number of detectors for this instrument.
- pypeit_file_keys()[source]
Define the list of keys to be output into a standard PypeIt file.
- Returns:
The list of keywords in the relevant
PypeItMetaData
instance to print to the PypeIt Reduction File.- Return type:
- pypeline = 'Echelle'
String used to select the general pipeline approach for this spectrograph.
- 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:
- telescope = Parameter Value Default Type Callable ---------------------------------------------------------------- name VLT KECK str False longitude -70.40498688000002 None int, float False latitude -24.627439409999997 None int, float False elevation 2668.999999999649 None int, float False fratio None None int, float False diameter 8.2 None int, float False eff_aperture 51.2 None int, float False
Instance of
TelescopePar
providing telescope-specific metadata.
- url = 'https://www.eso.org/sci/facilities/paranal/instruments/xshooter.html'
Reference url
- class pypeit.spectrographs.vlt_xshooter.VLTXShooterUVBSpectrograph[source]
Bases:
VLTXShooterSpectrograph
Child to handle VLT/XSHOOTER specific code for the UVB arm
- 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
- 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 = 'XShooter_UVB'
Name of the spectrograph camera or arm. This is used by specdb, so use that naming convention
- comment = 'See :doc:`xshooter`'
A brief comment or description regarding PypeIt usage with this spectrograph.
- 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.
- 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:
- 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 = 'vlt_xshooter_uvb'
The name of the spectrograph. See Spectrographs for the currently supported spectrographs.
- property norders
Number of orders observed for this spectograph.
- order_platescale(order_vec, binning=None)[source]
Return the platescale for each echelle order.
This routine is only defined for echelle spectrographs, and it is undefined in the base class.
- Parameters:
order_vec (numpy.ndarray) – The vector providing the order numbers.
binning (
str
, optional) – The string defining the spectral and spatial binning.
- Returns:
An array with the platescale for each order provided by
order
.- Return type:
- property order_spat_pos
Return the expected spatial position of each echelle order.
The following lines generated the values below:
from pypeit import edgetrace edges = edgetrace.EdgeTraceSet.from_file('Edges_A_1_DET01.fits.gz') nrm_edges = edges.edge_fit[edges.nspec//2,:] / edges.nspat slit_cen = ((nrm_edges + np.roll(nrm_edges,1))/2)[np.arange(nrm_edges.size//2)*2+1]
- property orders
Return the order number for each echelle order.
- property spec_min_max
Return the minimum and maximum spectral pixel expected for the spectral range of each order.
- 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.
- class pypeit.spectrographs.vlt_xshooter.VLTXShooterVISSpectrograph[source]
Bases:
VLTXShooterSpectrograph
Child to handle VLT/XSHOOTER 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
- 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 = 'XShooter_VIS'
Name of the spectrograph camera or arm. This is used by specdb, so use that naming convention
- comment = 'See :doc:`xshooter`'
A brief comment or description regarding PypeIt usage with this spectrograph.
- classmethod default_pypeit_par()[source]
Return the default parameters to use for this instrument.
- Returns:
Parameters required by all of PypeIt methods.
- Return type:
- property dloglam
Return the logarithmic step in wavelength for output spectra.
- get_detector_par(det, hdu=None)[source]
Return metadata for the selected detector.
- 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:
- 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
.
- property loglam_minmax
Return the base-10 logarithm of the first and last wavelength for ouput spectra.
- name = 'vlt_xshooter_vis'
The name of the spectrograph. See Spectrographs for the currently supported spectrographs.
- property norders
Number of orders observed for this spectograph.
- order_platescale(order_vec, binning=None)[source]
Return the platescale for each echelle order.
This routine is only defined for echelle spectrographs, and it is undefined in the base class.
- Parameters:
order_vec (numpy.ndarray) – The vector providing the order numbers.
binning (
str
, optional) – The string defining the spectral and spatial binning.
- Returns:
An array with the platescale for each order provided by
order
.- Return type:
- property order_spat_pos
Return the expected spatial position of each echelle order.
- property orders
Return the order number for each echelle order.
- property spec_min_max
Return the minimum and maximum spectral pixel expected for the spectral range of each order.
- 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.