to project the events file to an image.
An image built by evselect
would be accepted as well,
but would not include the secondary pixels of multiple events
(this may miss weak bad pixels next to a strong one).
For optimal electronic noise rejection, the events file should be built by successive calls to emevents (analysepatterns=N flagbadpixels=N splitdiagonals=N randomizeposition=N allow it to run much faster) and emenergy (correctcti=N correctgain=N randomizeenergy=N allow it to run much faster).
Call the FTOOL fmedian to perform median filtering onto the output image. The median filtering allows to estimate reliably the average local value, whereas the standard average would be affected by the bright pixels themselves. The recommended setting is 5 5 boundary=reflect (5x5 square window). Another way of estimating the expected counts in the image would be accepted as well by embadpixfind.
For calibration purposes, it is possible to improve the statistics (and the sensitivity to weak bright pixels or dark pixels) by stacking many images output of emeventsproj on top of one another before calling fmedian and embadpixfind.