|
MOPEX Online Manual |
||||||||||
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
PARAMETER BLOCK
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 INPUTSWindow_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
DISCUSSIONThe 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).
|
help@spitzer.caltech.edu