that the fraction of filled pixels with the lowest photon density values are dominated by background. Fitting a simple analytical model to the distribution of the low photon-density pixels, an average background intensity was estimated. The final background map of the image in units of $photon/pixel$ is obtained by multiplying the mean background flux by the exposure map. In this way the variations across the field of view due to vignetting, edges of the chips, or missing columns and pixels were taken into account.

We adopted a constant background for each exposure-corrected XRT image. This choice is reasonable for XRT images as we tested with simulations. However, it may not apply to images with strong background variations. Another caveat is that this method works properly when the number of occupied pixels is dominated by background photons. Thus it cannot be applied to fields dominated by source emission (for example, very shallow fields with very bright sources, or with extended sources that cover the entire FOV). For such fields a manual treatment of the background is preferable. We plan to introduce a more sophisticated background treatment in a future version of the code.

FOF detection and deblending\[fof\]
-----------------------------------

In the FOF 