If you are using ESAS, then you are probably interested in the diffuse emission. In that case, it makes sense to identify and remove the point sources. Granted, most point sources have power law spectra that are easily distinguished from the spectrum of the diffuse emission. However, the point sources are contributing counts that are not of interest and increase the noise level. Thus, it is useful to remove them entirely at an early stage of the analysis.
The XMM-ESAS cheese task runs edetect_chain to create source lists and masks (see Figure 11) for use in excising sources from spectra and images. In general for the analysis of diffuse emission it is desirable to remove the contribution of point sources in the field to a uniform threshold. The cheese task will combine both MOS and pn data for the source detection creating images and exposure maps in a selected single band or selected soft, hard, and total (combined) bands. It will create source lists that then can be used to create source-excluded spectra and make “Swiss-cheese” masks for image processing.
The cheese routine was formerly only a script that was intended to call standard SAS tasks that create the images required to run edetect_chain, to call edetect_chain itself, to call the SAS tasks that create region files, and then to call the ESAS program make_mask. The current cheese routine is a SAS task that does much the same thing. The advantage of using cheese is that it produces a reasonable point source mask without much parameter fiddling, and without requiring much interaction with the source detection routine itself. The disadvantage of cheese is that it is not that flexible. As soon as you have, for example, wholly overlapping observations, you will want follow what cheese does, but without using cheese, as discussed below. The functionality of cheese can be reproduced with your own script, with whatever modifications that you need. The following will both demonstrate cheese and what you need to do to create cheese-like outputs for use by other ESAS routines.
The call for cheese is extensive, e.g.:
cheese mos1file='mos1S001-allevc.fits'
mos2file='mos2S002-allevc.fits'
pnfile='pnS003-allevc.fits'
pnootfile='pnS003-allevcoot.fits'
elowlist=350 ehighlist=1100 scale=0.4
mlmin=15 ratetotal=0.2 dist=50.
keepinterfiles=no
for a single band, or
cheese mos1file='mos1S001-allevc.fits'
mos2file='mos2S002-allevc.fits'
pnfile='pnS003-allevc.fits'
pnootfile='pnS003-allevcoot.fits'
elowlist='350 2500' ehighlist='1100 8000'
scale=0.4 mlmin=15 dist=50.
ratesoft=0.2 ratehard=0.2 ratetotal=0.2
keepinterfiles=no
for multiple bands. The cheese routine can be run on a maximum of one event file per instrument, and a maximum of two energy bands. Note well that cheese will accept only one MOS1 observation, one MOS2 observation, and one pn observation. This constraint is placed by the underlying edetect_chain routine. Thus, if you have multiple observation segments for each instrument, merge all the segments for each instrument before submitting to cheese. See ยง10.2. The limitation in bands per instrument is placed by cheese. It could be increased in future is there were a pressing need.
If data from one of the instruments is missing, or needs to be excluded, just don't set the parameter for that instrument's file name. The scale=0.5 is the PSF threshold to which the point sources are masked, and is in terms of the fraction of the local background (i.e., a value of 0.5 means that the point source is removed down to a level where the surface brightness of the point source is one half of the surrounding background). The ratesoft=0.2 ratehard=0.2 ratetotal=0.2 parameters are the point-source flux thresholds in units of ergs cm s. The dist=50.0 is the minimum separation for point sources in arc seconds (this avoids the excision of large areas of bright extended sources like the inner regions of clusters of galaxies). However, the dist parameter may need to be “tuned” to get the desired result. The elowlist=400 and ehighlist=1100 (for one band) and elowlist='400 2000' and ehighlist='1100 7200' (for two bands) are the energy band limits in eV for the source detection. The energy conversion factors used by edetect_chain are only approximate, so the flux limits specified are only approximate as well.
The output files from cheese are also rather extensive:
Now, it will be noted by even the least observant that we build regions in both detector and sky coordinates. This might seem duplicative. The problem is that the arfgen and rmfgen routines require selection criteria in detector coordinates. However, for comparison with images or source catalogues, one generally needs sky coordinates. Thus, we create region lists in both coordinate systems. The final mask to be applied to images (the cheese mask) is created solely in sky coordinates.