MUSE specific tools (
Python interface for MUSE slicer numbering scheme¶
Slicer class contains a set of static methods to convert
a slice number between the various numbering schemes. The definition of the
various numbering schemes and the conversion table can be found in the “Global
Positioning System” document (VLT-TRE-MUSE-14670-0657).
All the methods are static and thus there is no need to instantiate an object to use this class.
For example, we convert slice number 4 in CCD numbering to SKY numbering:
In : from mpdaf.MUSE import Slicer In : Slicer.ccd2sky(4) Out: 10
Now we convert slice number 12 of stack 3 in OPTICAL numbering to CCD numbering:
In : Slicer.optical2sky((2, 12)) Out: 25
MUSE LSF models¶
LSF class is currently under development
Only one model of LSF (Line Spread Function) is currently available.
This is a simple model where the LSF is supposed to be constant over the filed of view. It uses a simple parametric model of variation with wavelength.
The model is a convolution of a step function with a Gaussian. The resulting function is then sample by the pixel size:
LSF = T(y2+dy/2) - T(y2-dy/2) - T(y1+dy/2) + T(y1-dy/2) T(x) = exp(-x**2/2) + sqrt(2*pi)*x*erf(x/sqrt(2))/2 y1 = (y-h/2) / sigma y2 = (y+h/2) / sigma
The slit width is assumed to be constant (h = 2.09 pixels). The Gaussian sigma parameter is a polynomial approximation of order 3 with wavelength:
c = [-0.09876662, 0.44410609, -0.03166038, 0.46285363] sigma(x) = c + c*x + c*x**2 + c*x**3
To use it, create a
LSF object with attribute ‘typ’ equal to
In : from mpdaf.MUSE import LSF In : lsf = LSF(typ='qsim_v1')
Then get the LSF array by using
In : lsf_6000 = lsf.get_LSF(lbda=6000, step=1.25, size=11) In : import matplotlib.pyplot as plt In : import numpy as np In : plt.plot(np.arange(-5,6), lsf_6000, drawstyle='steps-mid') Out: [<matplotlib.lines.Line2D at 0x7f1b51585908>]
MUSE FSF models¶
FSF class is currently under development
Two models of FSF (Field Spread Function) are currently available:
model='MOFFAT1'): the old model with a fixed beta.
model=2): a circular MOFFAT with polynomials for beta and FWHM.
Example with MOFFAT1¶
The MUSE FSF is supposed to be a Moffat function with a FWHM which varies linearly with the wavelength:
\(FWHM = a + b * lbda\)
- beta (float) Power index of the Moffat.
- a (float) constant in arcsec which defined the FWHM.
- b (float) constant which defined the FWHM.
We create the
FSFModel object like this:
In : from mpdaf.MUSE import FSFModel, OldMoffatModel In : fsf = OldMoffatModel(a=0.885, b=-2.94E-05, beta=2.8, pixstep=0.2) In : isinstance(fsf, FSFModel) Out: True
Various methods allow to get the FSF array (2D or 3D, as mpdaf Image or Cube) for given wavelengths, or the FWHM in pixel and in arcseconds.
In : lbda = np.array([5000, 9000]) In : fsf.get_fwhm(lbda) Out: array([0.738 , 0.6204]) In : fsf.get_fwhm(lbda, unit='pix')