The uves_cal_mdark recipe

uves_cal_mdark

Synopsis

Creates the master dark frame

Description

This recipe creates a master dark frame by taking the median of all input frames which should have identical exposure times. Symbolically,

masterdark = median( dark_i ) - masterbias

The input dark frames must have same tag and size and must be either (P)DARK_BLUE or (P)DARK_RED. Also, a master bias (MASTER_BIAS_xxxx) must be provided for each chip (xxxx = BLUE, REDL, REDU).

On blue input the recipe computes one master dark frame; on red input the recipe produces a master dark frame for each chip (MASTER_(P)DARK_xxxx).

Constructor

cpl.Recipe("uves_cal_mdark")

Create an object for the recipe uves_cal_mdark.

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

Parameters

uves_cal_mdark.param.debug

Whether or not to save intermediate results to local directory (bool; default: False) [default=False].

uves_cal_mdark.param.khigh

Kappa used to clip high level values, when method is set to ‘mean’ (float; default: 5.0) [default=5.0].

uves_cal_mdark.param.khigh

Kappa used to clip high level values, when method is set to ‘mean’ (float; default: 5.0) [default=5.0].

uves_cal_mdark.param.klow

Kappa used to clip low level values, when method is set to ‘mean’ (float; default: 5.0) [default=5.0].

uves_cal_mdark.param.klow

Kappa used to clip low level values, when method is set to ‘mean’ (float; default: 5.0) [default=5.0].

uves_cal_mdark.param.niter

Number of kappa sigma iterations, when method is set to ‘mean’ (int; default: 5) [default=5].

uves_cal_mdark.param.niter

Number of kappa sigma iterations, when method is set to ‘mean’ (int; default: 5) [default=5].

uves_cal_mdark.param.plotter

Any plots produced by the recipe are redirected to the command specified by this parameter. The plotting command must contain the substring ‘gnuplot’ and must be able to parse gnuplot syntax on its standard input. Valid examples of such a command may include ‘gnuplot -persist’ and ‘cat > mygnuplot$$.gp’. A finer control of the plotting options can be obtained by writing an executable script, e.g. my_gnuplot.pl, that executes gnuplot after setting the desired gnuplot options (e.g. set terminal pslatex color). To turn off plotting, set this parameter to ‘no’ (str; default: ‘no’) [default=”no”].

uves_cal_mdark.param.process_chip

For RED arm data process the redl, redu, or both chip(s) (str; default: ‘both’) [default=”both”].

uves_cal_mdark.param.qc_dark.reg.border_x

X distance between the left hand side of the detector and the left hand side of the region [pix] (int; default: 100) [default=100].

uves_cal_mdark.param.qc_dark.reg.border_y

X distance between the left hand side of the detector and the left hand side of the region [pix] (int; default: 100) [default=100].

uves_cal_mdark.param.qc_dark.reg.box_sx

Region X size [pix] (int; default: 100) [default=100].

uves_cal_mdark.param.qc_dark.reg.box_sy

Region Y size [pix] (int; default: 100) [default=100].

uves_cal_mdark.param.qc_dark.reg.num_x

Number of regions along the X axis (where mean/med/rms are computed). (int; default: 4) [default=4].

uves_cal_mdark.param.qc_dark.reg.num_y

Number of regions along the Y axis(where mean/med/rms are computed). (int; default: 4) [default=4].

uves_cal_mdark.param.qc_dark.reg.when

When QC analysis is performed. 0: on each raw frame or 1: on the master frame (int; default: 0) [default=0].

uves_cal_mdark.param.stack_method

Method used to build master frame (str; default: ‘median’) [default=”median”].

uves_cal_mdark.param.stack_method

Method used to build master frame (str; default: ‘median’) [default=”median”].

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

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

uves_cal_mdark.param.debug = False
uves_cal_mdark.param.khigh = 5.0
uves_cal_mdark.param.khigh = 5.0
uves_cal_mdark.param.klow = 5.0
uves_cal_mdark.param.klow = 5.0
uves_cal_mdark.param.niter = 5
uves_cal_mdark.param.niter = 5
uves_cal_mdark.param.plotter = "no"
uves_cal_mdark.param.process_chip = "both"
uves_cal_mdark.param.qc_dark.reg.border_x = 100
uves_cal_mdark.param.qc_dark.reg.border_y = 100
uves_cal_mdark.param.qc_dark.reg.box_sx = 100
uves_cal_mdark.param.qc_dark.reg.box_sy = 100
uves_cal_mdark.param.qc_dark.reg.num_x = 4
uves_cal_mdark.param.qc_dark.reg.num_y = 4
uves_cal_mdark.param.qc_dark.reg.when = 0
uves_cal_mdark.param.stack_method = "median"
uves_cal_mdark.param.stack_method = "median"

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

import cpl
uves_cal_mdark = cpl.Recipe("uves_cal_mdark")
[...]
res = uves_cal_mdark( ..., param = {"debug":False, "khigh":5.0})

See also

cpl.Recipe for more information about the recipe object.

Bug reports

Please report any problems to Jonas M. Larsen. Alternatively, you may send a report to the ESO User Support Department.