.help fmrgmsk Aug92 ftools.image
.ih
NAME
fmrgmsk -- Merge 2 or more input FITS mask images and create a single 
output mask image file.
.ih
USAGE
fmrgmsk 
.ih
DESCRIPTION
This task merges up to 100 input MASK files into an output mask.  Each
mask consists of a 2-dimensional image whose pixel values flag the corresponding
pixels in another image file.  Typically the mask image will only contain
1's and 0's, but in principle a mask file could contain pixels with any
arbitrary data value.  The output mask is produced by either logically
combining the input masks using an OR, AND, or XOR operation or by numerically
ADDing or SUBtracting the actual values.  The logical
state of each pixel is determined by whether the pixel = zero or not.
For example if 3 masks are merged with the OR operation, then the output
mask will contain a 1 every pixel that is not equal to zero in any of the
input masks.  If the AND operation is specified, then the output mask will
contain 1's only in those pixels that are non-zero in ALL the input masks.

All the input masks must have the same dimensionality.  There is no
size limitation on the image.  All keywords from the first input image
are copied to the output mask.
.ih
PARAMETERS
.ls inmsk1 [filename]
The name  and extension of the first input mask or a list of masks.  
If this name is preceded by an '@'
character than this is the name of an ASCII format file with contains
a list of mask file names, on name per line.
.le
.ls inmsk2 [filename]
The name of the second input mask, a list of masks or a filename (preceded
by an '@') containing any additional files.
.le
.ls outfil [filename]
The name of the output mask file.  If no extension number is specified,
the output mask will be in the primary array.  If extension 1 or greater
is requested, the mask will be placed in an image extension.
.le
.ls (ops = ADD) [string: OR, AND, XOR, ADD, or SUB]
The type of operation to be performed in constructing the mask.
.le
.ls (clobber = no) [boolean]
If true, an existing output file of the same name will be overwritten.
.le

.ih
EXAMPLES 
1.  Merge the mask1.fits and mask2.fits files with a logical OR operation
and write the output to the file outmask.fits:

    ft> fmrgmsk mask1.fits mask2.fits mask3.fits ops=OR
.ih
BUGS
.ih
SEE ALSO
farith
.endhelp
