If usecal= Y, the uplinked
bright pixels and known dead pixels (within the current window)
are read from the CAL and those pixels
are ignored in computing the local median
and the threshold.
Optionally (includedeadpixels parameter) one may include the dead pixels from the CAL in the output list. This allows then to run badpix with getnewbadpix=Y getotherbadpix=N, to keep only the bright pixels active in the current exposure while preserving the information about dead pixels.
If usecal= Y, the point spread function (at the center of the field of view) is read from the CAL and the ratio between the peak and the average in a 5x5 window (typically 1.5 for MOS) is taken into account when computing the threshold. The same ratio on 1-D profiles (typically 1.2 for MOS) is taken into account when looking for bright rows or columns. The point spread function is not used when looking for dark pixels, rows or columns.
Because the MOS1 PSF in the CCF is not peaked enough, the above recipe wrongly rejects the core of very bright sources as bright pixels. While the MOS1 PSF in the CCF is being reworked, embadpixfind uses a hardcoded version of the MOS1 PSF obtained on a very bright (but not too piled-up) source.
With usecal=N, the embadpixfind algorithm is not XMM specific at all and works on any images where the normal structure size is larger than 5 pixels.