Spitzer Documentation & Tools
MOPEX User's Guide

 

4.3.5        Overlap Modules: MedFilter

Command Line Equivalent: run_medfilter

Default Output Directory: <output_dir>/Medfilter-overlap

Depends On: Initial Settings; Overlap Settings

 

PURPOSE

This module performs a background subtraction of the individual input images in order to set the frames up for Bright Object Detection. The output background-subtracted BCDs are taken as input by the Detect module, which carries out the detection of bright pixels in the frame. There are two options: the Median case (default) and the Sbkg case, which uses a background estimate like that of SExtractor.

 

INPUT

Window X, Y: (int) the X, Y size in input pixels of the window used to compute the background value.

 

Outliers / Window: (int) the number of high outlier pixels rejected from the X*Y window when computing the Median background. For a very crowded field, the fraction of rejected pixels should be higher than for a less crowded field. Values of a few percent should be acceptable for uncrowded fields. If Outliers / Window is set too high, the background will be under-estimated.

 

SExtractor background filter size: (int) Median filter box size for the Panels when the Use SExtractor background estimation option is turned on. A value less than 2 means no filtering. If greater than the minimum number of panels across an image, it will use the minimum.

 

Use SExtractor background estimation: Checking this box invokes the Sbkg background estimate based on SExtractor. Leaving it unchecked causes MOPEX to use the default Median estimate.

 

Med Filter output subdirectory: The subdirectory of <output_dir> that you wish to use for the output files. Default is Medfilter-overlap.

 

COMMAND LINE INPUT

&MEDFILTER

 Window_X = 45,

 Window_Y = 45,

 N_Outliers_Per_Window = 50,

 Sbkg_Filt_Size_for_Med = 3,

 Use_Sbkg_for_Med = 1,

&END

In Global Parameters:

MEDFILTER_DIR = Medfilter-overlap

 

OUTPUT

Generated Fits Files (*_minback.fits): The background subtracted, individual images.

 

DISCUSSION

This module is required if you plan to use Bright Object Masking, and carries out a median background subtraction before running the Detect module to detect the bright objects in the frame. The background-subtracted images are not used for later mosaicking.

 

With the default Median option, the program computes a background value using the median of a running rectangular window of Window X by Window Y pixels, after omitting the Outliers / Window highest pixels. This is done for each pixel so can be very slow.

 

If Use SExtractor background estimation is set, the module switches to the Sbkg background estimation based on that of SExtractor (Bertin and Arnouts, AASupp 117, 393, 1996). The image is divided into Panels with size given by Window X, Y. In each Panel, iterative clipping is used to find a single estimate of the background in the Panel. You can optionally median filter the Panel background values, e.g. to avoid ones where bright objects skewed the background estimate. The median filter size is given by SExtractor background filter size. It then interpolates the Panel values to find the background at each pixel. This is much faster than calculating the median of a big window at each pixel.

 

Both background estimates generally give reasonable results, but if the data volume is large, the Sbkg option is strongly recommended as it is much faster. It also does not require an estimate of Outliers / Window.