The Chains

The commands are :

emchain
epchain
epchain withoutoftime=true


The emchain task will produce event files for all CCDS for MOS1 and MOS2 for imaging exposures, as well as the outer CCDs, 2 through 7, for timing observations. However, epchain, by default, will create event files for only the first imaging exposure and must be run explicitly calling out the exposure number if there are multiple exposures (e.g., epchain exposure=2) How would you know that there is more than one pn segment? There is, as usual, more than one way.

In the ODF directory, look for files of the form *_PN*IME*.FIT. There will be one file for each of the 12 CCDs for each segment. In the file name, the segment number (like S001) follows directly after the `PN'. An even easier way to determine how many pn segments there are is to type “epchain exposure=99”; you will get a list of pn segments:

-:- EXPOSURE = 99
-:- 2 IMAGING exposures in ODF:
-:- 1: 0100_0097820101_PNS005 IM
-:- 2: 0100_0097820101_PNS013 IM


followed by an error message. Here there are two exposure segments, 1 and 2.

The output of emchain and epchain is prodigious. Of that output you will want to retain the four (or more) files containing the *EVLI*.FIT string[*]. Example file names are given Table 5 in the em/epchain column.



Table 5: Event File Names
Detector em/epchain em/epproc
MOS1 P0204870101M1S001MIEVLI0000.FIT 0749_0204870101_EMOS1_S001_ImagingEvts.ds
MOS2 P0204870101M2S002MIEVLI0000.FIT 0749_0204870101_EMOS2_S002_ImagingEvts.ds
pn P0204870101PNS003PIEVLI0000.FIT 0749_0204870101_EPN_S003_ImagingEvts.ds
pn OOT P0204870101PNS003OOEVLI0000.FIT 0749_0204870101_EPN_S003_ImagingEvts.ds

We suggest deleting (or saving in their own subdirectory) all of the other .FIT files. For simplicity, for the rest of this cookbook, we will assume that these *EVLI*.FIT files have been renamed to mos1S001.fits, mos2S002.fits, pnS003.fits, and pnS003-oot.fits. These names are not arbitrary, as several ESAS tasks are still a bit picky about the possible input file names because they use the EXPIDSTR parameter in the header to construct file names. See Appendix B for an example of renaming.

One of the common panic-inducing discoveries that inexperienced users make, is that sequential runs of emchain and epchain do not produce the same results. This is due to both chains introducing a randomization in position (one CCD pixel), time (one frame), and energy (one ADU=5 eV). This randomization converts a distribution of integers into a pseudo-continuous distribution in order to avoid aliasing. It is sometimes useful to turn off randomization when debugging.