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

APEX Modules: Detect MedFilter

Namelist Trigger: run_detect_medfilter
Output Directory Keyword: MEDFILTER_DIR
Default Output Directory: <output_dir>/Medfilter
Depends on: Input Files; Mosaic Combine (or the mosaic.pl output mosaic)


PURPOSE

    This module is an instance of the same Med Filter that is run during outlier rejection in the Mosaic pipeline. In this case, it performs the background subtraction of the mosaicked image (or tiles) which will be used for source detection.

PARAMETER BLOCK

    &DETECT_MEDFILTER
     Window_X = 45,
     Window_Y = 45,
     N_Outliers_Per_Window = 100,
     Min_Good_Pixels_In_Window = 9,
     Min_GoodNeighbours_Number = 4,
     Max_BadPixels_OutputImage = 100,
    &END

INPUTS

    Window_X: (int) the X size in pixels of the window used to compute the median of the background. The default value is 45

    Window_Y: (int) the Y size in pixels of the window used to compute the median of the background. The default value is 45

    N_Outliers_Per_Window: (int) the number of outlier pixels (N) being rejected from the X*Y window when computing the median background. A rule of thumb to remember when setting these parameters is that if you have a very crowded field, the fraction of rejected pixels should be higher than for a less crowded field. A fraction of 1-2% is an acceptable number for most datasets. If N is set too high, the background will be under-estimated.

    Min_Good_Pixels_In_Window: (int) The minimum number of good (non-NaN, non-masked) pixels needed to compute the median. If insufficient good pixels are present, the "missing" output pixel is replaced by the interpolation of its neighbors.

    Min_GoodNeighbors_Number: (int) The minimum number of good neighbor pixels need to perform the replacement of "missing" output pixels.

    Max_BadPixels_OutputImage: (int) The maximum number of allowed bad (NaN) pixels in the output image.


OUTPUTS

    Generated FITS (*_Image_minback.fits in multiframe or mosaic_minus_median_detect.fits in single frame): The output is the background subtracted mosaic image (or tiles). main output directory, but in multiframe mode the tiles are stored in the Coadd-apex subdirectory.

DISCUSSION

The module is run on the detection image. In APEX single frame, this is the input image. In APEX multiframe, the mosaic may be a single image produced during the APEX pipeline, or it may be the several Tiles produced by the Coadder.

The program computes an asymmetrically skewed median for each pixel in the input image using a rectangular window of Window_X by Window_Y pixels. It is achieved by omitting the N_Outliers_Per_Window highest pixels from each median window.

There is a minimum required number of good (not-NaN and not flagged by any mask) pixels per median window Min_Good_Pixels_In_Window. If the number of good pixels is below this threshold then the corresponding pixel in the output image is marked as a "missing" pixel. When the median calculation is finished, the values of the marked pixels are interpolated from the neighboring pixels for which the median has been found. In order to do so the program scans around the pixel in question and accumulates values of good pixels. When the number of accumulated values reaches or exceeds the minimum number given by the input parameter Min_GoodNeighbors_Number the program finds the average and stores this value as the median for the pixel in question.

This module is run again later in the APEX flow as Extract MedFilter. The input parameters for Extract MedFilter should always be more aggressive than for Detect MedFilter (i.e. smaller window size and number of outliers).


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

help@spitzer.caltech.edu

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

California Institute of Technology Jet Propulsion Laboratory NASA