4.4.4 Filtering high background periods

The user is advised to produce a histogram of TIME values
(a rate curve) in order to identify the useful period of low background level
when the focal plane is not illuminated by low-energy protons.

Before any filtering, the user is also advised to inspect the background
light curves produced by the SOC pipeline processing (FBKTSR), where all sources
and bright features/pixels have been masked out (see task descriptions of
emchain and epchain for further details). If bright hard
point-like sources are in the FoV, such sources should be excluded prior
to the interactive rate curve generation as well.

In order to check for and remove any additional high background periods from
the event list, the user can apply the following recipe:

Build a rate curve of the TIME column in the calibrated event list
using only valid single events with energy greater than 10 keV. This can be
performed using xmmselect by entering 10000 in the PI lower limit box
(in case of the pn in addition the PI upper limit should be set to 12000
avoiding noisy pixels with energies above 12 keV),
0 in the PATTERN upper limit box, pressing the PI and PATTERN button, and
in addition appending && #XMMEA_EM in case of MOS, or
&& #XMMEA_EP in case of pn in the filter expression box.
The round radio button in the TIME row should then be
pressed. A suitable time bin needs to be selected for the OGIP rate curve
accumulation, e.g. 25, 50 or 100 seconds, depending on the exposure duration.

Examine the rate curve produced and identify periods with a constant
low count rate and periods with a high background level. Select a suitable
count rate threshold which lies a little above the low background rate.
Recommended values are 0.35 counts/s for the MOS and 0.4 count/s for the pn
camera, respectively, but depend on the science the user wants to do, and on
the source signal-to-noise.

Assuming that the rate curve is named rates.fits, a new GTI file
can be created from the selected count rate threshold using a command line as
follows (the example holds for the MOS; change the count rate value for pn accordingly):

where inevlist.fits is the input event list (e.g. from the pipeline),
image.fits is the pipeline image from which to take the GTI and
outevlist.fits is the output flare GTI filtered event list. If the user
prefers the task xmmselect to apply such pipeline processed GTI
to an input event list, the "Filtered table" product selection needs to
be started. On the "General" evselect GUI parameter page, the
"Filtering" method must be changed to "dataSubspace" and other
evselect parameters need to be set as in the example above.

A third method to clean an EPIC event list from flaring background is offered
by the SAS task espfilt. espfilt applies a user-selected method
for filtering an event list of cosmic soft proton events. The filtering
produces a new event list, lightcurves of the object and corners of
the detector (where X-rays produced by cosmic soft proton events are
registered), raw and filtered images and a plot of the lightcurves and GTIs.
In contrast to the cleaning methods described above which are based on a
rate lightcurve threshold, espfilt creates a histogram of rate values
from the light curve, finds the most likely value assuming that to be similar
to the mean of the quiescent rate, then fits a Gaussian to a small window
around that value in the histogram to determine the true mean and dispersion
of the quiescent background rate. The programme then excludes time intervals
with rate higher than a multiple of the dispersion above the mean quiescent
background and excludes good regions shorter than some limit.