scopesim.effects.metis_lms_trace_list module¶
SpectralTraceList and SpectralTrace for the METIS LM spectrograph.
- class scopesim.effects.metis_lms_trace_list.MetisLMSEfficiency(**kwargs)[source]¶
Bases:
TERCurve
Computes the grating efficiency (blaze function) for the METIS LMS.
The procedure is described in E-REP-ATC-MET-1016_1.0. For a given order (determined by the central wavelength) the grating efficiency is modelled as a squared sinc function of wavelength via the grating angle.
- class scopesim.effects.metis_lms_trace_list.MetisLMSImageSlicer(filename, ext_id='Aperture List', **kwargs)[source]¶
Bases:
ApertureMask
Treats the METIS LMS image slicer as an aperture mask effect.
This helps in building a
FieldOfView
object that combines the spatial field of the slicer with the spectral range covered by the LMS setting.The effect differs from its parent class
ApertureMask
in the initialisation from the Aperture List extension of the trace file !OBS.trace_file.
- class scopesim.effects.metis_lms_trace_list.MetisLMSSpectralTrace(hdulist, spslice, params, **kwargs)[source]¶
Bases:
SpectralTrace
SpectralTrace for the METIS LM spectrograph.
- compute_interpolation_functions()[source]¶
Define the transforms between (xi, lam) and (x, y).
The LMS transforms actually operate on phase rather than wavelength, hence the necessity of defining pre- and posttransforms on the lam variable.
- fov_grid()[source]¶
Provide information on the source space volume required by the effect.
- Returns:
- A dictionary with entries wave_min and wave_max, x_min, y_min,
- x_max, y_max. Spatial limits refer to the sky and are given in
- arcsec.
- get_matrices()[source]¶
Extract matrix from lms_dist_poly.txt.
Evaluate polynomial to obtain matrices A, B, AI and BI at grism angle given echelle order and slice number
- Parameters:
- orderint
Echelle order
- spsliceint
Slice number
- anglefloat
Grism angle in degrees
- Returns:
- dict of four np.arrays of shape (4, 4) each
- get_waverange(det_mm_lims)[source]¶
Determine wavelength range covered by spec. trace on image plane.
- lam2phase(lam)[source]¶
Convert wavelength to phase.
Phase is lam * order / (2 * grat_spacing).
- Parameters:
- lamndarray (float)
wavelength (um)
- Returns:
- Phasendarray
- class scopesim.effects.metis_lms_trace_list.MetisLMSSpectralTraceList(**kwargs)[source]¶
Bases:
SpectralTraceList
SpectralTraceList for the METIS LM spectrograph.
- rectify_cube(hdulist, xi_min=None, xi_max=None, interps=None, **kwargs)[source]¶
Rectify an IFU observation into a data cube
The HDU list (or fits file) must have been created with the present OpticalTrain (or an identically configured one).
- Parameters:
- hduliststr or fits.HDUList
an ifu observation created with the present OpticalTrain
- xi_min, xi_maxfloat [arcsec]
Spatial limits of the image slicer on the sky. For METIS LMS, these values need not be provided by the user.
- interpslist of interpolation functions
If provided, there must be one for each image extension in hdulist. The functions go from pixels to the images and can be created with, e.g., RectBivariateSpline.
- scopesim.effects.metis_lms_trace_list.echelle_setting(wavelength, grat_spacing, wcal_def)[source]¶
Determine optimal echelle rotation angle for wavelength.
- Parameters:
- lambdafloat
central wavelength in microns
- grat_spacingfloat
grating rule spacing in microns
- wcal_def: fits.TableHDU, fits.BinTableHDU, Table, str
definition of the wavelength calibration parameters If str, interpreted as name of a fits file, with a table extension ‘WCAL’.
- Returns:
- a dict with entries
- Ord: echelle order
- Angle: grism angle
- Phase: phase