Depends On: Mosaic Outlier, Level, Mosaic Coverage
Important Notes: Setting an outlier scheme to be included in the RMasks does not guarantee that it will be set as "fatal" when running MOPEX. You must specify the RMask Fatal Mask Bit Pattern in the Initial Setup to correspond to the outlier rejection schemes that you want to set as "fatal". See the Discussion below, and §8.11: Fatal Bit Patterns for more information
PURPOSE
This module combines outlier information from a choice of different outlier detection methods into a single RMask by setting the following bits for each affected pixel: bit 0 (Single Frame Radhit detection), bit 1 (Multiframe Outlier detection), bit 2 (Dual Outlier detection), bit 3 (Box Outlier detection). Users can choose which of the available outlier detection schemes to include in the RMask.
INPUT
RM Thresh: (float) In most cases, the input BCD image is rotated, and its original pixel is re-sampled to a smaller size. This implies that any final re-sampled pixel could have fractional overlap with an original pixel. The threshold specifies the minimal fraction of an input pixel covered by the projection of outlier pixels to be marked in the RMask (if small, outliers will be fatter). The default value is 0.3.
Bottom Threshold, Top Threshold: (float) These two values are the lower and upper cutoffs used to select outlier pixels in the temporal rejection method. The outlier maps produced by the Mosaic Outlier module give the deviation of each pixel from the mean of the stack at that pixel. A pixel is flagged in the RMask when its value is less than Bottom Threshold * sigma or larger than Top Threshold * sigma. The default values are 10 for both.
Min Coverage, Max Coverage: (int) These two numbers are used to decide which method of outlier rejection is best for the dataset. The default values are 3 and 100.
If coverage >= Min Coverage, each temporal outlier map is projected onto the corresponding input image frame. The value of a projected pixel is equal to the sum of the overlap areas of this pixel with the outlier map pixels that were identified as outliers.
If coverage <= Max Coverage , each dual outlier map is projected onto the corresponding input image frame. The value of a projected pixel is equal to the sum of the overlap areas of this pixel with the dual outlier map pixels that were identified as outliers. Only dual outlier pixels with negative values are projected.
Refine Outlier: (int) A flag with value of either 1 or 0. If it is 1, it will trigger next parameter Refine Outlier Threshold, to be taken by the module. If it is 0, the module will not use the next parameter.
Refine Outlier Threshold: (float) A new threshold for pixels detected as temporal outliers based on their lack of detection as dual outliers. If Refine Outlier (above) is set to 1, this new threshold replaces Top Threshold.
Box Bottom Threshold, Box Top Threshold: (float)Similar to the above description for Bottom Threshold, Top Threshold, these two values are used for box outlier maps. Default values are 10.
Box Min Coverage: (float) If coverage >= Box Min Coverage, each box outlier map is projected onto the corresponding input image frame. The value of a projected pixel is equal to the sum of the overlap areas of this pixel with the outlier map pixels that were identified as outliers.
Mosaic Rmask output subdirectory: The subdirectory of <output_dir> that you wish to use for the output files. Default is RmaskMosaic-mosaic.
Use Outlier for Rmask: Include the results of Multiframe Temporal Outlier detection in the final combined RMask.
Use Dual Outlier for Rmask: Include the results of Dual Outlier detection in the final combined RMask.
Use Box Outlier for Rmask: Include the results of Box Outlier detection in the final combined RMask.
COMMAND LINE INPUT
&MOSAICRMASKIN
BOTTOM_THRESHOLD = 3,
TOP_THRESHOLD = 3,
RM_THRESH = 1,
MIN_COVERAGE = 500,
MAX_COVERAGE = 500,
REFINE_OUTLIER = 1,
REFINE_OUTLIER_THRESH = 10,
BOX_BOTTOM_THRESHOLD = 10,
BOX_TOP_THRESHOLD = 10,
BOX_MIN_COVERAGE = 1,
&END
In Global Parameters:
RMASK_DIR = Rmask-mosaic
USE_OUTLIER_FOR_RMASK = 1
USE_DUAL_OUTLIER_FOR_RMASK = 1
USE_BOX_OUTLIER_FOR_RMASK = 1
OUTPUT
Outlier Output FITS (*_rmask.fits): The output stack of mask images. The flagged pixels have positive bit values, with bit 0 for single frame, bit 1 for multi-frame rejection, bit 2 for dual outlier rejection, and bit 3 for box outlier rejection.
DISCUSSION
The module combines the results from the four different ways of rejecting outlier pixels. The outlier pixels in each interpolated image are traced back to the corresponding input image frame.
Bottom Threshold and Top Threshold can be set in both the Mosaic Outlier and Mosaic RMask modules. Their values can be increased going from Mosaic Outlier to Mosaic RMask, but cannot be decreased. The Bottom Threshold and Top Threshold parameters are often set to 3 in the pipeline namelists for IRAC and MIPS-24, and 3.5 for MIPS-70 and MIPS-160. However, these numbers are not optimal for all cases. For example, a value of 3 is too low for IRAC for coverage ~50 and leads to false detections. A value of 10 is preferable. Users need to experiment with these settings and find the optimal value for any specific data.
Refine Outlier Threshold: Multiframe Outlier detection detects outliers inside point sources, which can false in some (even many) cases. One can use the information saved in the dual outlier maps to prevent masking pixels inside what was determined by the Dual Outlier detection to be a real source. The positive pixels in the clusters in a dual outlier map (see §8.2) have been confirmed to have been detected in more than one frame. The chances are they belong to real sources. The Multiframe Outlier should be allowed to set a bit in the RMask for such a pixel if the deviation from the mean is significantly higher then would be required otherwise. To do so, set the Refine Outlier Threshold to a much larger value than the Multiframe Outlier Top Threshold.
Warning: setting an outlier scheme to be included in the RMask does not guarantee that the flagged pixels will be rejected by MOPEX. Outlier rejection is a three-step process. First the desired module for outlier rejection must be run, then Mosaic RMask must be told to use the results in the mask, and, finally, MOPEX must be told to set that particular code as "fatal". For example, in order to use the results of Box Outlier Detection in the final mosaicking process, you must do the following:
1. Include the module Mosaic Box Outlier in the namelist:
2. Tell MOPEX to use the results of Mosaic Box Outlier to create the RMask by checking the Use Box Outlier for Rmask box
3. Set the RMask Fatal Mask Bit Pattern in the Initial Setup module to include the bit corresponding to the results from Mosaic Box Outlier, bit 3.
For more information on Fatal Mask Bit Patterns, see §8.11.
Note: When using the Drizzle option in the Mosaic Interpolate module, several of the mosaicking steps are run twice. Firstly, a linear interpolation is carried out so MOPEX can run the outlier rejection scheme. Once the outlier rejection masks (RMasks) have been created, MOPEX returns to the Mosaic Interpolate module and re-runs the interpolation with the Drizzle algorithm, masking out any pixels flagged in the RMasks. When using the Drizzle interpolation scheme in Mosaic Interpolate, do not include the Mosaic Reinterpolate Module in the processing flow.