## DOF and pupil ratio

**Moderators:** Pau, rjlittlefield, ChrisR, Chris S.

- enricosavazzi
**Posts:**1298**Joined:**Sat Nov 21, 2009 2:41 pm**Location:**Borgholm, Sweden-
**Contact:**

### DOF and pupil ratio

In a recent thread in this forum, it was shown (once more) that focal length and sensor size do not affect DOF, at least within the range of magnifications used in macrophotography and photomacrography and when the final images are observed at the same absolute size. Well done.

Virtually all the DOF equations available in the literature and on the web are approximations that leave out some small factors. One of the factors most often ignored is the pupil ratio (P = Pf / Pr, where Pf if the size of the front pupil and Pr the size of the rear pupil). In symmetric lens designs, P = 1, and in almost-symmetric designs (e.g., modifications of the double-Gauss), not very different from unity. Some lens designs, like inverted retrofocus and long-distance microscope objectives, do have pupil ratios significantly different from unity. For instance, according to my simple tests (which may well involve a margin of error), the MacroNikkor 19 mm f/2.8 has P = 1.4, while the Zeiss Luminar 25 mm F/3.5 only P = 0.89. The Nikon M Plan 20 ELWD (which is a 10 mm f/1.4) has D = 0.5.

To keep this discussion simple, we can use van Walree's DOF equation from http://toothwalker.org/optics/dofderivation.html, which does preserve D. At 5x, the MacroNikkor 19 mm fully open has a DOF of 67 µm, while the Luminar 25 mm only 55 µm in spite of its aperture slower by half a stop (and a slightly lower resolution because the Airy disk becomes larger by roughly 18%). The Nikon M Plan objective at 20x has a DOF of 2.9 µm instead of the 5.5 µm provided by an objective with the same aperture but a D = 1. Thus, unless you need the high working distance of the ELWD design, you could get twice the DOF with a more conservative lens design (or do the same focus stack with half the number of pictures).

This does seem to indicate that P has a practical importance on DOF at high magnification. Unless I have make mistakes, certain lens models and designs do offer a higher DOF than others, all other factors being the same. Comments, suggestions, corrections?

Virtually all the DOF equations available in the literature and on the web are approximations that leave out some small factors. One of the factors most often ignored is the pupil ratio (P = Pf / Pr, where Pf if the size of the front pupil and Pr the size of the rear pupil). In symmetric lens designs, P = 1, and in almost-symmetric designs (e.g., modifications of the double-Gauss), not very different from unity. Some lens designs, like inverted retrofocus and long-distance microscope objectives, do have pupil ratios significantly different from unity. For instance, according to my simple tests (which may well involve a margin of error), the MacroNikkor 19 mm f/2.8 has P = 1.4, while the Zeiss Luminar 25 mm F/3.5 only P = 0.89. The Nikon M Plan 20 ELWD (which is a 10 mm f/1.4) has D = 0.5.

To keep this discussion simple, we can use van Walree's DOF equation from http://toothwalker.org/optics/dofderivation.html, which does preserve D. At 5x, the MacroNikkor 19 mm fully open has a DOF of 67 µm, while the Luminar 25 mm only 55 µm in spite of its aperture slower by half a stop (and a slightly lower resolution because the Airy disk becomes larger by roughly 18%). The Nikon M Plan objective at 20x has a DOF of 2.9 µm instead of the 5.5 µm provided by an objective with the same aperture but a D = 1. Thus, unless you need the high working distance of the ELWD design, you could get twice the DOF with a more conservative lens design (or do the same focus stack with half the number of pictures).

This does seem to indicate that P has a practical importance on DOF at high magnification. Unless I have make mistakes, certain lens models and designs do offer a higher DOF than others, all other factors being the same. Comments, suggestions, corrections?

Last edited by enricosavazzi on Sun Jan 03, 2010 6:06 am, edited 1 time in total.

--ES

### Re: DOF and pupil ratio

Hello Enrico -enricosavazzi wrote: The Nikon M Plan objective at 20x has a DOF of 29 µm instead of the 55 µm provided by an objective with the same aperture but a D = 1.

Thanks for your interesting observations that microscope objectives, as well as photomacrography lenses, may be optically asymmetrical and have pupil ratios, P, that differ from unity. Did you intend to write 2.9µm and 5.5µm for the DOF values of the Nikon M Plan objective? Apart from a reduced depth of field, your value of P=0.5 for the Nikon M Plan 20 ELWD would imply that it and similar objectives would also suffer less resolution loss due to diffraction. On the other hand, is it possible that the designated numerical aperture of 0.4 for this objective has already taken into consideration the pupil ratio at its nominal magnification of 20X?

Regards,

David

- enricosavazzi
**Posts:**1298**Joined:**Sat Nov 21, 2009 2:41 pm**Location:**Borgholm, Sweden-
**Contact:**

### Re: DOF and pupil ratio

> Did you intend to write 2.9µm and 5.5µm for the DOF values of the Nikon M Plan objective?

Yes, thank you for pointing out the mistake. Easy to miss a zero while converting from mm. I corrected the original post accordingly.

> On the other hand, is it possible that the designated numerical aperture of 0.4 for this objective has already taken into consideration the pupil ratio at its nominal magnification of 20X?

I don't think so. The NA is determined only by the cone of light entering the objective (NA = sin θ in air), while the pupils come into play after the light has entered the lens and has been refracted one or more times. The Airy disk (A = 2.44 λE) at the customary λ = 550 nm is determined by the effective lens aperture (E = N(M+1)), which computes to f/29 for N = 1.4 and M = 20, and should not be dependent on pupils, either.

Yes, thank you for pointing out the mistake. Easy to miss a zero while converting from mm. I corrected the original post accordingly.

> On the other hand, is it possible that the designated numerical aperture of 0.4 for this objective has already taken into consideration the pupil ratio at its nominal magnification of 20X?

I don't think so. The NA is determined only by the cone of light entering the objective (NA = sin θ in air), while the pupils come into play after the light has entered the lens and has been refracted one or more times. The Airy disk (A = 2.44 λE) at the customary λ = 550 nm is determined by the effective lens aperture (E = N(M+1)), which computes to f/29 for N = 1.4 and M = 20, and should not be dependent on pupils, either.

--ES

- rjlittlefield
- Site Admin
**Posts:**21385**Joined:**Tue Aug 01, 2006 8:34 am**Location:**Richland, Washington State, USA-
**Contact:**

I don't have time right now for a full explanation. Perhaps later today. But briefly...

The angles of the entrance and exit cones are simply related by magnification. NAobj = NAimg * magnification, where NAobj and NAimg are the object and image side NA's. Pupil ratio does not affect this relationship. Because effective aperture, DOF, diffraction, and exposure factor are determined by the cone angles, those relationships are not affected by pupil ratio either.

What pupil ratio does affect is the way in which effective aperture, DOF, diffraction, and exposure factor change together as the lens extension is changed to produce different magnifications. With a symmetric lens (P=1), the changes are proportional to (1+m). With an asymmetric lens, the changes are proportional to (1+m/P) or to (1+Pm), depending on whether P is defined as front/rear or rear/front.

Both conventions for P appear in standard references. In "The Manual of Close-Up Photography" (page 257), Lefkowitz uses rear/front. Toothwalker's web page does the same thing. But in "Macro and Closeup Photography Handbook" (page 50), Sholik and Eggers use front/rear. [It should be obvious that some caution is warranted in using the formulas.]

The objective is specified in terms of its entrance cone at 20X. Its exit cone is simply related to the entrance cone by the magnification, as explained above.

Pupil ratio of the objective comes into play only when one attempts to compute DOF etc. using formulas that are expressed in terms other than NA. Then one must first convert the objective's NA into some equivalent measure such as f-numbers. That conversion will involve P also.

When the math is all gotten correct (no easy task!), the result that you get by computing from NA directly is the same as the result that you get by carrying P all through the calculations. The DOF of an ELWD 20X NA 0.4 objective is the same as any other 20X NA 0.4 objective.

--Rik

Edit: tweaked wording to clarify for later readers.

The angles of the entrance and exit cones are simply related by magnification. NAobj = NAimg * magnification, where NAobj and NAimg are the object and image side NA's. Pupil ratio does not affect this relationship. Because effective aperture, DOF, diffraction, and exposure factor are determined by the cone angles, those relationships are not affected by pupil ratio either.

What pupil ratio does affect is the way in which effective aperture, DOF, diffraction, and exposure factor change together as the lens extension is changed to produce different magnifications. With a symmetric lens (P=1), the changes are proportional to (1+m). With an asymmetric lens, the changes are proportional to (1+m/P) or to (1+Pm), depending on whether P is defined as front/rear or rear/front.

Both conventions for P appear in standard references. In "The Manual of Close-Up Photography" (page 257), Lefkowitz uses rear/front. Toothwalker's web page does the same thing. But in "Macro and Closeup Photography Handbook" (page 50), Sholik and Eggers use front/rear. [It should be obvious that some caution is warranted in using the formulas.]

The objective is specified in terms of its entrance cone at 20X. Its exit cone is simply related to the entrance cone by the magnification, as explained above.

Pupil ratio of the objective comes into play only when one attempts to compute DOF etc. using formulas that are expressed in terms other than NA. Then one must first convert the objective's NA into some equivalent measure such as f-numbers. That conversion will involve P also.

When the math is all gotten correct (no easy task!), the result that you get by computing from NA directly is the same as the result that you get by carrying P all through the calculations. The DOF of an ELWD 20X NA 0.4 objective is the same as any other 20X NA 0.4 objective.

--Rik

Edit: tweaked wording to clarify for later readers.

Last edited by rjlittlefield on Fri Jan 08, 2010 8:41 pm, edited 1 time in total.

- enricosavazzi
**Posts:**1298**Joined:**Sat Nov 21, 2009 2:41 pm**Location:**Borgholm, Sweden-
**Contact:**

Thanks for the contribution - but does this mean that the equation I used (see URL in original post) is incorrect/approximate and should be corrected in this respect? As given at the above URL, its results show that P does affect DOF.rjlittlefield wrote:

When the math is all gotten correct (no easy task!), the result that you get by computing from NA directly is the same as the result that you get by carrying P all through the calculations. The DOF of an ELWD 20X NA 0.4 objective is the same as any other 20X NA 0.4 objective.

--Rik

(I might have gotten the definition of P wrong, in my calculations, by the way. Good to know that two different definitions exist. I will check again my spreadsheet when I have time - thanks for the heads-up. My results may be numerically wrong, but whichever way P is defined, the equation in its present form shows that P affects DOF, so we should get the equation "right" first.)

--ES

- rjlittlefield
- Site Admin
**Posts:**21385**Joined:**Tue Aug 01, 2006 8:34 am**Location:**Richland, Washington State, USA-
**Contact:**

Enrico,

The difficulty is that you have combined some formulas that incorporate P with other formulas that do not.

An objective with m=20, NA=0.40, and P=1 is equivalent to an ordinary lens specified as f/1.19. The relevant formula in that case is that equivalent f-number is equal to 1/(2*NA)*(m/(m+1)).

An asymmetric objective with m=20, NA=0.40, and entrance pupil half as big as exit is equivalent to an ordinary lens specified as f/2.27. (I think this is correct, but it is a tricky calculation and I am typing too fast.)

What you have done is to take an equivalent f-number that was computed ignoring P, and plugged it into a formula that uses P and assumes an f-number specified accordingly.

Toothwalker's formulas are probably correct. (I haven't taken time to crawl through his page to confirm this.)

But note what he says: "N equals the true F-number f/D for the infinity scenario of Fig. 1."

Symmetric and asymmetric objectives, both having the same NA at 20X, will have very different "true F-number f/D for the infinity scenario".

When the "true F-number for the infinity scenario" is correctly determined given P along with NA and m, then plugging P and that correct F-number into the equations will show that P does not affect DOF as long as NA is the same.

--Rik

The difficulty is that you have combined some formulas that incorporate P with other formulas that do not.

An objective with m=20, NA=0.40, and P=1 is equivalent to an ordinary lens specified as f/1.19. The relevant formula in that case is that equivalent f-number is equal to 1/(2*NA)*(m/(m+1)).

An asymmetric objective with m=20, NA=0.40, and entrance pupil half as big as exit is equivalent to an ordinary lens specified as f/2.27. (I think this is correct, but it is a tricky calculation and I am typing too fast.)

What you have done is to take an equivalent f-number that was computed ignoring P, and plugged it into a formula that uses P and assumes an f-number specified accordingly.

Toothwalker's formulas are probably correct. (I haven't taken time to crawl through his page to confirm this.)

But note what he says: "N equals the true F-number f/D for the infinity scenario of Fig. 1."

Symmetric and asymmetric objectives, both having the same NA at 20X, will have very different "true F-number f/D for the infinity scenario".

When the "true F-number for the infinity scenario" is correctly determined given P along with NA and m, then plugging P and that correct F-number into the equations will show that P does not affect DOF as long as NA is the same.

--Rik

- enricosavazzi
**Posts:**1298**Joined:**Sat Nov 21, 2009 2:41 pm**Location:**Borgholm, Sweden-
**Contact:**

Aha! I can see it now in the case of the microscope objective, which has its aperture specified as NA. Then the way P is cancelled out is by taking it into account when converting NA to E for use in the DOF equation.rjlittlefield wrote:Enrico,

The difficulty is that you have combined some formulas that incorporate P with other formulas that do not.

An objective with m=20, NA=0.40, and P=1 is equivalent to an ordinary lens specified as f/1.19. The relevant formula in that case is that equivalent f-number is equal to 1/(2*NA)*(m/(m+1)).

--Rik

Please bear with me - I still don't see how the DOF equation can be valid in its present form, in the example of the two photomacrographic lenses, which already have their apertures specified as nominal f/ratios by their manufacturers. In practice, I can see no other way to cancel P out than to use it more than once in the DOF equation.

PS - Perhaps I got it. I started from the simpler DOF equation D = (2CN(M+1))/M^2 and the effective aperture E = N(M+1), and changed M to M/P in both. So I ended up with D = (2CE)/(M^2/P^2) and E = N(M/P+1). When I change P also E changes accordingly, which seems to largely cancel the changes caused by P.

The practical results of a non-unity P is therefore a change in E with respect to a symmetric lens design. DOF changes as a consequence of the change in E, but at a given M and E, DOF is the same, regardless of the value of P.

--ES

- rjlittlefield
- Site Admin
**Posts:**21385**Joined:**Tue Aug 01, 2006 8:34 am**Location:**Richland, Washington State, USA-
**Contact:**

Exactly correct.enricosavazzi wrote:The practical results of a non-unity P is therefore a change in E with respect to a symmetric lens design. DOF changes as a consequence of the change in E, but at a given M and E, DOF is the same, regardless of the value of P.

This is certainly the right approach. There may still be a small glitch in the algebra shown here. When everything is finally right, the cancellation is exact -- P completely disappears and DOF depends only on M and E.I started from the simpler DOF equation D = (2CN(M+1))/M^2 and the effective aperture E = N(M+1), and changed M to M/P in both. So I ended up with D = (2CE)/(M^2/P^2) and E = N(M/P+1). When I change P also E changes accordingly, which seems to largely cancel the changes caused by P.

--Rik

Photographic lenses are a little different in this regard. NA= 1/(2*f-num) is a theoretical maximum NA for the lens. An f/4 lens will have an NA of 0.125. That NA is based upon imaging at the focal length of the lens and a P=1. So that means you are supposed to be working at infinite magnification to get that NA (not particularly feasible).

To convert a lens f-number into a working NA you need to know two things - the magnification you are working at and the pupillary magnification (Ex/En).

It all works out to:

NA(working) = 1/(2*f-num*((1/P)+(1/m)))

If you have the same working NA, you will have the same DOF.

- rjlittlefield
- Site Admin
**Posts:**21385**Joined:**Tue Aug 01, 2006 8:34 am**Location:**Richland, Washington State, USA-
**Contact:**

That one puzzled me too. It's a form that I had not seen before.enricosavazzi wrote:Thanks. Do you have a reference for this equation?mgoodm3 wrote:

It all works out to:

NA(working) = 1/(2*f-num*((1/P)+(1/m)))

But it's derivable from other standard formulas as follows:

Lefkowitz pg.258, effective aperture f_e versus marked f-number f_r: f_e = f_r*((m/P)+1)

Effective aperture versus image-side NA: NA_img = 1/(2*f_e)

Object-side NA versus image-side NA: NA_obj = m*NA_img

Substitute: NA_img = 1/(2*f_r*((m/P)+1))

Substitute again: NA_obj = m*(1/(2*f_r*((m/P)+1)))

Rearrange the fractions: NA_obj = (1/(2*f_r*(1/m)*((m/P)+1)))

Simplify: NA_obj = 1/(2*f_r*((1/P)+(1/m)))

Substitute symbol "f-num" in place of f_r, "NA(working)" in place of NA_obj and you get mgoodm3's formula.

--Rik

The whole would be:

NA(work) = (En/2)/(f(1/P + 1/m))

(so half the entrance pupil diameter over the distance from the entrance pupil to the object, f*(1/P) is the distance form the entrance pupil to the focal point, f(1/m) is the distance from the focal point to the object you are photographing)

That will simplify to:

En/(f*2*((1/P) + (1/m)))

En/f = 1/f-num

NA(working) = 1/(2*f-num*((1/P) + (1/m)))

So it similar to the original NA = 1/(2*f-num) with a multiplier accounting for P and m.

- enricosavazzi
**Posts:**1298**Joined:**Sat Nov 21, 2009 2:41 pm**Location:**Borgholm, Sweden-
**Contact:**

At this point, I believe I can re-state one of the examples I mentioned in my original post. I now use the equations D = 2CE / (M^2/P^2), which I derived in one of the posts above, and E = N(M/P +1), which can be found in Lefkowitz or also easily derived. I define P = P_x/P_n, which seems to be more frequent than its inverted form (which I used earlier on). I arbitrarily choose a C of 37.5 µm.

The Macro-Nikkor 19 mm f/2.8 (I take these values as f and N on faith) has P = 0.7. N is by definition specified for the lens focused at infinity, even for lenses that, for practical reasons, cannot be used at infinity - this is why it is called nominal.

The Zeiss Luminar 25 mm f/3.5 (also taken on faith) has P = 1.1.

Both lenses are used fully open.

At 5x, the Macro-Nikkor has D = 68 µm and E = f/23.

At 5x, the Luminar has D = 58 µm and E = f/21.

The net result is that E changes in different ways with magnification in the two lenses. The Macro-Nikkor is faster than the Luminar in terms of nominal aperture, but its effective aperture becomes higher (i.e., slower) than the Luminar at 5x. As a consequence, at 5x the resolution of the Luminar fully open is slightly less affected by diffraction than the Macro-Nikkor fully open, and the DOF of the Luminar is slightly lower than the Macro-Nikkor, in spite of the fact that a simple comparison of their nominal apertures would suggest the contrary.

The Macro-Nikkor 19 mm f/2.8 (I take these values as f and N on faith) has P = 0.7. N is by definition specified for the lens focused at infinity, even for lenses that, for practical reasons, cannot be used at infinity - this is why it is called nominal.

The Zeiss Luminar 25 mm f/3.5 (also taken on faith) has P = 1.1.

Both lenses are used fully open.

At 5x, the Macro-Nikkor has D = 68 µm and E = f/23.

At 5x, the Luminar has D = 58 µm and E = f/21.

The net result is that E changes in different ways with magnification in the two lenses. The Macro-Nikkor is faster than the Luminar in terms of nominal aperture, but its effective aperture becomes higher (i.e., slower) than the Luminar at 5x. As a consequence, at 5x the resolution of the Luminar fully open is slightly less affected by diffraction than the Macro-Nikkor fully open, and the DOF of the Luminar is slightly lower than the Macro-Nikkor, in spite of the fact that a simple comparison of their nominal apertures would suggest the contrary.

--ES

- rjlittlefield
- Site Admin
**Posts:**21385**Joined:**Tue Aug 01, 2006 8:34 am**Location:**Richland, Washington State, USA-
**Contact:**

I have not checked all your math, but the general principles sound correct now.

My 20 mm "f/2.0" Olympus bellows macro lens has P=0.75 (personal measurement). As a result, it acts more like f/2.6 at any magnification where it can actually be used. This fact is not well known, and I have never seen a specification for pupil ratio of that lens.

By the way, I measure my Luminar 16 mm f/2.5 as P=0.87 (exit pupil smaller). I wonder if the 25 mm is a different design, or is 1.1 using the other definition?

--Rik

Yes, and as you point out, this aspect can be quite misleading.N is by definition specified for the lens focused at infinity, even for lenses that, for practical reasons, cannot be used at infinity

My 20 mm "f/2.0" Olympus bellows macro lens has P=0.75 (personal measurement). As a result, it acts more like f/2.6 at any magnification where it can actually be used. This fact is not well known, and I have never seen a specification for pupil ratio of that lens.

By the way, I measure my Luminar 16 mm f/2.5 as P=0.87 (exit pupil smaller). I wonder if the 25 mm is a different design, or is 1.1 using the other definition?

--Rik