The fors_spec_mflat recipe

fors_spec_mflat

Synopsis

Computes master spectroscopic flat, removing bias first

Description

This recipe is used to subtract the master bias, produced by the recipe fors_bias, from a set of raw flat field frames. The input raw frames are summed, the master bias frame is rescaled accordingly, and subtracted from the result. The overscan regions, if present, are used to compensate for variations of the bias level between master bias and input raw frames.

The overscan regions are then trimmed from the result.

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

Input files

DO category:               Type:       Explanation:         Required:
SCREEN_FLAT_MXU            Raw         Raw data frame          Y
SLIT_LOCATION_MXU          Calib       Slits positions on CCD  Y
CURV_COEFF_MXU             Calib       Slits tracing fits      Y
DISP_COEFF_MXU             Calib       Wavelength calibration  Y
MASTER_BIAS                Calib       Master bias frame       Y

Output files

DO category:               Data type:  Explanation:
MASTER_SCREEN_FLAT_MXU     FITS image  Bias subtracted sum frame

Constructor

cpl.Recipe("fors_spec_mflat")

Create an object for the recipe fors_spec_mflat.

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

Parameters

fors_spec_mflat.param.smooth_sed

Smoothing size for each flat sed (float; default: 0.0) [default=0.0].

fors_spec_mflat.param.stack_method

Frames combination method (str; default: ‘sum’) [default=”sum”].

fors_spec_mflat.param.klow

Low threshold in ksigma method (float; default: 3.0) [default=3.0].

fors_spec_mflat.param.khigh

High threshold in ksigma method (float; default: 3.0) [default=3.0].

fors_spec_mflat.param.kiter

Max number of iterations in ksigma method (int; default: 999) [default=999].

fors_spec_mflat.param.nonlinear_level

Level above which the detector is not linear (float; default: 50000.0) [default=50000.0].

fors_spec_mflat.param.max_nonlinear_ratio

Maximum allowed ratio of non-linear pixels per slit (float; default: 0.2) [default=0.2].

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

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

fors_spec_mflat.param.smooth_sed = 0.0
fors_spec_mflat.param.stack_method = "sum"
fors_spec_mflat.param.klow = 3.0
fors_spec_mflat.param.khigh = 3.0
fors_spec_mflat.param.kiter = 999
fors_spec_mflat.param.nonlinear_level = 50000.0
fors_spec_mflat.param.max_nonlinear_ratio = 0.2

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

import cpl
fors_spec_mflat = cpl.Recipe("fors_spec_mflat")
[...]
res = fors_spec_mflat( ..., param = {"smooth_sed":0.0, "stack_method":"sum"})

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.