Quiz: sub-pixel localisation

Short questions to test your understanding. Try each on paper first, then open the answer. s is the PSF width (Gaussian σ), N the number of detected photons, a the pixel size, b the background photons per pixel.


Q1. Why can the position of a spot be measured much more precisely than one pixel?

How is the spot’s light shared between neighbouring pixels?

The spot covers many pixels, and the way its light is shared between them depends continuously on where the centre is: move it right by a tenth of a pixel and the right neighbour gets measurably more light than the left one. Using all pixels (and knowing the spot’s shape) turns these ratios into a position far finer than the pixel grid.


Q2. A centroid computed in a 9 × 9 window on an image with a high background gives positions that cluster near the pixel centres. Why, and what are two fixes?

Where is the centre of mass of a uniform background in the window?

The background’s own centre of mass is the window centre, which is the brightest pixel; it adds weight there and pulls the estimate towards it, more so in a large window (more background pixels). Fixes: subtract the background before taking the centroid; use a smaller window; or re-centre the window on the estimate and iterate (or fit a model with a background term).


Q3. Samples of a spot at -1, 0, 1 are 0.430, 0.956, 0.783. Which of centroid, parabola and log-parabola gives the right answer if the spot is a Gaussian, and what is it?

The logarithm of a Gaussian is a parabola.

The log-parabola: \delta = (\ln 0.430 - \ln 0.783)/(2(\ln 0.430 - 2\ln 0.956 + \ln 0.783)) = 0.30 px. The centroid gives 0.16 and the parabola 0.25: both are pulled towards the pixel centre.


Q4. What is “pixel locking”, and which estimators show it?

Look at the bias curve of the parabola.

A systematic bias towards whole pixel positions: estimates crowd near the pixel centres, and a histogram of the fractional parts of the positions is not flat. The three-point parabola on raw values and the centroid (especially with background or a truncating window) show it; a correct model fitted to all pixels (or the log-parabola for a Gaussian) does not.


Q5. A spot has s = 120 nm and you collect 400 photons. What is the best precision you can hope for? And with 3 600 photons?

s/\sqrt N.

120/\sqrt{400} = 6 nm; 120/\sqrt{3600} = 2 nm. Nine times the photons for three times the precision. Pixels and background make the real numbers somewhat larger.


Q6. “The diffraction limit is 250 nm, so a position cannot be known better than 250 nm.” What is wrong with this statement?

Resolving versus localising.

The diffraction limit concerns resolving two points (telling that there are two). The position of one isolated point can be estimated much more precisely, to about s/\sqrt N, because many photons each carry a little information about the centre. Localisation microscopy relies on exactly this, keeping the emitters isolated by switching only a few on at a time.


Q7. For a dim spot, which helps more: doubling the exposure (twice the photons from the spot and from the background) or halving the background?

In Thompson’s formula the background term falls as 1/N^2 and grows as b.

Doubling the exposure halves the first term (\propto 1/N) and also halves the background term (b doubles but N^2 quadruples), so the whole variance halves. Halving the background halves only the background term. Doubling the exposure helps more. (With N = 200, b = 10, s = a = 100 nm: 10.8 nm → 7.6 nm by doubling the exposure, → 9.3 nm by halving the background.)


Q8. Why does least-squares fitting lose precision compared with maximum likelihood on photon-count images?

What is the variance of a bright pixel compared with a dim one?

For Poisson counts the variance of a pixel equals its mean: the bright centre pixels are noisier (in absolute terms) than the dim tails. Least squares weights every pixel equally, so it trusts the noisy centre pixels too much. Maximum likelihood weights each pixel by 1/\mu_k and reaches the Cramér–Rao bound; least squares has about 16/9 of the bound’s variance.


Q9. (math) N photon positions are drawn independently from \mathcal N(x_0, s^2). Compute the Fisher information for x_0 and the Cramér–Rao bound.

\ell(x_0) = -\sum_i (x_i - x_0)^2/2s^2.

\partial^2\ell/\partial x_0^2 = -N/s^2, so \mathcal I = N/s^2 and \mathrm{Var}(\hat x_0) \ge s^2/N for every unbiased estimator. The mean of the positions has exactly this variance.