XMM-Newton SAS Home Page
XMM-Newton Science Analysis System


epchain (epchain-8.82.2) [xmmsas_20230412_1735-21.0.0]


General

Figure 1: Organization of the EPIC-pn chain (only main tasks shown for clarity)
\begin{figure}\resizebox{\hsize}{!}{\epsfig{file=pn-flow.eps,clip=true}}
\end{figure}

The epchain task chains and loops over all first-level EPIC PN tasks to produce an event list ready to be exported as a PPS product. The epchain script is executed with a number of command line input parameters (arguments to the script). All parameters are optional, the parameter order is arbitrary. Parameters are given in the form “parameter=value”. The implemented list of parameters and the corresponding default values are shown below. Note that in the case of the same parameter appearing twice on the command line the first instance is used (this behavior is different from other SAS tasks where the second instance is used).

Input files corresponding to the specified readout mode, CCD and exposure number are searched for in the given ODF directory. If desired epchain can also be directed to select all exposures or all exposures using the selected readout mode for processing. Badpixfind files (created by badpixfind and to be used by badpix) will be placed in badpixset. Output files are created in the current working directory.

The PN mini pipeline is sketched out in Fig. 1. At the beginning of the epchain script the task atthkgen creates an attitude history file, called atthk.dat, which will be used by attcalc. The main subchain (epframes, badpixfind, badpix, epevents and attcalc) creates one event list for a single exposure and for a given list of CCDs from all the relevant ODF material and bad pixel lists.

The main subchain loops over all specified CCDs, calling in sequence:

  1. epframes to process a CCD, exposure and datamode specific ODF file, creating the output events list rawevents##.dat and the GTI data set gti##.dat (## is the loop index, i.e. the CCD number currently in use)
  2. badpixfind to find new bad pixel [optional]
  3. badpix to process the rawevents list, adding the BADPIX extension
  4. epreject to optionally correct the energy scale in specific pixels, and to flag soft flare events (turned off by default; see description of task epreject for details)
  5. epnoise to optionally flag low energy detector noise (turned off by default; see description of task epnoise for details)
  6. epevents to process the event list file, flag trailing events, perform pattern recognition, gain and CTI corrections, and compute linearized detector coordinates to create the calibrated events list events##.dat
  7. attcalc to calculate the X and Y sky coordinates
  8. epfast for RDCTI correction in FAST modes
  9. epexposure for TIME randomization and EXPOSURE extension screening

Finally, making use of the common PN and MOS task evlistcomb, the CCD specific data sets are merged into a single events list. evselect selects all those events arriving in good time intervals and writes an output file according to XMM-SOC-ICD-0006-SSC (v2.1) ([1]).

It is highly recommended to also read the documentation of epframes and epevents.

XMM-Newton SOC -- 2023-04-16