How to evaluate the pile-up fraction in an EPIC source
This thread illustrates you how to assess whether an observation is
affected by pile-up.
Pile-up occurs whenever a X-ray source is too bright for the selected
read-out mode, thus is an overexposure effect.
During a single read-out cycle more than one photon is detected in two
or more adjacent pixels. During the read-out, the electronics cannot
distinguish whether signals in adjacent pixels origin from one or more
photons, thus two or more photons are erroneous combined to an
individual event of higher pattern type, e.g. two adjacent individual
photons are erroneous combined to a double event whose
energy is equal to the sum of the individual energies of the incoming
During a single read-out cycle more than one photon hits the same
pixel(s). During the read-out, the electronics cannot distinguish
whether the signal in a pixel origins from one or more photons, thus
a single event of erroneous energy is read whose energy is equal to
the sum of the individual energies of the incoming photons.
The effect of pile-up on the spectra is therefore three-fold:
Photon loss, either due to the fact that one photon is "read"
instead of several, or to the fact that the summed energy may assume
values beyond the upper energy on-board threshold.
Energy distortion, whereby photons are moved
to harder X-ray regions of the spectrum.
Pattern migration, whereby photon-induced change clouds have
a higher likelihood to merge, and the expected
pattern distribution is therefore distorted.
This thread provides a step-by-step description on how to assess
pile-up using the pattern distribution.
Plot (PS-file) comparing the observed versus the expected pattern
distribution within a source extraction region. If both agree, pile-up
is not a problem for this source.
Create EPIC calibrated event list, a corresponding GTI file and
identify the centroid position and extraction radius of your source,
using the procedure explained in the
pn spectrum extraction thread.
Extract a filtered event list, including only photons within the
source region, without any filtering in PATTERN or quality FLAG.
If the region has a centroid position (27600,27900)
and radius (800) in sky coordinates (X/Y), the original event
list file name is pn_evt.fits and the GTI file is named
The upper panel shows a spectrum (distribution of
counts as a function of the PI channel: be aware that the
counts are not folded with the detector response) for
each event pattern class.
The lower panel shows the expected pattern
distribution functions (smooth solid lines)
superposed to the observed ones (histogram).
In this panel, also calculated observed-to-model fractions for
single and double events within a certain energy range are
In all plots, the distributions
corresponding to different pattern classes
are recognizable through colors: red
for single, blue for double, green for triple, and
turquoise for quadruple events.
Your source spectrum will be affected by pile-up if - as in the case shown
in Fig.1 - the expected distributions are significantly discrepant from
the observed one. epatplot calculates two
diagnostic numbers which may be used to assess the presence of pile-up:
In the absence of pile-up, the 0.5 - 2.0 keV observed-to-model singles
and doubles pattern fractions ratios should both be consistent with 1.0
within statistical errors (1 sigma errors are given). If pile-up is
present, the singles ratio will be smaller than 1.0 and the doubles
ratio will be larger than 1.0. These ratios are printed
both to the console and on the plot and are appended to the input event
set as attributes SNGL_OTM and DBLE_OTM (1 sigma
errors: ESGL_OTM and EDBL_OTM).
The only way to reduce pile-up in a given data set is to excise the
core of the PSF, up to a radius where the pile-up fraction becomes
negligible. Extract filtered event lists of annular regions around
the centroid position excising more and more of the core of the PSF
until the observed pattern distributions match the expected ones, as
presented in Fig.2 below.
The following commands excise a radius of (150) from the core of
the PSF used in the previous example and create another pattern plot
for this annular region:
We advice to check for pile-up using
even if the count rate of the observation is below the count
rate limits of the corresponding mode provided in the
The calculated observed-to-model fractions for single and
double events within a certain energy range provided in the
lower panel of the plot can be incorrect. The
important factor is the graphical agreement of the observed
(histogram) and expected (solid line) pattern distribution.
If the statistical quality of the observed pattern
distributions (histograms) become too low, the statistical
significance used by
can be reduced using the sigma keyword. The following
example reduces the default statistical significance of
sigma=3 to sigma=2:
The energy range of the observed-to-model fraction
calculation can be adapted via the keyword
pileupnumberenergyrange. The following example
switches the default energy range into the energy range used
as in Fig.1 and Fig.2:
Excising the core of the PSF on scales too small with respect to the
instrumental pixel size (1.1" for the MOS cameras, 4.1" for the PN
camera) may introduce systematic inaccuracies in the calculation of the
source flux. Simulations show that these systematics are lower than 1%
if the radius of the excised core is larger then 5 times the
instrumental pixel half-size. For lower sizes these systematics are
never larger than 4%. An enhancement of the PSF handling in the SAS is
under development to reduce the impact of this effect. In the meantime,
users should carefully evaluate the size of the excised core depending
on their scientific requirements, and of the source pile-up level. It
goes without saying that excising a core, whose size is smaller than the
instrumental pixels size, shall be absolutely avoided.