unitTests module

unitTests.testCreateFlatfield(par, pixsize=0.1, npix=512, pixval=1.0, Nspec=45, outname='flatfield.fits', useQE=True, method='optext')[source]

Creates a polychromatic flatfield

Parameters:

par : Parameter instance

Contains all IFS parameters

pixsize: float

Pixel scale (lam/D)

npix: int

Each input frame has a pixel size npix x npix

pixval: float

Each input frame has a unform value pixval in photons per second per nm of bandwidth

Nspec: float

Optional input forcing the number of wavelengths bins used

outname: string

Name of flatfield image

useQE: boolean

Whether to take into account the wavelength-dependent QE of the detector

unitTests.testCrosstalk(par, pixsize=0.1, npix=512, pixval=1.0, Nspec=45, outname='crosstalk.fits', useQE=True, method='optext')[source]

Creates a polychromatic flatfield

Parameters:

par : Parameter instance

Contains all IFS parameters

pixsize: float

Pixel scale (lam/D)

npix: int

Each input frame has a pixel size npix x npix

pixval: float

Each input frame has a unform value pixval in photons per second per nm of bandwidth

Nspec: float

Optional input forcing the number of wavelengths bins used

outname: string

Name of flatfield image

useQE: boolean

Whether to take into account the wavelength-dependent QE of the detector

unitTests.testCutout(par, fname, lensX=0, lensY=0)[source]

Testing the cutout function

unitTests.testFitCutout(par, fname, lensX, lensY, mode='lstsq', ivar=False)[source]

Testing the fit_cutout function

unitTests.testGenPixSol(par)[source]
unitTests.testLoadKernels(par)[source]

Make sure the kernel interpolation with wavelength makes sense

unitTests.testOptExt(par, im, lensX, lensY, smoothandmask=True, delt_y=5)[source]