EPIC source finding in overlapping exposures thread: step-by-step
Introduction
This thread explains how to apply EPIC source detection tasks
to a set of overlapping EPIC observations. The steps described here are
needed when users want to exploit the maximum detection sensitivity in
areas of the sky, where two or more EPIC observations overlap, like it
is the case for EPIC Mosaic observations. Nevertheless, the
procedure described here can be applied for the case where different independant
observations overlap.
The example used here to illustrate the procedure uses a Jupiter
observation taken in Mosaic mode (ODF 0200080701).
Expected Outcome
This thread produces a mosaic image of several XMM-Newton observations,
or pointings within a given observations, together with the source list
that results from running source detection algorithms over the overlapping fields.
It is assumed that the processed eventlists, like the ones produced by
the SAS tasks epproc
and emproc,
and corresponding attitude and summary files as well as the ccf.cif file are available for each
observation (ODF).
This threads deals with both, different observations of overlapping fields and
observations that contain different pointings, like it is the
case of EPIC Mosaic mode observations. Two steps are needed in order to
run the source detection algorithms in overlapping EPIC fields. In the first
step, the task emosaic_prep
separates processed EPIC calibrated event files
(as output from epproc and emproc)
taken in Mosaic mode into several pseudo-exposures corresponding to the
different pointings of the mosaic observation. This step is also
necessary when combining different observations of overlapping fields
since emosaic_prep
also prepares the data and creates the necessary file structure needed
by the task emosaicproc.
In this later case, since only one pointing is
available within the given observations, only one pseudo-exposure will be
created per observation. In the second part of the process, emosaicproc
performs coherently source detection on several exposures from the same
or different observations, or pseudo-exposures
as created by the task emosaic_prep.
Before proceeding with this thread, the following steps are mandatory.
Follow the SAS Startup thread and define the enviroment variables
SAS_ODF and SAS_CCF. The variable
SAS_ODF must point to the *SUM.SAS file, not just to the
ODF directory. For this particular case, it would be advisable to run the task odfingest with the options
-odfdir=<full_path_to_odf_directory> -withodfdir=yes
Follow the Produce EPIC Event Lists thread and produce EPIC-pn and
EPIC-MOS event files.
If needed, produce GTI files and filter event files for each EPIC camera following the
EPIC Filtering for Background Flares thread.
Running source detection over a Jupiter observation taken in Mosaic mode (ODF 0200080701).
The first step in the process is to run the SAS task
emosaic_prep.
emosaic_prep will break the event file
into several pseudo-exposures. In this case where the observation has
been taken under
the EPIC Mosaic mode, each pseudo-exposure will correspond to a
different pointing of the mosaic observation.
In this particular example, all EPIC cameras are used, however, any combination of
two cameras will produce the same result. To run emosaic_prep
it is mandatory to provide the names of the EPIC event files and
attitude file.
if GTI filtering wants to be applied to the EPIC event files, it is possible
to provide the file name that contains the definition of GTIs for
each EPIC camera through the parameters:
pngtifile='pngti.fits', mos1gtifile='mos1gti.fits' and
mos2gtifile='mos2gti.fits', assuming that pngti.fits,
mos1gti.fits and mos2gti.fits are the corresponding
file names.
emosaic_prep will create the following directory structure
under the SAS_ODF directory, where each subdirectory corresponds to each
of the pointings contained in the observation,
links to the relevant files in the SAS_ODF directory, a file
containing the GTI interval corresponding to pointing 001
(gti_positions_1.ds), and the corresponding EPIC
event files filtered in time to include pointing 001. The same
applies to the other pointings.
The second step in the process is to run the SAS task emosaicproc.
The task accepts any combination of instruments and pointings. If
we use all the available instruments and pointings, the call to emosaicproc
would look like this,
by default, if not specified, the task will use three energy ranges:
300-1000, 1000-7500 and 7500-12000 eV for EPIC-pn and
200-1000, 1000-7500 and 7500-12000 eV for EPIC-MOS
if different energy ranges want to be specified, the following
parameters have to be provided in the call to emosaicproc,
pnPImin='300 1000 7500'
pnPImax='1000 7500 12000'
mos1PImin='200 1000 7500'
mos1PImax='1000 7500 12000'
mos2PImin='200 1000 7500'
mos2PImax='1000 7500 12000'
where one or more energy ranges can be defined. As in the case of emosaic_prep,
GTI files can be provided at this stage in the call to emosaicproc
for each of the EPIC cameras
through the parameters: pngtilist='pngti.fits',
mos1gtilist='mos1gti.fits' and
mos2gtilist='mos2gti.fits', assuming that pngti.fits,
mos1gti.fits and mos2gti.fits are the corresponding
file names.
The output of emosaicproc
is stored in the subdirectory ./prep_mosaic under the directory
SAS_ODF. Three main files are produced:
mosaic_eboxlist.fits: This file is produced by
the SAS task eboxdetect,
hence the description of what can be found inside this table can be found
in the documentation of the task. However, the source parameters are
averaged (e.g. RATE, FLUX, HR) or summed (e.g. SCTS, EXP_MAP)
over the mosaic pointings.
mosaic_emllist.fits: This file is produced by
the SAS task emldetect,
hence the description of what can be found inside this table can be found
in the documentation of the task. However, the source parameters are
averaged (e.g. RATE, FLUX, HR) or summed (e.g. SCTS, EXP_MAP) over the
mosaic pointings.
mosaic_image.ds: image of the final mosaic
image created by the SAS task emosaic.
It is possible to display the detected sources on top of the mosaic image,
Mosaic image of the combined observation,
including all three EPIC cameras, with
detected sources overlaid.
For each pointing a series of products are also created which are stored
inside the corresponding prep_mosaic_* directory. For example,
images are produced for each one of the specified energy ranges and EPIC
instrument. It is then posible, as shown in the figure below, to produce a mosaic image, for display
purposes only, to combine the images over the three energy ranges specified and three EPIC cameras,
Exposure maps (with and without vignetting, needed for mask generation), detection masks, and background maps are also created
together with a source list (eboxlist_l.fits) (which is the
result of running source detection combined for
all cameras and energy bands simultaneously) for each
individual pointing which can be used to
display the sources overlaid in the mosaic image,
From top left to bottom right, mosaic images of
each one of the individual pointings (including the three EPIC cameras
and three energy ranges), prep_mosaic_001, prep_mosaic_002,
prep_mosaic_003, prep_mosaic_004 with detected sources overlaid.
Last Updated: 16 April 2010
Caveats
With the process explained here, it is also possible to carry out source
detection on
overlaping fields from different observations. Both SAS tasks described
have to be used in a similar manner, where first, emosaic_prep
has to be run on each individual observation to create the corresponding
./prep_mosaic_* directories, even if only one pointing is present per
observation. In this case of overlaping fields from different
observations, the parameter pseudoexpid should be used when calling emosaic_prep
for each observation. For each call, pseudoexpid should take different values such that these values are
spaced at least a number equal to the number of EPIC exposures in the
preceding observation. The maximum value that pseudoexpid can
have is 99. Once done, emosaicproc
can be run by selecting any given combination of observations and cameras.
Note that the required computer memory is proportional to the number of
input images and the size of each input image. For example, for a run with
36 input images, eboxdetect requires more
than 1 Gbyte of memory and emldetect more than 700 Mbyte. This can be
reduced by reducing the number of energy bands.