Masking is directly done to the ``mask'' item of an image dataset, i.e. the actual image data are not modified, only the mask. A pixel with a TRUE mask value is considered a good pixel.
To set all pixels in an image to FALSE:
immask in=ngc_289_6cm flag=false logic=and
To mask out the pixels in a region:
immask in=ngc_289_20cm firstname.lastname@example.org flag=false logic=and
To undo all masking, delete the mask item from the header:
To mask all the pixels EXCEPT a chosen region (eg you want to blank out the nasty-looking edges of a CCD image)
immask in=myimage flag=good email@example.com logic=not
To change the masking, you must specify a value for the LOGIC keyword. Otherwise IMMASK merely reports the current numbers of masked and unmasked pixels.
See also MATHS for other ways to set the image mask, but note that un-masking a pixel may then expose a value that is incorrect or unexpected, e.g. maths will have written 0s for pixels that were masked in the process.
OR: region .OR. mask AND: region .AND. mask EQV: region .EQV. mask XOR: region .XOR. mask NOT: if (region) .NOT.maskIf no value provided, the program will simply report on the total number of pixels already flagged good and bad. Caution: although XOR is not a valid fortran expression, the EQV and NEQV boolean operators come close. OR and XOR belong together: OR=inclusive OR, XOR=exclusive OR. No default.
datamin flag all values with `flag' when they equal the value of the 'datamin' keyword in the image header.Default: none.