Munipack's logo

Averaged Dark Frame

Compute an average dark frame of a set of dark frames.


munipack dark [--arith] [-bias file] [--tol-temp] [--tol-exp] [..] file(s)


A dark frame is a map of a dark current, thermally generated charged particles captured in pixels. Amount of the dark current is proportional both temperature and exposure time. This routine creates an average dark frame, sometimes named as a masterdark.

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

Oij = 〈Ik - Bij,

where i,j is an index of a pixel and k is an index of an image. When a bias frame Bij is available, one is subtracted from dark exposures before averaging.

Two methods of averaging are implemented. An arithmetical mean is fast and memory conserving while a robust mean is significantly slower and requires much more memory. Use of the robust mean is preferred because random defects (cosmics, interferences) are greatly suppressed.

It is strongly recommended correct setting of FITS_KEY_EXPTIME (environment variables) because the exposure time will usable for later processing. Chip temperatures are checked to be equal during processing when FITS_KEY_TEMPERATURE is valuable.

Input And Output

On input, list of frames representing the darks is expected. Optionaly, a bias can by pre-applied on every frame.

On output, the only one file as mean dark frame is created.


use arithmetical mean instead of default robust mean
-bias file
use the specified bias frame
--tol-temp temp
limit for nearby temperatures (default = 1K)
--tol-exp exptime
limit for nearby exposure times (default = 1 μsec)
-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


$ munipack dark -o d120.fits d120_*.fits
A single dark image
A robust mean of dark frames.

See Also

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