**XMM-Newton Science Analysis System
**

eimsimreduce (eimsim-2.4.2) [xmmsas_20211130_0941-20.0.0]

##

Generate some `reliability' histograms

This function may be performed alone by calling the script with entrystage and finalstage=`reliability'.

It is desirable to discard detections for which the probability
is high that the detection arose by a chance fluctuation of the background. It is assumed here that any detection scheme called by eimsim
will calculate this probability and store it in the DETEC_PNULL column of the output source list. Generally one would expect that the detection scheme to implement a cutoff in the value of
, sources falling above this cutoff being discarded. The purpose of the function is to check that the calculation of
works as expected. This is done by comparing the column DETEC_PNULL values to the number
of false detections. In fact
is plotted as a function of DETEC_PNULL. How does this work? Well, the average number of false detections should be proportional to the probability of detection from background fluctuations - at least for the situation in which the `real' sources are relatively sparse, and thus unable to muddy the waters. A histogram of
against
should therefore give a straight line of slope 1 on a log-log plot.

The following histogram columns are calculated:

- DPNUL_INT: DETEC_PNULL at the lower edge of the bin. This should be used as the -value when plotting any `cumulative' quantity on the -axis.
- DPNUL_MID: DETEC_PNULL at the middle of the bin. This should be used as the -value when plotting any `differential' quantity on the -axis.
- N_ALL: The total number of detected sources which fall within the DETEC_PNULL bin.
- N_ALL_ERR: Square root of N_ALL.
- N_ALL_INT: Cumulative value of N_ALL (ie, the sum of N_ALL in the present bin plus all those at lower values of DPNUL_MID).
- N_BAD: Number of unreliable detections. This comprises sources which have values of MATCH_PNULL which are larger than probcutoff. The numbers are divided by (1-probcutoff) to correct for an expected fraction of sources which are unreliable but nevertheless fell close enough to a simulated source to have MATCH_PNULL probcutoff.
- N_BAD_ERR: Square root of N_BAD, divided by (1-probcutoff).
- N_BAD_INT: Cumulative value of N_BAD.

The DETEC_PNULL bins are calculated such that they have equal widths in space. DPNUL_MID is also the geometric mean of the bin boundaries, not the arithmetic mean.

XMM-Newton SOC -- 2021-11-30