Bias

Bias frames give the read out of the CCD detector for zero integration time with the shutter closed. That means that any frame acquisition with shutter open (either a calibration or a science observation) need to be bias corrected. Bias frames are acquired in optical (e.g UVB or VIS) domain.

In order to have a more accurate estimation of the bias, they are typically taken as a set of (usually five) bias frames that have to be combined into a master to increase the S/N level.

Algorithm

Combining multiple images to one master image is handled by collapsing an hdrl.core.ImageList. In order to be robust against outliers (like cosmic ray hits) it is recommended to use the median or sigma clipping collapse methods. Both methods are robust against outliers but the median has a low statistical efficiency so its result will have a higher uncertainty than collapsing images with few outliers via sigma clipping.

There is no dedicated Bias class in PyHDRL. The C function hdrl_imagelist_collapse maps to hdrl.core.ImageList.collapse together with a hdrl.func.Collapse instance.

Collapse methods

Currently available are:

  • hdrl.func.Collapse.Mean()

  • hdrl.func.Collapse.Median()

  • hdrl.func.Collapse.WeightedMean()

  • hdrl.func.Collapse.Sigclip(kappa_low, kappa_high, niter)

  • hdrl.func.Collapse.MinMax(nlow, nhigh)

  • hdrl.func.Collapse.Mode(histo_min, histo_max, bin_size, mode_method, error_niter)

mode_method is one of hdrl.func.Collapse.Method.Median, hdrl.func.Collapse.Method.Fit or hdrl.func.Collapse.Method.Weighted.

Outputs

In most cases a collapse operation has two outputs, the resulting master image (out, an hdrl.core.Image) and an integer contribution map (contrib, a cpl.core.Image) counting how many values contributed to each pixel. The sigma clipping and minmax collapse methods additionally return the low and high rejection thresholds used to calculate the mean (reject_low, reject_high, each a cpl.core.Image).

These operations can also be accessed as methods of hdrl.core.ImageList (collapse_mean, collapse_median, collapse_weighted_mean, collapse_sigclip, collapse_minmax, collapse_mode).

Example

The following is the C master-bias example mapped to PyHDRL (hdrl_collapse_sigclip_parameter_create(3., 3., 5) and hdrl_imagelist_collapse):

collapse = hdrl.func.Collapse.Sigclip(3.0, 3.0, 5)
results = himlist.collapse(collapse)
master = results.out
contrib_map = results.contrib