# Averaged bias frame

An average bias frame of a set of bias frames.

## Synopsis

`munipack bias [..] file(s)`

## Description

A bias frame is a zero-time exposure with no light. The exposure with the shortest possible exposure time provided by a device. One maps a pre-amplifier bias (offset) of readout electronics. This routine creates an average bias frame, sometimes named as a masterbias.

Because bias exposure times are really short (1/100s or less), it is recommended to acquire and average a lot of exposures (>10).

An output bias Bij is computed as the average of every pixel of input images (Ik)ij:

Bij = 〈 Ik 〉ij,

where i,j is an index of a pixel and k is an index of an image.

Both chip temperatures or exposure times are checked to be nearly the same during processing when FITS_KEY_TEMPERATURE and FITS_KEY_EXPTIME environment variables are set to values of corresponding quantities.

## Input and output

On input, a list of bias frames is expected.

On output, a single file representing of the mean bias frame is created. The file has STDERR extension with standard errors. Masked values (if parameter `-bitmask` is presented) are set to the frame mean.

## Parameters

`-bitmask file`
  mask frame (see phcorr for description). Only pixels, marked by this mask are processed.
`-st, --saturate s`
  Set saturate limit in units of input frames. Any pixel out of the range th < pixel < s (see also --threshold) is rejected the processing. This switch is useful mainly for over-exposed parts of frames and elimination of non-linear parts of gradation curve. If unset, the value is determined from FITS header (by FITS_KEY_SATURATE, see). If the keyword is not found and the frame contains an integer number type, the maximum value 2**BITPIX-1 is provided, otherwise the maximum value of given data-type is used (which practically switch-off the saturation bound check). The value is set in ADU (values reported by camera).
`-th, --threshold th`
  Set threshold limit in units of input frames. Any pixel below the value is rejected from the processing. If unset, the value is number one. Threshold is minor significance parameter. It should help for faulty values or filtering of bad pixels. The value is set in ADU (values reported by camera).
`-B bitpix`
  set numerical type of output images, see Common options (default -32)
`-o filename`
  save to the output file, see Common options

Also see Common options A temperature and exposure time parameteres are set via Environment variables.

## Examples

    $ munipack bias -o bias.fits bias_*.fits

Mean bias frame

## See also

Light Curve Tutorial, Photometric corrections tutorial, Averaged dark frame.