This investigation of the effect of diffraction on Depth of Field is based on a two-thin-lens model, as suggested by Alan Robinson[1]. We chose this model because it allows us to associate geometrical optics with one lens and Fourier optics with the other, thus simplifying the underlying math and our understanding.
In the last article we discussed how the front element of the model could present at the rear element the wavefront resulting from an on-axis source as a function of distance from the lens. We accomplished this by using simple geometry in complex notation. In this one we will take the relative wavefront present at the exit pupil and project it onto the sensing plane, taking diffraction into account numerically. We already know how to do it since we dealt with this subject in the recent past.
The Geometrical Field from the Front Element
According to the simplified two-thin-lens-touching model described in the last article, the field in front of the rear element (equivalent to the exit pupil in this case) will be
(1)
with
- , the wave number
- the mean wavelength of light
- the radial distance from the optical axis within the exit pupil
- the p-v coefficient of phase error introduced by an on-axis object not positioned at the focal length, better defined below
- the p-v coefficient of phase error introduced by aberrations in both lenses (mainly 3rd order spherical aberrations and axial color)
Maximum Optical Path Difference is the key input variable in our diffracted DOF study since it is geometrically related to the position of an on-axis out-of-focus object a distance away from the front lens, which is deemed to have focal length and circular aperture of diameter :
(2)
The minus sign in front is there to remind us that the optical axis is positive to the right of the lens.
Determining the Rear Element’s Image Plane
The image-facing lens in our model has nominal focal length and the same maximum diameter as the object facing lens. We could consider the sensing plane, which is assumed to be normal to the optical axis, to be positioned a fixed distance from the rear element and calculate the diffracted Point Spread Function on it as the modulus of the Fourier Transform of the function at the exit pupil squared, as we have done in the past. But since we are trying to be precise we are going to make two small adjustments to it.
First the combined focal length of a two-lens system when the lenses are touching (we will call it ) is
(3)
If we placed the sensing plane at this is the unaberrated diffracted intensity spread that we could expect if it were moved slightly back and forth a distance from there, say with effective f-number for instance
Pretend that you are looking from the side at light from the exit pupil as it converges towards the location where the sensing plane would be located, at . The vertical intensity spread is what is normally referred to as the diameter of the Circle of Confusion. In geometrical optics it has a hard edge and goes to zero at the paraxial plane – but here diffraction causes a more gradual decrease in intensity spread and the minimum is tied to the intensity of the relative Airy Pattern, which never reaches zero. You can estimate a CoC of sorts from this image by picking a suitable intensity threshold. Looks symmetrical around the focal plane, doesn’t it? It virtually is.
Since the spread looks most collected and intensity reaches a central maximum at we couldn’t be faulted for choosing as the imaging plane in the case above. On the other hand, if we introduce spherical aberrations typical of a Nikkor Z 50mm/1.8 S at f/2.8 in the center, the best position for the sensing plane appears to shift and its choice becomes a bit more nebulous:
A reasonable choice for the plane of ‘best focus’ (also sometimes referred to as the location of the Circle of Least Confusion) is where the aggregate wavefront aberration results in the lowest Root Mean Square intensity, which Wyant[2] tells us occurs when the SA3 coefficient is counteracted by an equal and opposite amount of defocus (observation plane shift). According to the article on defocus that should occur approximately at
(4)
which corresponds to about 39 with and = – = -0.619 . This indeed appears to be in close agreement with maximum readings of the Modulation Transfer Function resulting from the lens in the center and a Nikon Z7 pixel vertically, since MTF50 peaks at 41 as shown below:
Using other MTF-based measures of ‘sharpness’ like Edge Acutance to Nyquist[3] (see Figure 1) would result in the choice of ‘best focus’ plane a few microns further away to 43.4 in my standard pixel peeping conditions. Not enough of a difference to warrant all the extra number crunching so we will stick to the easily calculated minimum RMS imaging plane position in what follows.
All this to say that we will project the following field at the circular exit pupil
(5)
to the observation plane a distance
(6)
away, with = –.
We could further refine but I think we would fast approach diminishing returns since is typically much smaller than focal length and we are going for a simplified simulation of normal photography.[4]
The f-number used for the units of the relative PSF and MTF in the next section will then be , with maximum exit pupil diameter. It can also be calculated as , with system magnification for the given setup, exit divided by entrance pupil diameters, and the published f-number.
Intensity on the Observation Plane
Now that we know where the sensing plane should be located with respect to the exit pupil for ‘best focus’, we have the variables needed to apply numerical methods in order to estimate the diffracted Intensity Point Spread Function (PSF) and Modulation Transfer Function (MTF) produced by an on-axis point source a distance in front of our two-thin-lens model[5]:
(7)
with the two-dimensional Fast Fourier Transform and the circular stop function, as better described in the dedicated article. The Modulation Transfer Function will then be
(8)
after normalization to one at the origin.
And We Are Done
We are done characterizing the two-thin-lens model for diffracted DOF. With the procedure outlined above we should be able to determine the relative ‘sharpness’ on the image of any on-axis object in front of the lens, taking diffraction into account.
To keep the math simple we have restricted the model as follows:
- two thin lenses of the same diameter, touching
- therefore coincident principal plane, Entrance/Exit pupils and pupil magnification of 1
- on-axis performance only, therefore limiting application to the center of the field of view (thus ignoring vignetting[4] and more complex aberrations)
- the paraxial approximation, essential to simplify both object and image side calculations
- the Fresnel approximation and all others in Fourier Optics, without which Equation (7) would be much more complicated
None of these restrictions should prevent use of the model in unusual situations like macro photography as long as effective/ working f-number is used. If you are a practitioner please let me know if you spot any weaknesses or have any suggestions for improvement. In the next article we will describe the setup to which the model will be applied.
Notes and References
1. Thanks to Alan Robinson for his excellent insights into these subjects.
2. Basic Wavefront Aberration Theory for Optical Metrology, James C. Wyant and Katherine Creath.
3. See “Development of the I3A CPIQ spatial metrics, Baxter et al.” for the Camera Phone Image Quality initiative’s definition of Edge Acutance.
4. The touching two-thin-lens model allows us to avoid having to deal with effective focal length and f-number, since the stop, the principal planes, the Entrance and Exit pupils are all assumed to be co-located. For a more in-depth discussion of the effect of pupil magnification and lens focus distance on and see Appendix iv here.
5. Introduction to Fourier Optics, 3rd Edition. Joseph W Goodman.
6. The Matlab/Octave code used to produce these plots can be downloaded from here.