How to reprocess ODFs to generate calibrated and concatenated EPIC event lists

Introduction

This thread illustrates how to reprocess Observation Data Files (ODFs) to obtain calibrated and concatenated event lists.

Expected Outcome

The user will obtain calibrated and concatenated event lists which can be directly used to generate scientific products (images, spectra, light curves) through the SAS tasks evselect or xmmselect.

SAS Tasks to be Used

Prerequisites

Useful Links

Alternatively to following this thread, the pipeline products contain calibrated and concatenated event lists. Both ODFs and pipeline products can be downloaded from the XMM-Newton Science Archive.

Caveats

Last Reviewed: 4 june 2019, for SAS v18.0

Last Updated: 23 October 2014

 


Procedure

 

Run the EPIC reduction meta-tasks.

  • For EPIC-MOS:

      emproc

  • and for EPIC-pn:

      epproc

That's it! The default values of these meta-tasks are appropriate for most practical cases. You may have a look at the next section to learn how to perform specific reduction sub-tasks using emproc or epproc.

The files produced by epproc are the following:

  • ????_??????????_AttHk.ds, the reconstructed attitude file
  • ????_??????????_EPN_????_01_Badpixels.ds, one table per reduced CCD containing the bad pixels
  • ????_??????????_EPN_????_ImagingEvts.ds, the calibrated and concatenated event list, which shall be used as an input to extract scientific products via evselect or xmmselect.

The files produced by emproc are conceptually the same. The main difference in the naming convention is that the string EPN is replaced by EMOS1 and EMOS2 for each EPIC-MOS camera, respectively.

 

How to accomplish specific reduction tasks
 

emproc and epproc are highly flexible tasks, which allow the user to perform a wide range of customized reduction tasks. Some emproc examples are listed below. The same customized reduction tasks can be performed for the EPIC-pn as well, just by substituting emproc with epproc in the commands.

  • if you want to reduce only one of the cameras (EPIC-MOS1 in the example):

     emproc selectinstruments=yes emos1=yes

  • if you want to reduce only a subsample of exposures:

     emproc withinstexpids=yes instexpids="M1S001 M2S002"

  • if you want to reduce data from 1 CCD only (#4 and #5 in the example):

     emproc selectccds=yes ccd4=yes ccd5=yes

  • if you want to change the reference pointing for the calculation of the sky coordinates to a value of your choice:

     emproc referencepointing=user ra=34.65646 dec=-12.876546

  • if you want to filter the event list events, using an external Good Time Interval (GTI) file (see the corresponding thread on how to filter event files for flaring particle background by creating a GTI file):

     emproc withgtiset=yes gtiset=mygti.gti filterevents=yes

Please be aware that if you want to supply coordinates for the analysis of the EPIC-pn Timing and Burst modes, the command is slightly different, e.g.:

   epproc withsrccoords=yes srcra=34.65646 srcdec=-12.876546

Parameters can be combined to accomplish simultaneously two or more of the above tasks during the same run.

The user is referred to the on-line documentation of emproc and epproc for a complete list of the available options.

 

Reduction of EPIC-pn Timing Mode exposures
 

Most exposures in EPIC-pn Timing Mode are affected by X-ray Loading (XRL; cf. Sect.3.1 in Guainazzi et al., 2013, XMM-SOC-CAL-TN-0083). Furthermore, a residual dependence of the energy scale on the total count rate is corrected through the "Rate-Dependent PHA" correction (Guainazzi, 2014, XMM-CCF-REL-312). In order to correct for these effects a set of default calibration settings have been identified. As of SAS v14.0, this is controlled by a single parameter within the tasks epproc and epchain. This parameter is called withdefaultcal and is set to yes by default. Setting withdefaultcal=yes implies runepreject=yes withxrlcorrection=yes runepfast=no withrdpha=yes. So one shall run the EPIC-pn reduction meta-tasks as follows:

   epproc

or:

   epchain datamode=TIMING

For more information please refer to the documentation of epproc and epchain.

 

Reduction of EPIC-pn Burst Mode exposures
 

Most exposures in EPIC-pn Burst Mode are affected by X-ray Loading (XRL; cf. Sect.3.1 in Guainazzi et al., 2013, XMM-SOC-CAL-TN-0083). Furthermore, a residual dependence of the energy scale on the total count rate is corrected through the "Rate-Dependent CTI" correction. In order to correct for these effects a set of default calibration settings have been identified. As of SAS v14.0, this is controlled by a single parameter within the tasks epproc and epchain. This parameter is called withdefaultcal and is set to yes by default. Setting withdefaultcal=yes implies runepreject=yes withxrlcorrection=yes runepfast=yes withrdpha=no. So one shall run the EPIC-pn reduction meta-tasks as follows:

   epproc burst=yes

Notice the inclusion of the extra parameter burst=yes in the call to epproc. The meta-task epchain also needs an extra parameter:

   epchain datamode=BURST

 

Should I indeed bother to regenerate my event lists?
 

Concatenated and calibrated EPIC event lists are already available in the PPS Pipeline Products. These are produced with the most updated software and calibrations available at the moment the observation was performed and - normally a couple of weeks later - the ODF are produced. There is therefore no need for you to regenerate the EPIC event lists yourself, unless substantial changes in the software and/or calibration occurred between the time when the PPS Pipeline Products were generated and the moment when you are analyzing the data. Of course, there is no general answer or recipe one can apply to decide if/when this is the case. In order to collect all the available and necessary elements to formulate your judgment, follow these steps:

  1. check in the XMM-Newton Science Archive the SAS version and the date when the Calibration Index File was generated to produce the PPS Pipeline Products;
  2. verify in the SAS release notes the software changes between the version employed to produce the PPS Pipeline Products and the latest SAS version;
  3. verify in the CCF release notes the changes in the calibration files between the moment when PPS Pipeline Products were generated and the moment your analysis is being performed.

 

If you feel lost or unsure, and prefer to stay on the safe side, you had probably better regenerate your EPIC calibrated event lists.


 

Caveats

None