Create smooth background maps by masking source regions in input image and smoothing either by 2D spline fit or an adaptive smoothing algorithm. The task accepts source lists created by ERBOX orERMLDET as input.
The option "smooth" is recommended for all types of observations, the "spline" can be considered as obsolete. 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. For the setting (fitmethod="smooth" an adaptive smoothing algorithm is used to create the background map. If an exposure map is read in (expima_flag="Y"), a count rate map is calculated by dividing the input science image with the exposure map. Source regions are masked out by multiplying the image with the source mask. The adaptive smoothing algorithm (fitmethod="smooth") then convolves the masked count image or count rate image with a set of 8 Gaussian kernels and calculates a signal-to-noise map for each kernel size. The size σ1 of the smallest kernel is set by parameter smoothval in units of image pixels. The sizes of the i=1..8 kernels are σi = σ1 * (√2)i. Also the source masks are convolved with the same kernels and each smoothed image is divided by the smoothed mask in order to account for the masked out regions. Smoothed count rate images are multiplied with the exposure map. The background map is then calculated for each image pixel by finding the two kernel sizes σi, σi+1, whose signal-to-noise maps bracket the required SNR defined by parameter snr. The background value of the pixel is the interpolated from the 2 smoothed images i, i+1.
The task ERBACKMAP can also be used to adaptively smooth an image without removing any source regions.
Source list with input positions. FITS binary table in the format as written by task ERBOX or ERMLDET. The file name is definbed by task parameter boxlist.
FITS files as generated by task EVTOOL. The primary FITS extension of each file contains a science image as an int32 array. The file name is defined by parameter image The task ERBACKMAP always works one one science image at a time.
FITS image ( real32) as created by task EXPMAP for the same instruments, energy bands, and WCS coordinate systems as the science images. The file name is defined by parameter expimage
FITS image ( int8) as created by task ERMASK with file name defined by parameter detmask. The image areas with value =1 are used for detection, areas with value =0 are masked out.
FITS image ( real32) containing the smoothed background map. The file name is defined by parameter bkgimage . The unit of the background map is counts/(image pixel).
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. \
smoothval=15.0 \
cheesemask_flag='Y'
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=1.0E6 \
maxcut=0.5 \
fitmethod=smooth \
snr=30. \
smoothval=4.0 \
cheesemask_flag='Y'