Very nice, Bart. Out of curiosity, what's your criterion for the edge of the blur circle? And (bonus rhetorical question) what's the PSF of defocus?
Jack, I'll try and not hijack Michael's thread, but the question is relevant.
The Point spread functions of lens aberrations, defocus, and diffraction have different shapes. Therefore, if we were to look at them in isolation (e.g. for construction of a mathematical model), we would probably need something shaped like a (perhaps elliptical) Gaussian PSF, a disc shaped PSF, and an Airy pattern shaped PSF. We could then weigh in their contribution proportionally, although that will be computationally expensive because it requires integration to allow of positive and negative contributions to the overall MTF. And then there is the influence of the sensel aperture, and the demosaicing, and gamma pre-compensation for display.
As it happens to turn out, the composite of all that, looks almost perfectly like a Gaussian shaped PSF. When adding different PSFs, one very quickly get a Gaussian average, and the empirical results prove that to be true. An edge transition, like that of a Slanted edge target, takes on the shape of a normal Cumulative Distribution Function (CDF). We can therefore fit a CDF model to the edge transition, and the blur sigma is the result.
This blur sigma does not have a fixed diameter because a Gaussian has an infinite extent, so we will have to draw an arbitrary boundary at which we declare it a no longer acceptable amount of blur, e.g. the Circle of Confusion. One possible metric is the 10 to 90% rise of the edge profile which can be expressed in a radial distance in pixels, and for focus stacking one could define one's personal COC and thus pick an aperture that satisfies that condition. Since we are using a Gaussian shaped PSF model, it's easy to translate the 'blur sigma' to a 10-90% edge profile rise, and restate the y-axis values of the chart. A 10-90% edge profile rise (the difference between the 10th and 90th percentile points) of a CDF is approx. equal to 2.5631 x sigma, in pixels.
So, if we find a 2 pixel diameter to be our limit of acceptable blur on my above tested lens, then we should draw the limit at a maximum blur of 2 / 2.5631= 0.78 sigma, or f/6.3, and choose our stacking distance interval accordingly. It also shows that at optimum performance, at aperture f/4.5 or f/5.0, we will have a COC of 0.72 x 2.5631 =1.85 pixels for that specific lens and camera and converter combination. That suggests we need deconvolution sharpening for restoration of full resolution if we want uncompromised resolution at the pixel level. In the case of Michael who seems to do reduced size output, we can scale those requirements up accordingly.
Cheers,
Bart