XVista page(1) manual page

NAME

median - creates a median frame from several images

SYNOPSIS

median file1 file2 ... fileN [outfile=] [pix=] [nomean] [verbose]

DESCRIPTION

This command goes through the specified image files (the (current maximum number is 16) 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.

By default, the mean of each image is calculated (or found in the XVISTA symbol table) and all images are scaled to have the same mean as the first one specified. If nomean is specified, then no scaling is performed; alternatively, if a value is supplied via the pix keyword - say, pix=8 - then only every n'th (in this case 8'th) pixel is used to calculate the mean of each frame. This can speed up program execution times a bit.

The output median image is placed in the file median.fts or whatever name is specified with the outfile keyword. It has a very minimal header, and so it is wise to use the `COMMENT' command to add some additional information about the particulars of the image.

Execution times can reach many minutes for large images, so the verbose option prints out information on exactly how far the program has gotten in producing the output image.

EXAMPLE

median skyflat1 skyflat2 skyflat3 pix=16

Goes through each of the three files and calculates the mean, using every 16'th pixel. 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 median.fts.

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

SYMBOLS

median places the symbols `MN_file1', `MN_file2' and so forth into the symbol table as it calculates them (if they are not already there). Also puts the symbol MEAN into the table with the mean of the last image for which it was calculated.

SEE ALSO

mn