Help for MARSMASK

PURPOSE:
Apply the mask to the image.

This is a multimission program. 
It supports any mission.


EXECUTION:
marsmask inp=inputi_image out=input_masked_image mask=mask_image


METHOD:
Mask consists of zero and non-zero data.  For each pixel in the mask that 
is non-zero, the corresponding pixel in the input image is assigned DN of zero.
Inversion of this process is supported as well via INVERT parameter.
If number of bands in the mask file is not the same as in input file,
only first band of the mask is used and applied to all bands of the input.
The rest of the bands of the mask will be ignored in that case.  

INP: Image to be masked.  All data type formats are supported.

MASK: BYTE-formatted image. If the mask is single banded, same mask will
be applied to all bands of the input image.  If the number of bands of the
mask matches number of bands of the input image, then the mask will be
applied on per-band basis.

OUT:  Masked-out input image.

By default, the output label is derived from the mask image.  That's because
the mask is generally made from the same input file, so using it means the
mask program (marsfilter or marsdispcompare) is included in the history label.
However, if the mask does not have a proper label, or is otherwise
inappropriate, -IMAGE will cause the label to be derived from the input image
instead.

If -CORR is set, the image is a correlation image, so the
CORRELATION_PIXEL_COUNT label will be set with the number of non-zero pixels
in the output.  This is not the same as the number of non-masked pixels in
the mask, as the input might be zero even where the mask lets data through.
In addition, the CORRELATION_AVERAGE_SCALE is transferred from the image
label to the output, even if -IMAGE is not specified.  While the average
scale may not be accurate any more due to masking, it is only an estimate
to start with.


HISTORY:
Sep. 11    ozp	Initial Implementation 
2019-04-23 rgd	Added -CORR option

COGNIZANT PROGRAMMER: Oleg Pariser 


PARAMETERS:


INP

Input image. Must be 1.

OUT

Output file Must be 1.

MASK

The mask to apply.

INVERT

Whether to invert the mask

LABEL

Which label to apply to output

DATA_SET_NAME

Specifies the full name given to a data set or a data product.

DATA_SET_ID

Specifies a unique alphanumeric identifier for a data set or data product.

RELEASE_ID

Specifies the unique identifier associated with the release to the public of all or part of a data set. The release number is associated with the data set, not the mission.

PRODUCT_ID

Specifies a permanent, unique identifier assigned to a data product by its producer.

PRODUCER_ID

Specifies the unique identifier of an entity associated with the production a data set.

PRODUCER_INST

Specifies the full name of the identity of an entity associated with the production of a data set.

TARGET_NAME

Specifies a target.

TARGET_TYPE

Specifies the type of a named target.

See Examples:


Cognizant Programmer: