Detecting and Excising of Point Sources

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'
elowlist=350 ehighlist=1100 scale=0.4
mlmin=15 ratetotal=0.2 dist=50.

for a single band, or

cheese mos1file='mos1S001-allevc.fits'
elowlist='350 2500' ehighlist='1100 8000'
scale=0.4 mlmin=15 dist=50.
ratesoft=0.2 ratehard=0.2 ratetotal=0.2

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 $10^{-14}$ ergs cm$^{-2}$ s$^{-1}$. 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.

Figure 10: Intermediate files produced by cheese. Top Left: the band image. Top Middle: the background image create by esplinemap. Top Right: the exposure map. Bottom Left: the mask showing regions to be searched for sources. Bottom Middle: the sensitivity map. Bottom Right: the source map produced by eboxdetect. Since there is one CCD missing, this is clearly MOS1 from the middle part of the mission.

The output files from cheese are also rather extensive:

- The SAS attitude file (if not already constructed).
- The output from the first pass of eboxdetect.
- The output from the second pass of eboxdetect. As with the previous file, this file is no longer of use once emllist.fits is produced.
- The final source list produce by emldetect. This file will be used by region within cheese. Once satisfactory region files have been produced, this file is no longer useful, and can be stored with the diagnostic files.
- The .fits format region file in detector coordinates produced by region within cheese in band B. This file will be used by mosspectra and pnspectra to remove the point sources from the extracted spectra.
- The .fits format region file in sky coordinates produced by region within cheese in band B. This file will be used by mosspectra and pnspectra.
- The point source mask in sky coordinates produced by make_mask for band B.
- An image of the FOV in band B. This image is diagnostic, to be compared to P-cheeseB.fits to ensure that all of the appropriate sources are removed.
where P is a prefix such as “mos1S001”. If cheese was invoked for a single band then B will be t, else there will be bands s for the softer and h for the harder. There are a number of diagnostic files which will be silently deleted if keepinterfiles=no. These are
- A map of the background in band B made by esplinemap in edetect_chain.
- An exposure map (effective area map) for the FOV in band B made by eexpmap in edetect_chain.
- An exposure mask for the FOV in band B made by emask in edetect_chain. This mask sets the region that will be searched for sources.
- A map of the sensitivity for the FOV in band B produced by esensmap in emldetect.
- The source image maps in band B created by eboxdetect.

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.

Figure 11: MOS1 cheese image from the Abell 1795 observation.