You are here: Home / Surveys & Projects / Software Release / Background Filtering

Background Filtering

nebuliser.png

nebuliser is a routine that will remove medium to large scale variations in the background of an input image. This is especially useful when trying to extract sources in images that are affected by nebulosity, hence the name. An input image infile may optionally be accompanied by a confidence map inconf. The input images can be either simple or multi-extension FITS files. In the case of the latter then nebuliser will cycle through all of the image extensions individually. Obviously if confidence maps are used, they must match the input images in data array size and number of extensions. The output file outfile will have the same structure as infile.

The background is modelled by a series interative sliding median and mean filters that are applied to each axis or to both simultaneously. The user gives the size (in pixels) of both windows as medfiltsize and linfiltsize and the number of clipping iterations and the clipping thresholds can be varied. The background that is eventually modelled can optionally be written to a file. In the case where the filtering is done in 1d, the user can specify which axis is to be done first. A full 2d filter is also provided, but this can be very slow. Finally the user can choose to either subtract out the modelled background or divide by it. In the case of the former it is also possible to normalise the output to a zero background pedestal level.

More information and examples are given here.

 

SYNOPSIS

nebuliser infile confmap outfile medfiltsize linfiltsize

ARGUMENTS

infile
Input file to be analysed. This can either be a simple or multi-extension FITS file.
confmap
Input confidence map. If a confidence map is not to be used, then a value of "noconf" should be entered. If it is used, then the structure of the FITS file must match that of infile exactly.
outfile 
Output background corrected image. This will be a FITS file with the exact same structure as infile.
medfiltsize
The number of pixels on a side in the sliding median filter box 
linfiltsize
The number of pixels on a side of the sliding linear filter box

OPTIONS

The following options are supported.  Default values are specified after the equal sign. In the case of a boolean switch no value is required the default state is specified in brackets.

--backmap=
If you want to save the modelled background map, then specify a file name here.
--niter=3
The number of rejection iterations to be done while filtering
--axis=2
Specifies which axis gets smoothed first in the case of 1d filtering -- a value of 1 for the X axis and a value of 2 for the Y axis.
--(no)twod (no)
If set then full 2d filtering will be done. NB: this can be very slow.
--(no)takeoutsky (no)
If set, then the pedestal background level will be removed
--(no)inorm (no)
If set, then the input data will be divided by the calculated background map. If not, then the background map will be subtracted from the input data.
--signeg=10
The low threshold for the clipping algorithm in units of background sigma.
--sigpos=3
The upper threshold for the clipping algorithm in units of background sigma.
--(no)verbose (no)
If set then some verbose output will be generated