Create master dark frame & bad pixel mask
This recipe calculates the master dark frame.
It is recommended to provide three or more dark exposures to produce a reasonable master with associated noise.
DO CATG Type Explanation Required #Frames
------- ----- ----------- -------- -------
DARK RAW Dark exposures Y 1-n
(at least 3 frames recommended)
DO CATG Type Explanation
------- ----- -----------
MASTER_DARK F2D Calculated master dark frames
BADPIXEL_DARK B2D Associated badpixel frames
Create an object for the recipe kmo_dark.
import cpl
kmo_dark = cpl.Recipe("kmo_dark")
The positive rejection threshold for bad pixels (float; default: 50.0) [default=50.0].
The negative rejection threshold for bad pixels (float; default: 50.0) [default=50.0].
Controls if EXPTIME should be appended to product filenames (bool; default: False) [default=False].
Apply “average”, “median”, “sum”, “min_max.” or “ksigma”. (str; default: ‘ksigma’) [default=”ksigma”].
The positive rejection threshold for kappa-sigma-clipping (sigma). (float; default: 3.0) [default=3.0].
The negative rejection threshold for kappa-sigma-clipping (sigma). (float; default: 3.0) [default=3.0].
The number of iterations for kappa-sigma-clipping. (long; default: 3) [default=3].
The number of maximum pixel values to clip with min/max-clipping. (long; default: 1) [default=1].
The number of minimum pixel values to clip with min/max-clipping. (long; default: 1) [default=1].
The following code snippet shows the default settings for the available parameters.
import cpl
kmo_dark = cpl.Recipe("kmo_dark")
kmo_dark.param.pos_bad_pix_rej = 50.0
kmo_dark.param.neg_bad_pix_rej = 50.0
kmo_dark.param.file_extension = False
kmo_dark.param.cmethod = "ksigma"
kmo_dark.param.cpos_rej = 3.0
kmo_dark.param.cneg_rej = 3.0
kmo_dark.param.citer = 3
kmo_dark.param.cmax = 1
kmo_dark.param.cmin = 1
You may also set or overwrite some or all parameters by the recipe parameter param, as shown in the following example:
import cpl
kmo_dark = cpl.Recipe("kmo_dark")
[...]
res = kmo_dark( ..., param = {"pos_bad_pix_rej":50.0, "neg_bad_pix_rej":50.0})
See also
cpl.Recipe for more information about the recipe object.
Please report any problems to Alex Agudo Berbel. Alternatively, you may send a report to the ESO User Support Department.
This file is part of the CRIRES Instrument Pipeline Copyright (C) 2002,2003 European Southern Observatory
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Code author: Alex Agudo Berbel <usd-help@eso.org>