This script (called by pressing the Afterpulsing % button) estimates the afterpulsing probability for the selected channels by applying the formula defined in Ref. 8:
where:
is the Mandel parameter, S being the signal count
is the incident count rate of a stationary Poisson-distributed signal
is the SPAD Deadtime entered in the corresponding numeric control below the Script List:
For conditions where is very small (typically ~100 ns, hence < 100 kHz):
~ Q/2
and Q can be computed from the signal's time trace. This is convenient to remember, if the SPAD deadtime is not known.
Therefore, for each selected channel (or all channels depending on the position of the Use All Channels slider), the script builds the time trace of that channel (using the definitions set on the Time Trace page), builds an histogram of it (which is not strictly necessary for the calculation, but is a convenient monitoring observable) and computes p_a.
The final Notebook output of the script, is a list of the mean count rate in the time trace followed by the computed afterpulsing probability, for each channel.
Strictly speaking, the p_a values obtained in this manner are afterpulsing probabilities only if the input signal and the detector verify the underlying hypotheses of the analysis. In particular, the signal needs to be Poisson-distributed and stationary, and therefore cannot be a single-molecule signal. The best experimental choice is a constant but attenuated white light source resulting in an incident count rate per detector of a few kHz.
Note also that this calculation will depend slightly on the time bin chosen to compute the time trace, due to statistical fluctuations (a larger time bin will result in a smaller relative variance for each bin, but the number of bin will be reduced). It is worth experimenting with different values.