Research & Science Home ESA Public Web Site Sci-Tech Portal      XMM-Newton Public Web Site XMM-Newton Sci-Tech Portal
Astrophysics Missions Planetary Exploration Missions Solar Terrestrial Science Missions Fundamental Physics Missions Science Faculty

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.

SAS Tasks to be Used

Prerequisites

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).

Useful Links

Description of EPIC Mosaic Mode in the User Handbook

Caveats




Procedure

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.

    1. 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.

      emosaic_prep \
        pnevtfile='0727_0200080701_EPN_S001_ImagingEvts.ds' \
        mos1evtfile='0727_0200080701_EMOS1_S002_ImagingEvts.ds' \
        mos2evtfile='0727_0200080701_EMOS2_S003_ImagingEvts.ds' \
        atthkfile='0727_0200080701_AttHk.ds'


      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 \
        pnevtfile='0727_0200080701_EPN_S001_ImagingEvts.ds' \
        pngtifile='pngti.fits' \
        mos1evtfile='0727_0200080701_EMOS1_S002_ImagingEvts.ds' \
        mos1gtifile='mos2gti.fits' \
        mos2evtfile='0727_0200080701_EMOS2_S003_ImagingEvts.ds' \
        mos2gtifile='mos1gti.fits' \
        atthkfile='0727_0200080701_AttHk.ds'

    2. 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,
       ./prep_mosaic_001/
       ./prep_mosaic_002/
       ./prep_mosaic_003/
       ./prep_mosaic_004/
      

    3. Each of the above subdirectory contains the following information. For example, prep_mosaic_001/ contains,
      0727_0200080701_EPN_S001_ImagingEvts.ds -> ../0727_0200080701_EPN_S001_ImagingEvts.ds
      0727_0200080701_EMOS1_S002_ImagingEvts.ds -> ../0727_0200080701_EMOS1_S002_ImagingEvts.ds
      0727_0200080701_EMOS2_S003_ImagingEvts.ds -> ../0727_0200080701_EMOS2_S003_ImagingEvts.ds
      0727_0200080701_AttHk.ds -> ../0727_0200080701_AttHk.ds
      0727_0200080701_SCX00000SUM.SAS -> ../0727_0200080701_SCX00000SUM.SAS
      ccf.cif -> ../ccf.cif
      gti_positions_1.ds
      0727_0200080701_EPN_S001_ImagingEvts_P001.ds
      0727_0200080701_EMOS1_S002_ImagingEvts_P001.ds
      0727_0200080701_EMOS2_S003_ImagingEvts_P001.ds
      


      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.

    1. 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,

      emosaicproc \
        pnevlist='./prep_mosaic_001/0727_0200080701_EPN_S001_ImagingEvts_P001.ds \
                  ./prep_mosaic_002/0727_0200080701_EPN_S001_ImagingEvts_P002.ds \
                  ./prep_mosaic_003/0727_0200080701_EPN_S001_ImagingEvts_P003.ds \
                  ./prep_mosaic_004/0727_0200080701_EPN_S001_ImagingEvts_P004.ds' \
        mos1evlist='./prep_mosaic_001/0727_0200080701_EMOS1_S002_ImagingEvts_P001.ds \
                    ./prep_mosaic_002/0727_0200080701_EMOS1_S002_ImagingEvts_P002.ds \
                    ./prep_mosaic_003/0727_0200080701_EMOS1_S002_ImagingEvts_P003.ds \
                    ./prep_mosaic_004/0727_0200080701_EMOS1_S002_ImagingEvts_P004.ds' \
        mos2evlist='prep_mosaic_001/0727_0200080701_EMOS2_S003_ImagingEvts_P001.ds \
                   ./prep_mosaic_002/0727_0200080701_EMOS2_S003_ImagingEvts_P002.ds \
                   ./prep_mosaic_003/0727_0200080701_EMOS2_S003_ImagingEvts_P003.ds \
                   ./prep_mosaic_004/0727_0200080701_EMOS2_S003_ImagingEvts_P004.ds'


      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.

    2. 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,

      srcdisplay imageset=./prep_mosaic/mosaic_image.ds boxlistset=./prep_mosaic/mosaic_eboxlist.fits


      Mosaic image of the combined observation, including all three EPIC cameras, with detected sources overlaid.


    3. 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,

      emosaic imagesets='./prep_mosaic_001/EPN_image_e0.fits ./prep_mosaic_001/EPN_image_e1.fits \
                         ./prep_mosaic_001/EPN_image_e2.fits ./prep_mosaic_001/EMOS1_image_e0.fits \
                         ./prep_mosaic_001/EMOS1_image_e1.fits ./prep_mosaic_001/EMOS1_image_e2.fits \
                         ./prep_mosaic_001/EMOS2_image_e0.fits ./prep_mosaic_001/EMOS2_image_e1.fits \
                         ./prep_mosaic_001/EMOS2_image_e2.fits' \
              mosaicedset'=./prep_mosaic_001/prep_mosaic_001.ds'


      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,

      srcdisplay imageset=./prep_mosaic_001/prep_mosaic_001.ds boxlistset=./prep_mosaic_001/eboxlist_l.fits


      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.



   Copyright 2012© European Space Agency. All rights reserved.
This page was last updated on 11 August, 2011.