SAS home  

  SAS Watchout items  

  List of SAS threads  

Removing Out-of-Time (OoT) events from EPIC spectra and images

In EPIC imaging modes, photons are not only registered during the actual integration interval, but also during the readout of a CCD. These so called Out-of-Time (OoT) events gets a wrong RAWY value assigned, and thus eventually a wrong energy correction. OoT events broaden the spectra features, and create a strip of wrongly reconstructed position events. The fraction of OoT events scales with the (mode-dependent) ratio of integration and readout time, and is highest for pn Full Frame (6.3%) and Extended Full Frame (2.3%) Mode (the user is referred to the XMM-Newton Users' Handbook for more details). It is important to stress that for most targets a correction of OoT events in the spectrum is not necessary. In any case, a correction is only necessary if OoT events overlap with or are caused by the source under spectral investigation.

The OoT events correction is a "two-step" process:

  1. generation of an OoT event list (together with a standard observation even list)
  2. Removing of OoT events from an image or spectrum
These steps are described below. In the following example, it will be assumed that a user intends to remove OoT events from a pn exposure, taken in Full Frame Mode.

Generation of an OoT event list

  1. set up your SAS environment (following the SAS start-up thread)

  2. run epchain to generate a OoT event list (PiiiiiijjkkPNblllOOEVLInmmm.FIT)
    epchain runbackground=N keepintermediate=raw withoutoftime=Y
  3. run epchain to generate an observation even list (PiiiiiijjkkPNblllPIEVLInmmm.FIT)
    epchain runatthkgen=N runepframes=N runbadpixfind=N runbadpix=N

Removing OoT events from an image

  1. generate an image from the OoT event list
    evselect table=PiiiiiijjkkPNblllOOEVLInmmm.FIT imagebinning=binSize imageset=PN_OoT_image.fits withimageset=yes \
      xcolumn=X ycolumn=Y ximagebinsize=80 yimagebinsize=80
  2. generate an image from the observation event list
    evselect table=PiiiiiijjkkPNblllPIEVLInmmm.FIT imagebinning=binSize imageset=PN_observation_image.fits withimageset=yes \
      xcolumn=X ycolumn=Y ximagebinsize=80 yimagebinsize=80
  3. rescale the OoT image to the expected fraction of OoT events (6.3% for pn in Full Frame Mode). The FTOOLS farith shall be used for this purpose
    farith PN_OoT_image.fits 0.063 PN_OoT_image_rescaled.fits MUL
  4. subtract the rescaled OoT image from the observation image
    farith PN_observation_image.fits PN_OoT_image_rescaled.fits PN_observation_clean_image.fits SUB
The image PN_observation_clean_image.fits is cleared from OoT events.

Removing OoT events from a spectrum

  1. extract a source spectrum (PN_source_spectrum.fits) from the observation image:
    evselect table=PiiiiiijjkkPNblllPIEVLInmmm.FIT withspectrumset=yes spectrumset=PN_source_spectrum.fits \
      energycolumn=PI spectralbinsize=5 withspecranges=yes specchannelmin=0 specchannelmax=20479 \
      expression='(FLAG==0) && (PATTERN<=4) && ((X,Y) IN circle(..,..,..))'
  2. extract a spectrum from the OoT events
    evselect table=PiiiiiijjkkPNblllOOEVLInmmm.FIT withspectrumset=yes spectrumset=PN_oot_spectrum.fits \
      energycolumn=PI spectralbinsize=5 withspecranges=yes specchannelmin=0 specchannelmax=20479 \
      expression='(FLAG==0) && (PATTERN<=4) && ((X,Y) IN circle(..,..,..))'
  3. change the name of the COUNTS column in the OoT event spectrum to CTS_OOT
    fparkey value=CTS_OOT fitsfile=PN_oot_spectrum.fits+1 keyword=TTYPE2
  4. copy the CTS_OOT column of the OoT event spectrum into the source spectrum
    faddcol infile=PN_source_spectrum.fits+1 colfile=PN_oot_spectrum.fits+1 colname=CTS_OOT
  5. multiply the values in the column CTS_OOT by 0.063
    fcalc clobber=yes infile=PN_source_spectrum.fits+1 outfile=PN_source_spectrum.fits clname=CTS_OOT expr=CTS_OOT*0.063
  6. subtract the rescaled values of the CTS_OOT from the COUNTS column of the source spectrum
    fcalc clobber=yes infile=PN_source_spectrum.fits+1 outfile=PN_source_spectrum.fits clname=COUNTS expr=COUNTS-CTS_OOT