masterflat

NAME

masterflat -- create a masterflatfield image


USAGE

masterflat [flags] flatfield-images

box b 2
highkappa q 5.0
kappa k 3.0
lowtresh l 0.0
nan n 0.0
outfile o
recalibrate c 0
reg r 0:0,0:0
subtract s false
verbose v 0


PARAMETERS

box = 2
Clipping box size. Used to mask remaining stars. After all the images are normalized to the region specified by the reg-flag, for each pixel a weighted average a(x,y) of all the input images is created. If now in any of the normalized input images the pixel value p(x,y) > a(x,y) + highkappa * error(x,y) a box around this position is clipped in the image.
highkappa = 5.0
Clipping parameter. Used to mask remaining stars. After all the images are normalized to the region specified by the reg-flag, for each pixel a weighted average a(x,y) of all the input images is created. If now in any of the normalized input images the pixel value p(x,y) > a(x,y) + highkappa * error(x,y) a box around this position is clipped in the image.
kappa = 3.0
Clipping kappa parameter. After clipping stars and masking nonvalid pixels in the input images another kappa-sigma-clipping is done using the values of the remaining images for each pixel.
lowtresh = 0.0
All pixels with a lower value than this upper treshold are not taken into account.
nan = 0.0
Output not a number value. Non valid pixels are set to this value in the output masterflatfield image.
outfile = ""
Output masterflatfield filename. If this parameter is "", the output masterflatfield filename is set to "m" plus the filename of the first of the input flatfield images.
recalibrate = 0
If not zero, the output masterflatfield image is scaled with the median in the normalization region of the image specified.
reg = 0:0,0:0
Normalization region. If this parameter is 0:0,0:0, no normalization is done.
subtract = false
Switch between different normalization methods. Either subtract (true) or divide (false) by the median of the region specified by the reg-flag.
verbose = 0
Verbose level. If verbose >= 1, two additional output images are written providing information about which of the images have been combined for each pixel.
flatfield-images
Single flatfield images to be combined.

DESCRIPTION

The task masterflat creates a masterflatfield image out of a given set of single flatfield images. First, the input images are normalized to the region specified by the ref-flag. If the subtract-flag is used, the median of this region is subtracted, if not, the image is divided by the median. The statistics of each image (median, standard deviation and number of pixels used) is printed. After the normalization, remaining stars are masked. In order to find them, a weighted average a(x,y) of all the input images is calculated for each pixel. If now in any of the normalized input images the pixel value p(x,y) > a(x,y) + highkappa * error(x,y) a box around this position is clipped.
In the next step the masterflatfield image is created by calculating the weighted average of all the remaining values for each pixel. All kappa-sigma outliers are clipping in this step. The number of values finaly taken is stored in the "u.m..." output image. In addition, the "b.m..." output image shows a bit more detailed informations: The pixel values in this file are the decimal counterpart of a binary number that shows which of the images have been taken into account for the detemination of the masterflafield pixel value. For example a value of 13 (= 1101) means that the images one, three and four have been taken.
If the recalibrate-flag is used, the output masterflatfield image is scaled with the median in the normalization region of the image specified. If verbose >= 1, two additional output images are written providing information about which of the images have been combined for each pixel.


OUTPUT

m...
output masterflatfield image
e.m...
errorframe of masterflatfield image

If verbose >= 1:
u.m...
this image contains the individual number of combined images for each pixel
b.m...
same as u.m... but with a bit more detailed informations; the pixel values are the decimal counterpart of a binary number which shows which of the images have been taken into account for the detemination of the masterflafield pixel value; for example a value of 13 (= 1101) means that the images one, three and four have been taken

EXAMPLE

masterflat -k 3.0 -r 300:700,300:700 cb-sky_r_040809_*.fits


Task index
This task was implemented by A. Riffeser
Dokumentation maintained by J. Koppenhöfer
This file was last time updated on 23 Feb 2005