The hawki_twilight_flat_combine recipe



HAWKI twilight combination recipe


hawki_twilight_flat_combine – HAWKI twilight flat combine recipe.

Combine a list of twilight flat frames into a mean frame. Optionally compare the output frame to a master twilight flat frame

The program accepts the following files in the SOF:

Tag Description FLAT_TWILIGHT A list of raw twilight flat images MASTER_DARK A master dark frame REFERENCE_TWILIGHT_FLAT Optional reference twilight flat frame MASTER_BPM Optional master bad pixel map or MASTER_CONF Optional master confidence map

If no reference twilight flat is made available, then no comparison will be done. This means there will be no output ratio image. If either a masterbad pixel mask or a master confidence map is specified, this will be usedto help mask out bad pixels



Create an object for the recipe hawki_twilight_flat_combine.

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



Low rejection threshold for underexpsed images (float; default: 4000.0) [default=4000.0].


High rejection threshold for overexposed images (float; default: 30000.0) [default=30000.0].


Combination algorithm (str; default: ‘median’) [default=”median”].


Scaling algorithm (str; default: ‘multiplicative’) [default=”multiplicative”].


True if using extra rejection cycle (bool; default: True) [default=True].


Rejection threshold in sigma above background (float; default: 5.0) [default=5.0].


Number of cells for data channel stats (int; default: 8) [default=8].


Use pretty output file names? (bool; default: False) [default=False].

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

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

hawki_twilight_flat_combine.param.lthr = 4000.0
hawki_twilight_flat_combine.param.hthr = 30000.0
hawki_twilight_flat_combine.param.combtype = "median"
hawki_twilight_flat_combine.param.scaletype = "multiplicative"
hawki_twilight_flat_combine.param.xrej = True
hawki_twilight_flat_combine.param.thresh = 5.0
hawki_twilight_flat_combine.param.ncells = 8
hawki_twilight_flat_combine.param.prettynames = False

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

import cpl
hawki_twilight_flat_combine = cpl.Recipe("hawki_twilight_flat_combine")
res = hawki_twilight_flat_combine( ..., param = {"lthr":4000.0, "hthr":30000.0})

See also

cpl.Recipe for more information about the recipe object.

Bug reports

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