Return to Post-BCD pages
 
Manual Contents
 
Getting Started
 
Input Files
 
Background Matching (overlap.pl)
 
Mosaicking (mosaic.pl)
 
Point Source Extraction (apex*.pl)
 
Basic Concepts
 
Appendix 1: Full List of MOPEX Scripts
 
Appendix 2: Fatal Bit Patterns
 
Appendix 3: Full Lit of MOPEX Modules

Modules: Mosaic Rmask

Namelist Trigger: run_mosaic_rmask
Output Directory Keyword: RMASK_DIR
Default Output Directory: <output_dir>/Rmask
Depends on: Mosaic Outlier, Level, Mosaic Coverage

Important Notes:
  1. The choice of which outlier rejection scheme to use in creating the RMasks is not made in this module. By default, MOPEX will use the output of Single Frame Outlier Detection to create the RMasks. To use the results from the other detection schemes, you must specify this in the Global Parameters section of the namelist with the following keywords:
    USE_BOX_OUTLIER_FOR_RMASK
    USE_DUAL_OUTLIER_FOR_RMASK
    USE_OUTLIER_FOR_RMASK

  2. 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_BitPattern corresponding to the outlier rejection schemes that you want to set as "fatal". See the Discussion below, and Appendix 2: Fatal Bit Patterns for more information


PURPOSE

    This module combines outlier information into a single Rmask: bit 0 (single frame radhit detection), bit 1 (multiframe outlier detection), bit 2 (dual outlier detection), bit 3 (box outlier detection).

PARAMETER BLOCK

    &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

INPUTS

    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 Mosaic Outlier 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.

    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 resampled 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.

    MIN, 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 which were detected to be 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 which were detected to be 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 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 which were detected to be outliers.


OUTPUTS

    Outlier Output FITS (*_rmask.fits): The output stack of mask images. The flagged pixels have positive 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 Mosaic Outlier and Mosaic Rmask. Their values can be increased going from Mosaic Outlier to Mosaic Rmask, but can not 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 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 Figure 18) 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 temporal 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 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:
    run_mosaic_box_outlier = 1

  2. Tell MOPEX to use the results of the Mosaic Box Outlier to create the RMask:
    USE_BOX_OUTLIER_FOR_RMASK = 1

  3. Set the RMask Fatal Bit Pattern to include the bit corresponding to the results from Box Outlier:
    RMask_Fatal_BitPattern = 3

For more information on Fatal Bit Patterns, see Appendix 2: Fatal Bit Patterns.

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





SPITZER HOME || SPITZER SCIENCE || INSTRUMENTS || SCIENCE USER SUPPORT || SEARCH

help@spitzer.caltech.edu

This file was last modified on Tue Jun 10 17:37:50 PDT 2008.

California Institute of Technology Jet Propulsion Laboratory NASA