MoffatModel2¶
- class mpdaf.MUSE.MoffatModel2(fwhm_pol, beta_pol, lbrange, pixstep, field=0)[source]¶
Bases:
FSFModel
Circular MOFFAT beta=poly(lbda) fwhm=poly(lbda).
Create a FSF object
- Parameters:
- fwhm_pol
list
list of polynome coefficients for FWHM(l):
FWHM(l) = fwhm_pol[0] * l**deg + ... + fwhm_pol[deg] l = (lbda - lb1) / (lb2 - lb1) - 0.5
- beta_pol
list
list of polynome coefficients for beta(l)
- lbrange
tuple
lb1,lb2 wavelengths used for wavelength normalisation
- pixstep
float
spaxel value in arcsec
- field
int
field location in case of multiple FSF
- fwhm_pol
- Returns:
- fsf
MoffatModel2
fsf model
- fsf
Attributes Summary
Methods Summary
convolve
(cfwhm[, samp, nlbda, size, full_output])Convolve the FSF with a Gaussian kernel
from_FSFlist
(imalist, lbda, fwhm0, beta0[, ...])Fit a FSF model on a point source
from_header
(hdr, pixstep[, field])Read FSF from file header
from_hstconv
(cube, hstimages[, lbrange])Compute FSF by convolution of HST images
from_psfrec
(rawfilename, **kwargs)Compute Reconstructed FSF from AO telemetry
from_starfit
(cube, pos[, size, nslice, ...])Fit a FSF model on a point source
get_2darray
(lbda, shape[, center])Return FSF 2D array at the given wavelength.
get_3darray
(lbda, shape[, center])Return FSF cube at the given wavelengths.
get_beta
(lbda)Return beta values
get_cube
(wave, wcs[, center])Return FSF cube at the given wavelengths.
get_fwhm
(lbda[, unit])Return FWHM
get_image
(lbda, wcs[, center])Return FSF image at the given wavelength.
info
()Print fsf model information
read
(cube[, field, pixstep])Read the FSF model from a file, cube, or header.
to_header
([hdr, field_idx])Write FSF in file header
Attributes Documentation
- model = 2¶
- name = 'Circular MOFFAT beta=poly(lbda) fwhm=poly(lbda)'¶
Methods Documentation
- convolve(cfwhm, samp=10, nlbda=20, size=21, full_output=False)[source]¶
Convolve the FSF with a Gaussian kernel
- Parameters:
- Returns:
- fsf
MoffatModel2
fsf model
- res
dict
res[‘lbda’]: wavelengths res[‘fwhm0’]: initial FWHM values res[‘fwhm1’]: FWHM values after convolution res[‘beta0’]: initial BETA values res[‘beta1’]: BETA values after convolution
- fsf
- classmethod from_FSFlist(imalist, lbda, fwhm0, beta0, fwhmdeg=3, betadeg=3, lbrange=(5000, 9000))[source]¶
Fit a FSF model on a point source
- Parameters:
- imalist
List
ofmpdaf.obj.Image
List of FSF images
- lbda
array
Wavelength vector corresponding to the list of FSFs
- fwhm0
float
Value used to initialize the FWHM in the Moffat fit
- beta0
float
Value used to initialize the beta parameter in the Moffat fit
- fwhmdeg
int
degre for polynomial fit of FWHM(lbda)
- betadeg
int
degre for polynomial fit of Beta(lbda)
- lbdarange: tuple of float
(lbda1,lbda2) reference wavelengths for normalisation
- imalist
- Returns:
- fsf
MoffatModel2
fsf model
- fsf
- classmethod from_header(hdr, pixstep, field=0)[source]¶
Read FSF from file header
- Parameters:
- hdr
astropy.io.fits.Header
FITS header
- pixstep
float
spaxel value in arcsec
- hdr
- Returns:
- fsf
MoffatModel2
fsf model
- fsf
- classmethod from_hstconv(cube, hstimages, lbrange=(5000, 9000), **kwargs)¶
Compute FSF by convolution of HST images
- classmethod from_psfrec(rawfilename, **kwargs)[source]¶
- Compute Reconstructed FSF from AO telemetry
Need muse_psfrec external python module.
- Parameters:
- rawfilename
str
MUSE raw file name with AO telemetry information
- rawfilename
- Returns:
- fsf
MoffatModel2
fsf model
- fsf
- classmethod from_starfit(cube, pos, size=5, nslice=20, fwhmdeg=3, betadeg=3, lbrange=(5000, 9000), factor=1, saveimafit=False)[source]¶
Fit a FSF model on a point source
- Parameters:
- cube
mpdaf.obj.Cube
input datacube
- pos
tuple
offloat
(dec,ra) location of the source in deg
- size
float
size of region to extract around the source in arcsec
- nslice
int
number of wavelength slices to used
- fwhmdeg
int
degre for polynomial fit of FWHM(lbda)
- betadeg
int
degre for polynomial fit of Beta(lbda)
- lbdarange: tuple of float
(lbda1,lbda2) reference wavelengths for normalisation
- factor: int
subsampling factor used in moffat fit
- cube
- Returns:
- fsf
MoffatModel2
fsf model with intermediate fitting results as .fit attribute
- fsf.fitdict
center : array of fitted star location wave : array of wavelengths fwhmfit : array of fitted FWHM fwhmerr : array of errors in FWHM returned by the fit fwhmpol : list of FWHM polynomial betafit : array of fitted beta betaerr : array of errors in beta returned by the fit betapol : list of beta polynomial center0 : first iteration of fitted star location fwhm0 : first iteration of fitted FWHM beta0 : first iteration of fitted beta ima : list of images used in the fit
- fsf
- get_2darray(lbda, shape, center=None)¶
Return FSF 2D array at the given wavelength.
- get_3darray(lbda, shape, center=None)¶
Return FSF cube at the given wavelengths.
- get_cube(wave, wcs, center=None)¶
Return FSF cube at the given wavelengths.
- get_image(lbda, wcs, center=None)¶
Return FSF image at the given wavelength.
- classmethod read(cube, field=None, pixstep=None)¶
Read the FSF model from a file, cube, or header.
- Parameters:
- cube
str
,mpdaf.obj.Cube
, orastropy.io.fits.Header
Must contain a header with a FSF model.
- field
int
Field number to read, otherwise all models are read.
- cube
- to_header(hdr=None, field_idx=0)[source]¶
Write FSF in file header
- Parameters:
- hdr
astropy.io.fits.Header
FITS header
- field_idx
int
field index
- hdr
- Returns:
- hdr
astropy.io.fits.Header
FITS header
- hdr