next up previous contents
Next: Timing Analysis Up: An EPIC Data Processing Previous: Fit the Spectrum   Contents


Source Detection

The task edetect_chain is a metatask that does nearly all the work involved with EPIC source detection. It is comprised of seven straightforward tasks that can also be run by hand. Edetect_chain requires input files to be generated and prepared using the tasks atthkgen and evselect; the task emosaic, while not necessary for source detection, does provide a nice mosaicked image for display purposes. Fortunately, these are all quick and straightforward.

In the example below, source detection is done on images in two bands (300 - 2000 eV, and 2000 - 10000 eV, or ``soft'' and ``hard'', respectively) for all three detectors. Users interested in other bands might wish to look at Table 3.2 of the 2XMM Catalogue, which lists several bands and their ECFs (assuming an absorbed power law spectrum, with N$_{\rm H}$ = 3.0 $\times 10^{20}$ cm$^{-2}$ and a photon index of $\Gamma =$ 1.7.)

The example uses the filtered event file produced in §7.3.4.

To detect sources with the GUI:

1)
Call atthkgen in the Available Tools panel.
2)
Verify the name of the working directory, and enter the desired output file name, for example, attitude.fits.
3)
Click ``Run''.
4)
Select the event file (mos1_filt_time.fits) and run heraXmmselect.
5)
In the ``Selection Expression'' box, enter our filtering parameters: (FLAG == 0)&&(PI in [300:2000]). Check the X and Y boxes, and click ``Image''.
6)
In the ``Image'' tab, check the withimageset box, and enter the desired output image name, for example, mos1-s.fits. Set xcolumn to X and ycolumn to Y. Set binning to binSize, ximagebinsize to 22, and yimagebinsize to 22 for the MOS; for the PN, these should be set to 82.
7)
Click ``Run''.
8)
Repeat steps 4 - 7 for each event file, changing the output image name to something appropriate, for example, mos2-s.fits and pn-s.fits.
9)
Set the ``Selection Expression'' text to (FLAG == 0)&&(PI in [2000:10000]) and repeat steps 6 - 8. We will assume the output images are named mos1-h.fits, mos2-h.fits, and pn-h.fits, so that we now have six output images in all.
10)
Call the task emosaic (the mosaicked image can be used for display purposes later; see Figure 7.7). Enter the input images: mos1-s.fits mos1-h.fits mos2-s.fits mos2-h.fits. Enter the output mosaicked image file name, for example, mosaic.fits.
11)
Click ``Run''.
12)
Call the task edetect_chain. Enter the list of images: mos1-s.fits mos1-h.fits mos2-s.fits mos2-h.fits pn-s.fits pn-h.fits. Directly below, enter the names of the event files: mos1_filt_time.fits mos2_filt_time.fits pn_filt_time.fits. Enter the name of the attitude file made by the task atthkgen (attitude.fits). Set the lower PI values (in eV) for the input images by typing: 300 2000 300 2000 300 2000, and do similar for the higher values (2000 10000 2000 10000 2000 10000). The energy conversion factors (ECFs) for this example are 0.878 0.220 0.878 0.220 3.652 0.632. The ECFs convert the source count rates into fluxes; for each detector and energy band, the ECFs depend on the pattern selection and filter used during the observation. For more information, please consult the calibration paper ``SSC-LUX-TN-0059'', available at the XMM-Newton Science Operations Center or see Table 3.2 in the 2XMM Catalogue User Guide. Those used here are derived from PIMMS using the flux in the 0.1-10.0 keV band, a source power-law index of 1.9, an absorption of $0.5\times10^{20}$. Set the flag to use out-of-time events in esplinemap to no.
13)
Click ``Run''.

To detect sources in the Command Window:

1)
Make the attitude file by typing
atthkgen atthkset=attitude.fits timestep=1

where

atthkset - output file name
timestep - time step in seconds for attitude file

2)
Now make the event files with evselect.
evselect table=mos1_filt_time.fits withimageset=yes imageset=mos1-s.fits
$   $ imagebinning=binSize xcolumn=X ximagebinsize=50 ycolumn=Y yimagebinsize=50
$   $ filtertype=expression expression='(FLAG == 0)&&(PI in [300:2000])'

where

table - event list
withimageset - flag to create an image
imageset - fits image name to be created
imagebinning - how to bin the image
xcolumn - table column to use for the X axis
ximagebinsize - binning in X axis
ycolumn - table column to use for the Y axis
yimagebinsize - binning in Y axis
filtertype - type of filtering
expression - filtering expression, select events in the PI channel range 300-2000 eV

3)
Repeat step 2 for each detector, changing the output file name as needed. We will assume here that they are named mos2-s.fits and pn-s.fits.
4)
Repeat steps 2 and 3, but change the filtering expression to (FLAG == 0)&& (PI in [2000:10000]). We will assume the output images are named mos1-h.fits, mos2-h.fits, and pn-h.fits, so that we now have six output images in all.
5)
Create a merged count image to display later (see Figure 7.7):
emosaic imagesets='mos1-s.fits mos1-h.fits mos2-s.fits mos2-h.fits pn-h.fits pn-s.fits' $   $ mosaicedset=mosaic.fits

where

imagesets - list of count images
mosaicedset - output image name
6)
Run edetect_chain.
edetect_chain imagesets='mos1-s.fits mos1-h.fits mos2-s.fits
$   $ mos2-h.fits pn-s.fits pn-h.fits' eventsets='mos1_filt_time.fits
$   $ mos2_filt_time.fits pn_filt_time.fits' attitudeset=attitude.fits
$   $ pimin='300 2000 300 2000 300 2000' pimax='2000 10000 2000 10000 2000 10000'
$   $ likemin=10 witheexpmap=yes ecf='0.878 0.220 0.878 0.220 3.652 0.632'
$   $ eboxl_list=eboxlist_l.fits eboxm_list=eboxlist_m.fits
$   $ eml_list=emllist.fits esp_withootset=no

where

imagesets - list of count images
eventsets - list of event files
attitudeset - attitude file name
pimin - list of minimum PI channels for the bands
pimax - list of maximum PI channels for the bands
likemin - maximum likelihood threshold
witheexpmap - create and use exposure maps
ecf - energy conversion factors for the bands
eboxl_list - output file name for the local sliding box source
$   $ detection list
eboxm_list - output file name for the sliding box source detection in
$   $ background map mode list
eml_list - output file name for maximum likelihood source detection list
esp_withootset - Flag to use an out-of-time processed PN event file,
$   $useful in cases where bright point sources have left streaks in the PN data
esp_ooteventset - The out-of-time processed PN event file
The energy conversion values (ECFs) can be suppled to convert the source count rates into fluxes. The ECFs for each detector and energy band depend on the pattern selection and filter used during the observation. For more information, please consult the calibration paper ``SSC-LUX-TN-0059'', available at the XMM-Newton Science Operations Center or see Table 3.2 in the 2XMM Catalogue User Guide. Those used here are derived from PIMMS using the flux in the 0.1-10.0 keV band, a source power-law index of 1.9, an absorption of $0.5\times10^{20}$.

Figure 7.7: The mosaicked EPIC image created by emosaic, viewed with fv.

\includegraphics[scale=0.5]{mos-pn-mosaic-screenshot.eps}


next up previous contents
Next: Timing Analysis Up: An EPIC Data Processing Previous: Fit the Spectrum   Contents
Lynne Valencic 2011-07-26