The task
emchain calls for each CCD the required XMMSAS
tasks and then combines the files
together into the final merged event file.
It makes use of the following
SAS tasks as described on
this postscript file).
The task
emchain
can be control by parameters, most of them are used for
the single tasks that are called by
emchain.
All steps have to be performed per CCD:
emframes: analyses the information of a frame (auxillary) file
for one CCD/node of EPIC-MOS over one exposure. It adds columns for the quality
flag, the dead time fraction, the time and the
GATTI value
to the file and
performs several tests and computes the specific Good Time Intervals (GTI).
emframes auxiliaryset=/xmm_archive/orbitData/0070/0070_0123700101_M2S00200AUX.FIT \
frameset=frame04.out withodfeventset=Y \
odfeventset=/xmm_archive/orbitData/0070//0070_0123700101_M2S00240IME.FIT \
neweventset=Y outeventset=event.in writegtiset=Y \
outgtiset=ccdgti.in
The example is for the 2nd observation of Camera M2 for CCD 4.
badpixfind: Finds new bad pixel and creates a new list,
badpix: Adding badpix extension to an events list and
produces a badpix table
that contains the information of the position and the type of defect of the bad
pixel.
The badpixelsets are
written to a new directory `badpixfind':
badpix eventset=event.in badpixset=../badpixfind/badpixfind04
emevents: Defines the final list of events, their position and time
emevents odfeventset=event.in eventset=event04.fits
where odfeventset defines the input file and eventset
the output file. Please check in the ODF if there are offset/variance files
available for the specific CCD/observation your are working on (they have the
letters OVE in the end of the name, e.g. 0070_0123700101_M1S40110OVE.FIT
for observation number 401 and CCD 1. If those file(s) are there, you have to
add withoffvarsets=y offvarsets=`all OVE files in that observation'.
attcalc: transformation of detector into sky coordinates
attcalc eventset=events04.fits refpointlabel=pnt atthkset=atthk.dat \
withmedianpnt=Y attitudelabel=ahf
emenergy: Assigns energy and quality flag to events for one
node of one EPIC-MOS CCD over one exposure. It prepares the spectral analysis of
EPIC MOS data.
emenergy ineventset=events04.fits neweoutput=y outeventset=events04_out.fits
where ineventset is the input file, newoutput is a switch
to create a new output file, and outeventset is the output file.
evlistcomb: combines single CCD event files into one merged output
event file. Here is the chance to choose the columns from ODFs that you want in
the output event file. It is only possible to choose your own output file name
by using the parameter imagingset in the line command task
evlistcomb. In the chain (line command task as well as GUI) it has a
fixed name, e.g. as in our example P0123700101M2S002MIEVLI0000.FIT
In our example we choose TIME, X, Y, PI, and PATTERN of CCDs 1,4, 5, and
7, which are the CCDs in the middle of the detector. The column CCDNR in the
events file is created automatically by the evlistcomb task.
evlistcomb eventsets="events01.out events04.out events05.out events07.out" \
instrument=emos imagingset=events.fits \
emosimgcolnames='"TIME" "X" "Y" "PI" "PATTERN"' \
emosimgcoltypes='"double" "int32" "int32" "int16" "int8"'
The fact that you have to put `emosimgcolnames' and `emosimgcoltypes' with the
right types is not very user-friendly. Here is a list of all columns of an
input events file and the types:
emosimgcolnames emosimgcoltypes
TIME double
RAWX int16
RAWY int16
DETX int16
DETY int16
X int32
Y int32
PHA int16
PI int16
FLAG int32
PAT_TYP int16
PAT_IND int16
PAT_ORI int16
PATTERN int8
PAT_ID int16
PAT_SEQ int8
FRAME int32
PHA_CTI int16
CCDNR int8