MoffatModel2

class mpdaf.MUSE.MoffatModel2(fwhm_pol, beta_pol, lbrange, pixstep, field=0)[source]

Bases: mpdaf.MUSE.FSFModel

Attributes Summary

model

name

Methods Summary

convolve(self, cfwhm[, samp, nlbda, size, …])

Convolve the FSF with a Gaussian kernel

from_header(hdr, pixstep[, field])

Read FSF parameters from a FITS header

from_hstconv(cube, hstimages[, lbrange])

Compute FSF by convolution of HST images

from_psfrec(rawfilename, \*\*kwargs)

Compute FSF parameters from GLAO MUSE PSF reconstruction

from_starfit(cube, pos[, size, nslice, …])

Fit a FSF model on a point source

get_2darray(self, lbda, shape[, center])

Return FSF 2D array at the given wavelength.

get_3darray(self, lbda, shape[, center])

Return FSF cube at the given wavelengths.

get_beta(self, lbda)

Return beta for the given wavelengths.

get_cube(self, wave, wcs[, center])

Return FSF cube at the given wavelengths.

get_fwhm(self, lbda[, unit])

Return FWHM for the given wavelengths.

get_image(self, lbda, wcs[, center])

Return FSF image at the given wavelength.

info(self)

read(cube[, field, pixstep])

Read the FSF model from a file, cube, or header.

to_header(self[, hdr, field_idx])

Write FSF parameters to a FITS header

Attributes Documentation

model = 2
name = 'Circular MOFFAT beta=poly(lbda) fwhm=poly(lbda)'

Methods Documentation

convolve(self, cfwhm, samp=10, nlbda=20, size=21, full_output=False)[source]

Convolve the FSF with a Gaussian kernel

Parameters
cfwhmfloat

Gaussian FWHM in arcsec

sampint

Resampling factor

nlbdaint

Number of wavelengths

sizeint

Image FSF size in pixel

full_output: bool

If True, return an additional dictionary

Returns
fsfMoffatModel2

fsf model

resdict

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

classmethod from_header(hdr, pixstep, field=0)[source]

Read FSF parameters from a FITS header

classmethod from_hstconv(cube, hstimages, lbrange=(5000, 9000), **kwargs)

Compute FSF by convolution of HST images

classmethod from_psfrec(rawfilename, **kwargs)[source]

Compute FSF parameters from GLAO MUSE PSF reconstruction

classmethod from_starfit(cube, pos, size=5, nslice=20, fwhmdeg=3, betadeg=3, lbrange=(5000, 9000))[source]

Fit a FSF model on a point source

cube: input datacube pos: (dec,ra) location of the source in deg size: size of region to extract around the source in arcsec nslice: number of wavelength slices to used fwhmdeg: degre for polynomial fit of FWHM(lbda) betadeg: degre for polynomial fit of Beta(lbda) lbdarange: (lbda1,lbda2) tuple of reference wavelength for normalisation return an FSF object and intermediate fitting results as .fit attribute

get_2darray(self, lbda, shape, center=None)

Return FSF 2D array at the given wavelength.

get_3darray(self, lbda, shape, center=None)

Return FSF cube at the given wavelengths.

get_beta(self, lbda)[source]

Return beta for the given wavelengths.

get_cube(self, wave, wcs, center=None)

Return FSF cube at the given wavelengths.

get_fwhm(self, lbda, unit='arcsec')[source]

Return FWHM for the given wavelengths.

get_image(self, lbda, wcs, center=None)

Return FSF image at the given wavelength.

info(self)[source]
classmethod read(cube, field=None, pixstep=None)

Read the FSF model from a file, cube, or header.

Parameters
cubestr, mpdaf.obj.Cube, or astropy.io.fits.Header

Must contain a header with a FSF model.

fieldint

Field number to read, otherwise all models are read.

to_header(self, hdr=None, field_idx=0)[source]

Write FSF parameters to a FITS header