Analysis › Measure · version 6 · can run once per region
Photons, localization precision and on-time, each with its law fitted.
Three histograms that say whether a dataset behaves as SMLM data should, and how good it is:
A second tab, per frame, shows how many localizations each frame holds over the acquisition, which shows how bleaching thins the data out.
Each has the law it is expected to follow fitted over it, so a glance says whether the data look normal, and the fitted numbers are what to compare between samples, dyes, buffers or days: the mean photon count , the typical precision
and the mean on-time
.
It describes the localizations of the layer as they are shown – after its filter (also called bounds: the lowest and highest values of attributes a localization must lie between) and inside the drawn ROI (region of interest) – unless localizations is set to all.
With more than one visible layer – a layer per channel, say – each is described as it shows it, and they are drawn together: a step line per layer in the layer's colour, its fitted law over it as a heavier line in the same colour and its fitted number (,
,
) in the legend. The text reports every layer's numbers, layer by layer. With all the whole table is described once.
The same plugin measures every ROI of the ROI manager, once per ROI: as one of its per-region steps, or as a step of a chain (plugins run one after another as one) set to run on each ROI. Each ROI then gets a row of numbers (see Output), and an ROI with nothing in it gets a count of zero rather than an error. The precision model is fitted there as on the view; its fit is most of what an ROI costs, and a block that will take more than a minute says how long before it starts, when precision fit set to none is the way to make it quicker.

What the plugin shows, here for a simulated dataset filtered at 200 photons: photons, lateral and axial precision, and on-time. Grey: the histogram. Red: the fitted law. Blue and green: the maximum and the rising edge of the precision, solid as read off the histogram, dashed where the fitted model puts them.
A fluorophore that is switched on emits until it switches off or bleaches. If it does so at a constant rate, the number of photons collected in one localization is exponentially distributed,
and the single number – the mean photon count – describes it. A larger
means brighter localizations and better precision.
The histogram is exponential only above its maximum. Below it the detection threshold has removed the dim localizations, so the fit starts at the maximum (or at photons from, if that is set). The fit is maximum likelihood on the localizations above the start, which for an exponential is simply
the mean of what is left above the start, minus the start. It does not depend on the bins of the histogram.
The precision of a fit is set by the photons: to a good approximation
with a constant of the PSF, the pixel size and the background. If
is exponential,
has a distribution of its own, which follows in two lines:
exactly when
, so
One parameter again, and it has a meaning: is the precision at the mean photon count
. The curve rises steeply from zero, peaks, and has a long tail of poorly localized, dim molecules:

The distribution of the precision that exponential photons imply, for = 10 nm, with its two landmarks. The rising edge is where the curve first reaches half its maximum.
Two positions on the curve follow in closed form, and both can be read off a histogram by eye:
The rising edge is the precision of the best localizations, the ones that decide the finest detail an image can show.
The plugin reports both twice: fitted (the model's landmarks, dashed) and read off the histogram itself (solid). They agree when the photons really are exponential, and part company when they are not – when the fitter returned a population of failed fits, say, or when the sample mixes two dyes. That comparison is the point of printing them side by side.
The precision is fitted to its histogram by least squares, not by maximum likelihood on the localizations, because it is robust that way: a fitter always returns a few rows with an absurdly small precision, a fraction of a nanometre, which are failed fits and not good localizations. The likelihood weighs each localization by , so a few per cent of those rows carry the answer and pull
down by an order of magnitude. Binned, they are a few counts in the first bins and move nothing. Precision fit switches to the likelihood for anyone who wants it, or to none: the histogram, its median and its landmarks without the model.
The z precision, when the table has one, is described the same way.
How many consecutive frames a fluorophore stays on before it blinks off, one number per blink, from merging the localizations of a blink. If it switches off with the same probability in every frame, the on-time (in frames) is geometric,
which is a straight line on the logarithmic axis the plugin draws it on. The maximum likelihood estimate is the mean, , and the plugin reports the equivalent exponential lifetime
in frames, and in milliseconds with the file's frame time – the time from one frame to the next, which the file records, or else its exposure – or the frame time set here. is what the curve decays with, which makes it comparable to a switching or bleaching time measured some other way.
The on-time needs the blinks merged: tick merge blinks on the layer once – merge blinks, also called grouping or linking, combines the localizations in consecutive frames that come from one blinking event into one – and the plugin reads the result. It does not merge by itself, because merging can take minutes on a large dataset; it says so instead.
The localizations are counted in each frame, in about 200 windows of whole frames over the acquisition, and drawn as a rate: localizations per frame. Each visible layer is a line of its own, as the layer shows it (a layer that merges blinks counts blinks).
If the dye bleaches at a constant rate, the count falls as , with
the frame and
the decay time, dashed over each line. The plugin reports
in frames, and in seconds with the frame time. A count that does not fall (constant activation, or an activation laser turned up) has no decay time, and the plugin says so. Two numbers need no model and are reported either way: the frame by which half of the localizations are in, and the mean count per frame in the first and in the last tenth of the acquisition.

The per frame tab for a simulated acquisition whose dye bleaches: the count per frame (solid) and the fitted decay (dashed).
Time Course draws the same count against seconds, per file, beside other quantities.
Which table. The one the layer shows. A layer that merges blinks is described blink by blink – the photons of a blink added up, the precision that of the combined position – and one that does not, frame by frame. The on-time is the exception, because it is a property of a blink: it is counted once per blink whichever table is shown. (Counting it per frame would count a three-frame blink three times and a one-frame blink once, and weigh the histogram towards long blinks.)
Several layers share their bins: each histogram is drawn up to the largest of the layers' own ends (below), so that one layer's longer tail does not give it wider bins and higher counts per bin. The fits do not see this – each layer's numbers are those it would have alone – and the precision's model is drawn only as far as its fit went. The maximum and rising-edge lines are left out of a figure of several layers, four lines each being more than one panel can carry; they are in the text. An ROI is always one table, its own rows.
The photon histogram is drawn up to the 99.9th percentile; the fit uses every localization above the start.
The precision fit. The histogram runs from zero to the 99.5th percentile of the precision, in bins bins, and the model is integrated exactly over each bin (the density changes too fast near zero to be sampled at the bin centre). Its amplitude is solved for directly, so the fit searches one number, : over a wide logarithmic grid first, then by golden section on the best bracket. The unbinned likelihood alternative uses that
is exponential with mean
– it is
– and fits it as the photons are fitted, truncated where the sample was cut.
The landmarks read off the histogram. The counts are smoothed by a Gaussian of one bin, the maximum is refined with a parabola through its neighbours, and the rising edge is the last crossing of half the maximum before the peak, interpolated between bins.
Too few. Below 20 values a distribution is shown without a fit.
The decay time is the maximum likelihood estimate on the localizations' frames, not a fit to the drawn windows: if the count falls as , the frames are a sample of an exponential cut to the acquisition
, and
solves
the mean of that cut exponential, as for the photons. A count that falls by less than about 10 % over the acquisition ( more than ten times its length) is reported as no decay. Files opened together share frame numbers, so their counts are added up frame by frame. ROIs get no per frame tab and no number from it.
| setting | default | what it does |
|---|---|---|
localizationssource | as plotted (filter and ROI) | The localizations on screen, or the whole table. Choices: as plotted (filter and ROI); all, unfiltered |
binsbins | 100 | The photon and on-time fits are on the localizations and ignore this; the precision fit is on these bins. Only the precision fit and the pictures depend on it. at least 5 |
precision fitprecision_fit | least squares on the histogram | The model of the precision and its sigma_c; the likelihood is thrown by a few failed fits with a precision near zero. See How it works: the histogram fit is robust to the failed fits every dataset contains; the likelihood is the efficient estimator on clean data. Either takes about 10 ms whatever the number of localizations – nothing next to one run on the view, but 10 s over a thousand ROIs and a quarter of an hour over a hundred thousand clusters. With none the histogram, its median and its landmarks are still there; only the model curve and |
photons fromphoton_start | 0 photons | Where the exponential fit starts; 0: at the maximum of the histogram, below which the detection threshold has eaten the dim localizations. Setting it higher than the maximum of the histogram fits only the bright tail, which is useful when the dim end is distorted by more than the threshold – a second, dim population, for example. |
frame time (more)frame_time_ms | auto | For the on-time in seconds; auto: the file's, else its exposure. at least 0.001 ms |
n_localizations; mean_photons, median_photons and photons_n0; mean_precision_nm, median_precision_nm and sigma_c_nm (sigma_c NaN when the model was not fitted); for 3D data the same with z_ (median_z_precision_nm, ...); and where the ROI's table carries n_in_group, on_time_frames (on_time_s (n_blinks. The on-time of an ROI comes from its own rows only: the session's merged blinks, which the view falls back on, are the whole field's. Each ROI also keeps its histograms and fitted numbers (about 2 kB), so its figure is drawn again without measuring again; the curves are recomputed from the numbers.What to expect: of a few thousand photons for a good organic dye in a good buffer, fewer for fluorescent proteins; a lateral
of about 10 nm or better; an on-time of one to a few frames. A precision histogram whose landmarks disagree strongly with the model's is worth a second look at the fit or the filter.
Based on SMAP's Analyze/measure/Locstatistics (Ries 2020), which shows the same histograms and reports the same numbers. What changed: