FAQ: What is "pupil ratio" and why would I care?

Here are summaries and links to discussions for Frequently Asked Questions.

Moderators: rjlittlefield, ChrisR, Chris S., Pau

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

FAQ: What is "pupil ratio" and why would I care?

Post by rjlittlefield »

Pupil ratio, also called "pupillary magnification factor" or just "pupil factor", is the ratio of diameters between the exit and entrance pupils of a lens. Pupil ratio is important because it affects how a lens behaves when it is extended for close focus.

If you rely on experience and experiment, then pupil ratio is not very important and can be ignored for most purposes. You can safely skip the remainder of this discussion.

If you use calculations to predict effective aperture, depth of field, exposure factor, or diffraction effects, then ignoring the pupil ratio can result in significant errors. This posting may help to avoid those.

I’ll start with a quick summary of results, then back those up with some discussion that complements what can be found in books and web pages.

Quick summary...

The f-number system for rating camera lenses is based on focal length divided by diameter of the entrance pupil. By itself, this gives an accurate indication of effective aperture only when the lens is focused at infinity.

When you extend a lens to focus closer, there is a standard simple formula to predict what happens: f_effective = f_nominal*(magnification+1).

However, this simple formula is in fact too simple. With many lenses, adding extension causes the effective aperture to change either faster or slower than the simple formula predicts. Because diffraction, DOF, and exposure correction all depend on the effective aperture, this means that as you extend such lenses to get higher magnifications, they act as if they had larger or smaller apertures than indicated by their rated f-number.

This sounds like the situation might get arbitrarily complicated, but it is a curious fact that one additional number provides everything you need to know. That number is the PMF -- "pupillary magnification factor" or just "pupil ratio".

The details of measuring and calculating with PMF are described in gory detail below. But the essential intuition is simple: when you extend a non-reversed lens to get higher magnification, its effective aperture depends more and more on diameter of its exit pupil rather than on diameter of the entrance pupil that is the basis for its rated f-number.

Now, gory details...

The notation that I’m using here follows Lefkowitz in “The Manual of Close-Up Photography” (1979), page 258.

Symbol definitions
  • P is the pupil ratio, computed as rear pupil diameter divided by front pupil diameter.
  • f_r is the rated f-number of a lens. This is the value that’s marked on the aperture ring of a manual lens. It’s computed by the manufacturer as focal length divided by the diameter of the entrance pupil.
  • f_e is the effective (working) f-number, as seen by the camera.
  • m is magnification, measured as image size divided by object size.
  • TDF is total depth of field, including both in front and behind the focus plane.
  • C is the maximum tolerable circle of confusion, measured in the image plane.
Formulas for effective (working) f-number
  • f_e = f_r*((m/P)+1) gives the effective (working) f-number for an extended lens used in its non-reversed orientation, that is, in the same orientation that the manufacturer used to determine f_r. When other calculations such as DOF, exposure factor, and diffraction are expressed in terms of f_e, then incorporating P into this one equation is all that’s needed to account for its effects.
  • f_e = f_r*(1/P)*(1+(Pm)) gives the effective (working) f-number for an extended lens used in its reversed orientation. Note that f_r in this equation is still the number determined for the non-reversed orientation. The number f_r*(1/P) can be recognized as the effective f-number of the lens at infinity focus but reversed, with the usual “rear” pupil then acting as entrance pupil.
Note that when P=1, both equations simplify to the commonly used form f_e = f_r*(m+1).

Notice also that when m=1, both equations give the same value. In other words, at m=1 the working aperture is not changed by reversing the lens.

Formulas for depth of field
  • TDF = 2*C*f_r*((m+P)/(P*m*m)) gives the total depth of field for an extended lens used in its non-reversed orientation.
  • TDF = 2*C*f_r*((1+Pm)/(P*m*m)) gives the total depth of field for an extended lens used in its reversed orientation. Again, f_r is still the number determined for the non-reversed orientation.
Again, when P=1 both equations simplify to the well known TDF = 2*C*f_r*((m+1)/(m*m)), and when m=1, both equations give the same value.

Are these formulas exact?


Maybe yes, maybe no -- it depends on what you mean by “exact”. Here’s a more precise way of asking the same question: Remember that the classic equation f_e=f_r*(m+1) is significantly wrong for lens designs that have unequal pupils. Does f_e= f_r*((m/P)+1) completely account for differences in lens design, or does it omit other important features also?

The answer is that f_e= f_r*((m/P)+1) completely and exactly accounts for lenses that follow the “thick lens model”. This means it’s pretty good for most lenses other than fisheyes.

To see why this is true, let’s briefly review how apertures work.

Somewhere in every lens, there is a physical "limiting aperture" that selects which light rays get through the lens. Viewed from in front of the lens, the limiting aperture is seen as the “entrance pupil”; viewed from behind the lens, the limiting aperture is seen as the “exit pupil”. Due to refracting elements in the light path, the entrance and exit pupils usually do not have the same size and location as the physical limiting aperture. Nonetheless, they have some size and location, and with most lenses, the size and location of each pupil is fixed with respect to the lens as long as the limiting aperture does not change. (Fisheye lenses are an exception to this rule. Their entrance pupils move significantly depending on viewpoint.)

The effective (working) aperture of a lens really depends on the relationship between the entrance pupil and the object, or equivalently, between the exit pupil and the image.

In the simple “thin lens” model often used for illustrations, it happens that both pupils coincide with the aperture, and all of them occur at the single reference point from which focus is determined. This situation leads to the usual formula that f_e=f_r*(m+1).

Real lenses are more complicated, but most real lenses behave very much like a simple “thick lens” in which the thin lens’s single reference point for focus is just replaced by two points, one for measuring distances from the front and one for measuring from the rear. Using the “thick lens model” (see HERE), it turns out that the locations of pupils with respect to the focus points are completely determined by the ratio of pupil diameters. As a result, formulas that incorporate the pupil ratio can completely describe how a lens behaves, at least to the extent that the real lens conforms to the thick lens model in the first place.

To see how this works, consider what happens when we cast two carefully chosen rays past a single point on the edge of the lens’s limiting aperture. Each ray is parallel to the optical axis on one side of the lens, and thus (courtesy the thick lens model) appears to bend just once at a “principal plane” so as to pass through the focal point on the other side of the lens. Here is the diagram for a lens with exit pupil bigger than entrance pupil:

Image

Each ray (one red, one green) represents the apparent position of the limiting aperture as seen from a different viewpoint. On the front, both rays pass by the edge of the entrance pupil, and the location and size of the entrance pupil can be determined by triangulation using those rays. Similarly the location and size of the exit pupil can be determined by triangulation using rays on the rear.

Changing some of the labels (to match those of http://toothwalker.org/optics/dofderivation.html), and slogging through the geometry of similar triangles, we get this diagram:

Image

I’ll spare you the tedious details, but continuing forward from here, we can eventually reach the formulas listed earlier, as well as the ones shown at toothwalker.org. Tying this into another good page at http://photo.net/learn/optics/lensTutorial, note that the distance from H to E is f-f/P = f*(1-1/P). On that page, this distance is called “zE”, and as they say, “It can be shown that zE = f*(1-1/p)”. Yep, just did that.

Again, the main point of this discussion is only that the pupil ratio really does exactly capture everything that matters about asymmetry in a lens, at least to the extent that the lens obeys the thick-lens model.

Personally, I find this surprising. In fact I was far from convinced that the equations involving P were exact and complete, until I drew the diagram and wrote up the analysis given here. It’s a nice feeling when things finally “click”.

I hope this helps somebody else too!

Please let me know if you see any errors in this posting. It's a lot of math to get right.

--Rik

PS. As a dedicated fan of telecentric lenses, I have to warn you that the whole concept of pupil ratio falls apart with them. But that’s a topic for another day.

Edit, March 14, 2011: added quick summary.
Edit, April 25, 2022: use web.archive.org to replace broken links at toothwalker.org and photo.net
Last edited by rjlittlefield on Mon Apr 20, 2015 8:31 am, edited 2 times in total.

PaulFurman
Posts: 595
Joined: Sat Oct 24, 2009 3:14 pm
Location: SF, CA, USA
Contact:

Post by PaulFurman »

How do I measure pupillary magnification factor? I've heard mentioned at arm's length works... trying to get close enough to replicate the actual distances used for shooting isn't quite possible for a macro lens or microscope objective because I can't see the whole aperture at 15mm from the front and the view from the back would need to be something like 200mm away so the magnification would be completely different.

Assuming arm's length is OK, I just snap two shots front & rear without changing the focus ring/bellows extension, right? then crop those to get number of pixels wide & divide those back/front.

I got a little different numbers for a foot away vs 2 feet away in one case. Hmm, OK, not much different though I guess.

Or, take a photo of a scale in the scene, if focus/magnification changes for some reason.

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

Post by rjlittlefield »

Making the measurement can be a bit tricky because you need to see the aperture and be able to either avoid or compensate for parallax errors in taking the measurement.

The "arm's length" technique is fairly accurate for many lenses because their entrance pupils are located only a few cm away from where the scale is held. That is much shorter than distance to the eye, so the parallax errors are small. If you're lucky or careful, you can even get both pupils to be the same distance behind the scale, in which case the error is the same for each pupil and cancels out when you take the ratio.

But with most lenses, an even better way to take the measurement is use a shallow DOF macro setup. Focus on one pupil at any convenient distance and magnification, and take a picture. Then without changing the camera's focus, reverse the lens being tested, move it back and forth until the other pupil is in sharp focus, and take a second picture. Because both pictures were taken at the same scale, you can calculate pupil ratio using pixel counts without even needing to know what the measurement in mm is. Of course if you care about the measurement in mm, say to verify f-number, then you can photograph a ruler at the same scale also.

Both approaches run into problems as the pupils move farther away from the lens center. With sufficiently asymmetric lenses, you may not be able to make an accurate measurement. For example in the extreme case of a telecentric lens, the entrance pupil is infinitely large but also located at infinity. Both the measurements and the math get very weird in this case. The "arm's length" method gives nonsense numbers, and the "shallow DOF" method has to be carried out as a thought experiment because after you're done focusing the entrance pupil at infinity, you can't physically carry the lens that far away to measure the exit pupil.

--Rik

PaulFurman
Posts: 595
Joined: Sat Oct 24, 2009 3:14 pm
Location: SF, CA, USA
Contact:

Post by PaulFurman »

Thanks for clarifying. I tried a couple and only saw the edge of the front element from the front. Using a magnifying glass, I could get my eye up close and see a larger aperture in there! Not sure how to take a photo of that though :-(

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

Post by rjlittlefield »

If the lens has an adjustable aperture, then you can also stop that down to facilitate seeing it from both the front and the rear.

If the lens does not have an adjustable aperture, then things can get challenging. It's pretty common, for example, that the full aperture of a microscope objective cannot be seen except from a position near its normal focus point, some few mm in front of the objective.

--Rik

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

Post by rjlittlefield »

Adding one more technical point...

Sometimes I see it written that lenses with pupil factor = 1 can be used either way around "because they're symmetric".

That's not correct.

Having a pupil factor different from 1 definitely says that a lens is not symmetric.

But most lenses that have pupil factor = 1 are still not symmetric.

Here is an example, tweaked from one of the WinLens designs (WLDG009.SPD).

Image

Unless a lens is designed to work optimally at 1:1, it probably incorporates some asymmetry to get better correction of aberrations.

--Rik

newarts
Posts: 2
Joined: Sun Mar 25, 2012 8:56 am
Location: Ames, IA USA

Re: FAQ: What is "pupil ratio" and why would I car

Post by newarts »

rjlittlefield wrote:Pupil ratio, also called "pupillary magnification factor" or just "pupil factor", is the ratio of diameters between the exit and entrance pupils of a lens. Pupil ratio is important because it affects how a lens behaves when it is extended for close focus.

If you rely on experience and experiment, then pupil ratio is not very important and can be ignored for most purposes. You can safely skip the remainder of this discussion.
......

Thanks for the good tutorial. It is clear the results apply to both illumination and diffraction at the image plane.

It might also be the case that a retrofocus wide angle lens must have a pupillary ratio of at least Registry.distance/Focal.length.

Because if no glass can enter the mirrorbox and the focal length is less than the registry distance, there must be at least (R-f) distance between the principal plane and the aperture's image.

Is this true?

Dave
Wishes are not plans....

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

Re: FAQ: What is "pupil ratio" and why would I car

Post by rjlittlefield »

newarts wrote:It might also be the case that a retrofocus wide angle lens must have a pupillary ratio of at least Registry.distance/Focal.length.

Because if no glass can enter the mirrorbox and the focal length is less than the registry distance, there must be at least (R-f) distance between the principal plane and the aperture's image.

Is this true?
Yes, that sounds correct. Good observation.

--Rik

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

Post by rjlittlefield »

Here are some bits of useful intuition about pupil factor...

Pupil factor doesn't matter much when a lens is focused near infinity, or when it's reversed and used at high magnification.

For example, suppose the pupil factor is P=2 (rear diameter divided by front), and the magnification is 6.

Then using the formula given above for reversed lenses, we have

f_e = f_r*(1/P)*(1+(Pm)) = 5.6*(1/2)*(1+(2*6)) = 36.4

On the other hand, if the lens were symmetric, or if we just ignore the pupil factor, then we would compute using the naive formula that

f_e = f_r*(m+1) = 5.6*(6+1) = 39.2 .

There's less than 8% difference between 36.4 and 39.2, so clearly pupil factor is not making a big difference in the calculation here.

One way of thinking about this is that pupil factor makes its biggest difference when a lens is dragged far away from its infinity focus position, where the sensor is close to the rear of the lens. This applies when you just extend a lens without reversing it. But when you extend and reverse the lens, you bring it back into something close to its normal focus position, except now with the subject close to the rear of the lens. In that arrangement, the lens's working f-number is again close to its rated setting, except now from the standpoint of the subject, and from there the exact rule applies that effective f-number on the camera side is equal to effective f-number on the subject side multiplied by magnification.

In practice, the biggest effect with an ordinary camera lens occurs around 1:1, where either you've had to extend the lens quite a bit but haven't reversed it, or you have reversed it but not yet made it closely approach the subject.

The other case where pupil factor can be important is with special lenses like the Olympus bellows-mount series, which have significant pupil factors but are designed to be used at high magnification without reversing.

--Rik

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

Post by rjlittlefield »

Another useful bit of insight is that a lens with different pupil sizes acts like it has a different f-number when it's reversed.

For example, suppose you have a 20 mm lens whose filter-side pupil is 5 mm diameter and bayonet-side pupil is 10 mm diameter.

Then in its normal orientation, bayonet side toward the camera, the lens would be f/4 (=20/5) with P=2 (=10/5).

But when the lens is reversed, the pupils swap places. If we could achieve infinity focus, the reversed lens would act as f/2 (=20/10) with P=0.5 (=5/10).

So now, as a crosscheck, we can compare results between the formulas for reversed and non-reversed lenses, using these new values of f/2 and P=0.5 in the non-reversed formula.

Plugging in specific values as a test, suppose we use m=5 and physically reverse the lens.

Then using the reversed formula with the original f/4 and P=2, we compute as

f_e = f_r*(1/P)*(1+(Pm)) = 4*(1/2)*(1+(2*5)) = f/22 effective

Or, using the non-reversed formula with the new f/2 and p=0.5 to account for the reversal that way, we compute as

f_e = f_r*((m/P)+1) = 2*((5/0.5)+1) = f/22 effective

These are just two different ways of computing the same physical situation, so the results should be just the same.

The fact that they are the same is comforting and provides a bit of reassurance that we haven't messed up the analysis somewhere.

--Rik

skrama
Posts: 16
Joined: Thu Aug 17, 2017 8:04 am
Location: Iowa City, Iowa

What happens for double lens combination?

Post by skrama »

Rik,

This forum is an eye opener for me and I am having so much insight and learning a lot everyday.

In an another post you explained about the double lens combination and changing the aperture on reverse mounted front lens vs the back lens. However I am curious as to what happens to the formulae when we calculate the same pupil ratio with double lens.

Thanks any insight.

Best,
Sai

PS: delete this message if you seem cluttering the beautiful explanation you have already given.

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

Re: What happens for double lens combination?

Post by rjlittlefield »

skrama wrote:
Thu Aug 24, 2017 8:55 am
In an another post you explained about the double lens combination and changing the aperture on reverse mounted front lens vs the back lens. However I am curious as to what happens to the formulae when we calculate the same pupil ratio with double lens.
I expect that you're referring to viewtopic.php?t=8336, "FAQ: Stopping down a lens combo".

If that's correct, then I'm not sure exactly what's being asked here, but I am very confident that the answer is "It's a mess."

The reason it's a mess is that what counts will be the pupil ratio and f_r of the combination. Once you know those numbers for the combination, then you can just treat the combination as a single lens for purposes of applying the formulas. However, the pupil ratio of the combination will depend on whether you stop in the front or in the back, and f_r for the combination will not be the number that is written on either aperture ring. I have no doubt that these things could be accurately calculated given all the relevant information for each half of the combo. But... those numbers would be difficult to obtain, and offhand I do not know the formulas to work with them, and finally I have no confidence that even with the formulas in hand, they could ever be used correctly by anybody except a specialist. My best advice would be that if you care, just assemble the lens combination and measure its characteristics in the situations that you care about.

--Rik

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

What about telecentric and near telecentric lenses?

Post by rjlittlefield »

It was recently pointed out to me that some normal lenses have very small pupil ratios, which causes the pupil factor formulas to produce some strange numbers. For example:
JKT wrote:
Mon Feb 06, 2023 1:10 pm
The worst case I run into was Tamron SP 180mm f/3.5 macro. The table below is copied from the optical bench and the white cells are inputs. WD, H, H', S & L are not relevant here.
...
The problem is with the higher magnifications. If the effective aperture (for nominal 3.5) was indeed 5.43 at 1:1 as the bench results claim and the pupil magnification 0.08, the required nominal aperture [ f.eff / (1 + m / P ) ] becomes 0.4 and that seems impossible. So there is clearly something wrong and it likely is in my end, but I just can't figure it out.
After some consideration, I replied as follows:
rjlittlefield wrote:
Mon Feb 06, 2023 3:02 pm
Thanks, I see the issue. It would take me too long to work up a detailed math explanation of what's going on. Conceptually, the key element is that at close focus this lens is working its way toward being telecentric on the object side. That means the entrance pupil is moving far back and getting very large. If you tried to shine parallel rays in the front, you could not come close to filling the pupil. The entire pupil can be seen only by an object that is close to focus. In the lens's working configuration, at close focus, all the angles make sense and it's only these mathematical entities called "pupil magnification factor" and "nominal f-number" that get weird. I expect the standard formulas would still work out OK if you're careful to apply them only to configurations where the entire pupil is in play, and if you're prepared to ignore craziness in the intermediate numbers that eventually disappears in the final result. As a matter of practice that means you could apply the formulas to compute the effect of small deltas like say adding some extension behind the lens that is already in its close-focus configuration, to compute how the f-numbers will change. But computing a nominal f-number, which corresponds to an object at infinity, when only a tiny part of the pupil could be seen from there, will produce an intermediate number that does not correspond to physical reality.

For a lens that is perfectly telecentric on the object side, the entrance pupil is infinitely large and located at infinity, so p=0, and that wreaks total havoc with the standard formulas even though the ray paths don't look strange at all. There are some counterintuitive behaviors such as object-side f# not changing if you focus the lens closer by adding extension. (See viewtopic.php?p=249989#p249989 for some discussion of that.) The formula about f_image = m*f_object still applies, so this means that focusing a telecentric by extension, f_image varies as m instead of (m+1). Surely there must be some way to rewrite the equations so that plugging in p=0 gives that same result, but I've never spent time figuring that out.
This exchange prompted me to look at the formulas again. It did not take long to discover the trick for handling telecentric lenses.

The same technique works for all others, and it results in a very simple formula that is worth recording.

Proceed as follows...

Suppose that the effective aperture f_e1 is known for some magnification m1, and we want to compute the effective aperture f_e2 for some other magnification m2, reached by changing only the distances to object and image. Then simple substitution into the formulas at top of thread gives us that:

f_e1 = f_r*((m1/P)+1)
f_e2 = f_r*((m2/P)+2)

Symbolically solving the first equation for f_r gives us that f_r = f_e1*P/(m1+P) . Evaluating that expression to get a number for f_r can yield a non-physical result, as explained above. But if we just ignore that aspect, plug the symbolic expression into the second equation and simplify, we get this very simple formula:

f_e2 = f_e1 * (m2+P)/(m1+P)

In the special case of a lens that is telecentric on the object side so P=0, the expression simplifies to f_e2 = f_e1* (m2/m1). This is consistent with the earlier comment that the effective f# of a telecentric lens varies directly with magnification.

Another special case, telecentric on the image side so P=infinity, leads to f_e2 = f_e1 by taking the limit as P gets very large. Again this matches reality, that the effective aperture on the telecentric side does not change when focusing by extension.

I am very pleased with this result. It eliminates an annoying gap in my understanding.

--Rik

Post Reply Previous topicNext topic