next up previous index
Next: BIGMEDIAN: Compute Median of Up: Basic Image Processing Previous: TVZAP: Interactively Remove Pixels   Index

MEDIAN: Compute Median of Several Images


\begin{command}
\item[\textbf{Form: }MEDIAN dest im1 im2 im3 {[im4 im5 ...]} {[...
...ram not to scale each image by
its mean before taking the median}
\end{command}

MEDIAN loads the 'dest' buffer with the median of images im1, im2, im3, ... Each pixel in the destination image is the median of the corresponding pixels in the input images. Normally, the program scales each image to have the same mean before computing the median of the stack. If you wish to do the background determination and scaling yourself, you can suppress the auto-rescaling by using the NOMEAN keyword.

Note that all input images must be in VISTA buffers. This prevents computing the median of very large numbers of images because of insufficient memory. For this purpose, try the command BIGMEDIAN, which will median input disk FITS files and store the median in a VISTA buffer.

At least 3 input images must be given. None of the images can be in the same buffer as the output image. All the images must have the same size and starting pixel.

The program is useful for removing cosmic-ray hits from many exposures of the same object. Make sure the location of the objects on the image (stars, location of spectrum, etc) are the SAME on ALL images! Use SHIFT or ALIGN to align images before using MEDIAN.

Example:
\begin{example}
\item[MEDIAN 11 1 2 3 4 5 TTY\hfill]{Loads into buffer 11 the median
of the images in buffers 1 through 5.}
\end{example}


next up previous index
Next: BIGMEDIAN: Compute Median of Up: Basic Image Processing Previous: TVZAP: Interactively Remove Pixels   Index
Jon Holtzman 2002-02-13