The fors_normalise_flat recipe

fors_normalise_flat

Synopsis

Normalise master flat spectrum

Description

This recipe is used to normalise a master flat field frame dividing it by its large scale illumination trend. This recipe can be applied both to generic multi-slit (MOS/MXU) and to long slit exposures (either LSS, or LSS-like MOS/MXU), even if different normalisation methods are applied in such different cases. The input master flat field image is the product of the recipe fors_flat. The input spectral curvature table, product of the recipe fors_detect_spectra, is only required in the case of multi-slit data.

In the case of multi-slit data, the flat field spectra are spatially rectified, heavily smoothed, and then mapped back on the CCD. Then the master flat image is divided by its smoothed counterpart. The smoothing may be obtained either by applying a running median filter of specified sizes, or by polynomial fitting along the dispersion direction performed independently for each row of the spatially remapped spectra.

In the case of long-slit data, the smoothing can still be obtained either by applying a running median filter or by polynomial fitting, but the polynomial fitting will be performed along the spatial direction, for each column of the spectrum.

In the table below the MXU acronym can be alternatively read as MOS or LSS.

Input files

DO category:               Type:       Explanation:         Required:
MASTER_SCREEN_FLAT_MXU     Calib       Master flat frame       Y
DISP_COEFF_MXU             Calib       Wavelength calibration  Y
CURV_COEFF_MXU             Calib       Spectral curvature      .

SLIT_LOCATION_MXU          Calib       Slit detection          .

GRISM_TABLE                Calib       Grism table             Y

Output files

DO category:               Data type:  Explanation:
MASTER_NORM_FLAT_MXU       FITS image  Normalised flat field

Constructor

cpl.Recipe("fors_normalise_flat")

Create an object for the recipe fors_normalise_flat.

import cpl
fors_normalise_flat = cpl.Recipe("fors_normalise_flat")

Parameters

fors_normalise_flat.param.dispersion

Expected spectral dispersion (Angstrom/pixel) (float; default: 0.0) [default=0.0].

fors_normalise_flat.param.startwavelength

Start wavelength in spectral extraction (float; default: 0.0) [default=0.0].

fors_normalise_flat.param.endwavelength

End wavelength in spectral extraction (float; default: 0.0) [default=0.0].

fors_normalise_flat.param.spa_polydegree

Polynomial degree for the flat field fitting along spatial direction (int; default: -1) [default=-1].

fors_normalise_flat.param.sradius

Smooth box radius for flat field along spatial direction (used if spa_knots < 0) (int; default: 10) [default=10].

fors_normalise_flat.param.disp_nknots

Number of knots in flat field fitting splines along dispersion direction (int; default: -1) [default=-1].

fors_normalise_flat.param.dradius

Smooth box radius for flat field along dispersion direction (if disp_knots < 0) (int; default: 10) [default=10].

fors_normalise_flat.param.splfit_threshold

Threshold percentage for flat spline fittingwith respect to the maximum (float; default: 0.01) [default=0.01].

The following code snippet shows the default settings for the available parameters.

import cpl
fors_normalise_flat = cpl.Recipe("fors_normalise_flat")

fors_normalise_flat.param.dispersion = 0.0
fors_normalise_flat.param.startwavelength = 0.0
fors_normalise_flat.param.endwavelength = 0.0
fors_normalise_flat.param.spa_polydegree = -1
fors_normalise_flat.param.sradius = 10
fors_normalise_flat.param.disp_nknots = -1
fors_normalise_flat.param.dradius = 10
fors_normalise_flat.param.splfit_threshold = 0.01

You may also set or overwrite some or all parameters by the recipe parameter param, as shown in the following example:

import cpl
fors_normalise_flat = cpl.Recipe("fors_normalise_flat")
[...]
res = fors_normalise_flat( ..., param = {"dispersion":0.0, "startwavelength":0.0})

See also

cpl.Recipe for more information about the recipe object.

Bug reports

Please report any problems to Carlo Izzo. Alternatively, you may send a report to the ESO User Support Department.