Pile-up occurs when a source is so bright that the possibility that two or more X-ray photons deposit charge packets in a single pixel ("photon pile-up"), or in neighboring pixels ("pattern pile-up", i.e. singles pileup to doubles etc.), during one read-out cycle (i.e. one frame) is non-negligible. In such a case these events are recognized as one single event having the sum of their energies. If this happens sufficiently often, this will result in a hardening of the spectrum as piled-up soft events are shifted in the spectrum to higher energies, unless the sum of the energies is higher than the threshold for event rejection onboard.
In addition, pile-up leads to a more or less pronounced depression of counts in the central part of a bright source, resulting in flux loss. Pile-up also affects light curves, suppressing high count rates.
The XMM-Newton User Handbook  lists (readout mode dependent) maximum count rates above which a source suffers from pile-up. In general the MOS camera is much more susceptible to pile-up than the pn for the same intrinsic source flux. Single (i.e. PATTERN=0) event spectra are typically less sensitive to pile-up.
To check whether pile up indeed is a problem, use the SAS task epatplot. There is a SAS dedicated thread at:
To run epatplot one needs to create an event file for the source as described below in step 3) of § 4.8.1. The input event file name (e.g., src_evlist.fits) must be specified via the epatplot task set parameter. If the resulting plot shows the model distributions for single and double events diverging significantly from the measured distributions, this is a strong indication that pile-up has occurred. Figure 14 shows an example of a bright source observed in pn full-frame mode which is strongly affected by pile-up. Due to "pattern pile-up" more doubles are produced at the expense of single pixel events.
A common strategy adopted to analyse spectra of piled up sources has been to excise the core of the point-spread function (PSF). The method of excising the inner part of the source emission region from the event list used for the creation of the spectrum, can be done with the help of the xmmselect task, by first displaying the image of the whole source region (see § 4.7) and then defining an annulus (from the ds9:Region menu) which inner radius defines the source region to remove (importing the region into the xmmselect selection expression via the "2D region" button (see § 4.8.1)). With this selection expression, a filtered event list, named e.g. src_annulus_evlist.fits, can be created with xmmselect. Finally epatplot should be called again now with the src_annulus_evlist.fits as input data set. After inspecting the created pattern distribution curves, the inner radius of the annulus should be increased as long as the pattern distribution agrees with the model. Note that excluding the inner part of the source from the analysis will of course reduce the number of events for further analysis. So an iterative process for finding the best exclusion inner radius should be performed.
One important aspect to be kept in mind, is that 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%. Excising a core, whose size is smaller than the instrumental pixels size, shall be avoided.
Figure 15 shows the pattern distribution of the same source as above, but after exclusion of the inner part of the source. The pattern distributions now agree with the model curves and the resulting spectrum should in principle be free of pile-up effects.
Estimation of the pile-up fraction as a function of pattern, and of the associated flux loss for single events are presented by Ballet (1999) ; the treatment is extended to double pixels in Ballet (2003) . Empirical methods to estimate and - partly - correct pile-up based on single-events spectra in the MOS cameras are discussed in Molendi and Sembay (2003) .