The EPIC background includes an internal instrumental background and external components such as the cosmic X-ray background together with a time-variable local particle background linked to the complex interaction of solar activity with the Earth's magnetosphere. For source detection, time intervals dominated by variable background dominates are filtered from the event lists. The remaining background is modelled based on source-free (“cheesed”) images by the task esplinemap and subtracted from the original images within the source-detection tasks. To construct the cheesed image, circular regions are excluded at the position of each tentative source, based on a brightness cut at 2×10–4 cts arcsec–2 s. For the stacked catalogue, an adaptive smoothing method has been employed to model the background emission. The cheesed images and corresponding masks are smoothed by convolving them with a Gaussian kernel with an initial smoothing radius of 10 pixels, and the signal-to-noise ratio of the smoothed image is calculated at each pixel. In eight steps, the radius of the Gaussian kernel is increased by a factor of square root of two. For each image pixel, the two smoothed images with the signal-to-noise ratios closest to a pre-defined threshold of 12 are selected, opting for a uniform signal-to-noise ratio over the whole image, which limits the allowed noise fluctuations. The background value of the pixel is linearly interpolated between them. Small-scale structures are thus covered by the images with the narrowest smoothing radii, while the cut-out regions around the sources are filled by values from the images smoothed with a broad Gaussian kernel.