erbackmap

erosita/erbackmap-1.10

Summary:

Create smooth background by masking source regions in input image and smoothing either by 2D spline fit or adaptive smoothing algorithm.

Description:

The task erbackmap creates the background images for the eROSITA source detection pipeline. The input data are one science image, an input source list (typically created by task erbox in local mode), an exposure map (from task expmap) and detection mask (from task ermask).

In a first step circular regions around the input sources are calculated, where the surface brightness of the input sources exceed the threshold set by parameter scut . A mask image where this regions are set to 0 can optionally be written to the file specuified by parameter cheesemask .

The image data outside the source regions are used to create a smoothed background map which is also interpolated to the positions of the input sources. The user can choose between a 2D spline fit (fitmethod="spline") and an adaptive smoothing algorithm (fitmethod="smooth") to perform the smoothing/interpolation.

The spline fit can be controlled with the parameters nsplinenodes (number of spline nodes per dimension), degree , smoothflag , smoothval . If smoothflag =Y, a smoothing spline with smoothing factor smoothval is used. If smoothflag =N, a weighted least-squares spline is used.

The adaptive smoothing algorithm (fitmethod="smooth") smoothes the masked image with a set of Gaussian kernels and calculates a signal-to-noise map for each kernel size. The SNR required for the background map is specified by the parameter snr . The background map is then interpolated pixel by pixel from the 2 smoothed maps whose signal-to-noise ratios in the respective pixels bracket the required SNR.

Parameters:

Input files:

Output files:

Examples:

    erbackmap image=image_soft.fits  \
              expimage=image_soft_exp.fits \
              boxlist=boxlist_local.fits \
              detmask=detmask.fits \
              idband=1 \
              emin=200. \
              emax=500. \
              bkgimage=image_soft_bkg.fits \
              cheesemask=image_soft_cheese.fits \
              scut=0.001 \
              mlmin=6 \
              maxcut=0.5 \
              fitmethod=smooth \
              snr=30.  \
              cheesemask_flag='Y'