Uncertainty on the reconstruction
Summary
I think the error on the reconstructed position using the covariance is over-estimated (see e.g. here).
This covariance calculation yields an estimate of the distribution width of one or several random variables. However in our case, considering the PSF as 'perfect' or at least as an input parameter for which the uncertainty must be considered separately, the uncertainty about the reconstructed position is about reconstructing the central point from the observed PSF we know the shape of.
As an example, consider a perfectly uniform PSF in 1D, where the image of a point-like object is spread linearly over 100 pixels. From this perfect PSF and 100 pixels lightened up, we know exactly (1 pixel-off) the position of the initial photon, e.g. in the middle of the 100 pixels line. So the uncertainty on the reconstruction only (not including the uncertainty about the PSF shape) is +- 1 pix
. However the covariance calculation for this example (100 pixels separated by a size 1 lightened up uniformly) yields an uncertainty of ~30 pixels which does not correspond to what is expected:
>>> import numpy as np
>>> x = np.arange(100)
>>> w = np.ones((100))
>>> np.sqrt(np.cov(x, aweights=w))
29.01149197588202
What is the expected correct behavior?
The uncertainty about the reconstruction should technically be +- 1 pix
. Then, an uncertainty about the fitted PSF and the variability in each pixel value (~observed PSF) should be considered. I am not sure how to define these last errors exactly yet.
Note: At least the covariance calculation for the error estimation should be conservative and not yield an under-estimated uncertainty.