Hi Adam,
Here is a formal description of our current goodness of fit estimator for the DynamicPSF tool:
where
n is the number of sampled pixels, and the components of the vector
x are absolute differences between sampled pixel values and their corresponding PSF estimates:
where
I symbolizes the image region being sampled.
The Winsorized difference
wi is given by:
where
xk and
xn-k are, respectively, the
kth and (
n-k)th
order statistics of the set of
x components. For the DPSF tool, a 20% Winsorization is being applied, so we have
k = 0.2
n.
The Winsorization process is replacing the
k smallest and the
k largest values with their corresponding nearest neighbors in the ordered set of absolute differences. This is what makes the goodness of fit estimate a robust one, since any outliers are being rejected and replaced with plausible values.
Evaluating the quality of a fitted PSF model—or, for that matter, of any functional fit of sampled pixel data—is not a trivial task. We need a robust estimator to make the process immune to the noise and spurious data, but at the same time, we need an efficient estimator, able to use the largest possible subset of the sampled data for evaluation. This is why we cannot use MAD (robust, but inefficient) or the standard deviation (efficient, but non-robust) here.
EDIT: Obviously, the goodness of fit evaluates to
the reciprocal of the Winsorized mean of absolute differences (i.e., a PSF that reproduces sampled pixel values exactly would be infinitely good). However, the values shown on the DPSF interface as MAD (meaning
mean absolute difference here) are the means. In this way the best fits are always at the top of the list when it is sorted by MAD.