Spitzer Documentation & Tools
MOPEX User's Guide

 

7.5.3        PRF Estimate Modules: MedFilter

 

Command Line Equivalent: run_medfilter

Default Output Directory: <output_dir>/Medfilter-PRF-Estimate

Depends On: Initial Setup; PRF Estimate Initial Setup

PURPOSE

This module performs a background subtraction of the individual input images. It is another occurrence of the MedFilter module used by Overlap, Mosaic and APEX. 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-PRF-Estimate.

 

COMMAND LINE INPUT

&MEDFILTER

 Window_X = 45,

 Window_Y = 45,

 N_Outliers_Per_Window = 500,

 Use_Sbkg_for_Med = 1,

 Sbkg_Filt_Size_for_Med = 3,

&END

In Global Parameters:

MEDFILTER_DIR = Medfilter-PRF-Estimate

 

OUTPUTS

Generated Fits Files (*_minback.fits): The background subtracted, individual images. A list of the generated images is also written out.

 

DISCUSSION

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.