NAME

median - creates a median frame from several images

SYNOPSIS

median file1 file2 ... fileN outfile= [mean] [verbose]

DESCRIPTION

This command goes through the specified image files (the (current maximum number is 20) pixel-by-pixel and places the median value for each pixel in the output image file. The median of N pixels is defined as the value of the floor(N/2) sorted pixel; thus, the second-lowest pixel out of four or the third-lowest out of five.

If the mean option is specified, the mean of each image is calculated and all images are scaled to have the same mean as the first one specified.

The output median image is placed in the file is specified with the outfile keyword. This option is required.

The header of the first file is copied into the output file.

EXAMPLE

median skyflat1 skyflat2 skyflat3 mean outfile=myflat

Goes through each of the three files and calculates the mean. Then, scales each file so that the means are the same. Goes through the images pixel-by-pixel, sorting the three values and placing the middle value into the output file, which will be called myflat.fits.

Note: in generating sky flats you should first remove the dark and bias before using the median.


XVista index