Relationship Between Magnification vs Depth of Field

Have questions about the equipment used for macro- or micro- photography? Post those questions in this forum.

Moderators: rjlittlefield, ChrisR, Chris S., Pau

mjkzz
Posts: 1689
Joined: Wed Jul 01, 2015 3:38 pm
Location: California/Shenzhen
Contact:

Re: Relationship Between Magnification vs Depth of Field

Post by mjkzz »

Rik, I think I sorta got it, not very sure yet, or maybe you can contribute more.

The reason your equation 2, TDOF_qlwe = lambda * 4 * f_eff * f_eff / (m * m) is not valid, due to wave optics, is that the formula, NA = m/(2*f_eff), is only valid if things can be resolved, but that might not be true.

Say you have a man-made pattern of 100 meter long line at every 100 meters on the moon, that is pretty big pattern, right? But if you use that 100mm lens and focuses it to the moon, that pattern might not even be resolvable, it is probably not even a dot on the sensor.

Looking it another way, if focused to infinity, the object side NA is so small, the normal NA = m/(2*f_eff) might not hold anymore because the camera can not resolve it.

All these are due to the wave optics being in play, it deals with resolution rather than physical dimensions where NA = m/(2*f_eff) holds if and only if "smallest distance" can be resolved, else it is a point (or not even)

mjkzz
Posts: 1689
Joined: Wed Jul 01, 2015 3:38 pm
Location: California/Shenzhen
Contact:

Re: Relationship Between Magnification vs Depth of Field

Post by mjkzz »

Rik, your equation 2, relating f_eff to wave optics is wrong, not because I thought you had some approximation, or somehow the factor m gets cancelled, but because it is fundamentally wrong -- wave optics deals with frequencies, not physical size of it.

I remember reading Hopkins's paper that there is an equation relating resolutions on object side and image side, but I could not find it, so please contribute, this is really interesting.

mjkzz
Posts: 1689
Joined: Wed Jul 01, 2015 3:38 pm
Location: California/Shenzhen
Contact:

Re: Relationship Between Magnification vs Depth of Field

Post by mjkzz »

Actually, NA = m/(2*f_eff) is right, that is what making NA on object side so small. But your equation 2 is using some formula based on the size of things relating object and images sides, that is wrong because you have to be able to resolve something to talk about size.

Darn it, where is that equation relating resolutions on object and image sides and their NA's

mjkzz
Posts: 1689
Joined: Wed Jul 01, 2015 3:38 pm
Location: California/Shenzhen
Contact:

Re: Relationship Between Magnification vs Depth of Field

Post by mjkzz »

OK, here it is from Hopkins paper. Basically what it says is that we have a conjugate model of object side in terms of spatial frequency, ie, resolution and this is what wave optics is in play. So it does not matter how the cone angle changes on the object side, in case of focusing to the moon where that angle is so small, the net result can be determined from the image side and it is solely affected by the numerical aperture on the image side, which is in turn, determined by the nominal f/#.

Therefore, the nominal f/# should be used for a normal lens. Even for objectives if somehow it is quoted as having f/# instead of object side NA, or having an iris installed behind the objective. [edit]Because this equation, it means either object side or image side NA can be used, you just have to make sure the R's corresponds to what you use[/edit]

I think derivation of Rik's equation 2 are mostly based on physical dimensions, not spatial frequency, therefore, it will have that (1+1/m)^2 term dangling around, making it not making sense when m is extremely small, like focusing to the moon.
Hopkins_Res.png

mjkzz
Posts: 1689
Joined: Wed Jul 01, 2015 3:38 pm
Location: California/Shenzhen
Contact:

Re: Relationship Between Magnification vs Depth of Field

Post by mjkzz »

Furthermore, more thoughts :D, the most important thing here is that the ratio of resolution on object and image side is NOT magnification as intuitively thought or expressed using dimensional analysis. It is rather expressed in terms of ratio of nominal aperture from either sides.

Take Mitty 5x 0.14NA as example, once it is made, its image side nominal aperture, or simply the nominal f/# is fixed and is expressed in terms of WD (working distance) and its focal length (which we do not regularly care when using them). Once this is fixed, the relationship between object side resolution and image side resolution is established with Hopkins's equation which has nothing to do with magnification, as we might intuitively thought (intuitively, many of us think the resolution on image side is equal to resolution on object side divided (or multiply, my mind does care for this) by magnification, the m, but that is not true according to Hopkins)

Essentially, if you think of wave optics as an operator, it only deals with resolution rather than spatial distance where f_eff, NA = m / f_eff, etc come in. For a lens with constant NA, ie, an objective, applying wave optics operator will show that the wave optics part is only determined by its NA, or equivalently, its nominal f/# determined by its WD, focal length, and object side NA. After all, it is the opening where light passes through is the factor that relates its object side NA and its image side nominal f/#

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

Re: Relationship Between Magnification vs Depth of Field

Post by rjlittlefield »

Oh, and you were doing so well for a while! But now I see that you've posted more ramblings.

Let me go back to here:
mjkzz wrote:
Tue Dec 13, 2022 4:29 pm
[1.436 m vs 3.317 m]
What gives?
If you calculate the Airy disk diameter corresponding to Feff = 8.08, you'll find that it's a lot smaller than 0.020 mm.

That's the major reason for the discrepancy between 1.436 and 3.317. By using C=0.020 and Feff=8.08, you've essentially agreed to accept out-of-focus images that are a lot softer than the in-focus ones.

If you repeat your calculation using C = 0.009, which is a lot closer to the effective blur diameter of an f/8.08 Airy disk, then you'll get a result that more closely matches the wave optics calculation.

The key thing to recognize is that the wave optics number tells you how far from perfect focus will yield that 1/4-lambda wavefront error that just results in the MTF curve sagging a little.

It is the amount of focus error that converts this image on the left to the one on the right.

0.025lambdaWavefrontError.jpg

In contrast, your DOF calculated from C=0.020 allows up to 0.56 lambda wavefront error, which converts this image on the left to the one on the right:

0.056lambdaWavefrontError.jpg

In looking at these images, I think you'll agree that Group 6 has suffered rather badly from the larger DOF allowed by C=0.020, and for that matter there is severe loss of contrast even at much larger scales.

The results that I'm showing here come from my work on the paper that we've discussed earlier, the one from 2014.

If you doubt these results, then I suggest to run some physical experiments of your own, and see what results you get.

--Rik

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

Re: Relationship Between Magnification vs Depth of Field

Post by rjlittlefield »

Peter, I have now taken some time to study your postings above here on the same page. I see that you have corrected some of your own misunderstandings, but it seems there are still some left.

So, let me try again to address apparent confusions.

You write:
mjkzz wrote:
Tue Dec 13, 2022 5:34 pm
Actually, NA = m/(2*f_eff) is right, that is what making NA on object side so small.
Good, you're making progress.
But your equation 2 is using some formula based on the size of things relating object and images sides, that is wrong because you have to be able to resolve something to talk about size.
I assume that you're talking about this equation from my paper:
2. TDOF_qlwe = lambda * 4 * (f_eff * f_eff) / (m*m)

That one can be obtained by straightforward algebraic substitution from equation 1: TDOF_QLWE = lambda / (NA*NA)

Remember that in my paper, the symbol NA means subject-side numerical aperture and f_eff is camera-side effective f-number. The relationship there is that NA = m/(2*f_eff). Just substitute that expression for NA into equation 1, and simplify.
OK, here it is from Hopkins paper. Basically what it says is that we have a conjugate model of object side in terms of spatial frequency, ie, resolution and this is what wave optics is in play. So it does not matter how the cone angle changes on the object side, in case of focusing to the moon where that angle is so small, the net result can be determined from the image side and it is solely affected by the numerical aperture on the image side, which is in turn, determined by the nominal f/#.
The first part is sort of correct. It does matter how the cone angle changes on the object side, but that cone angle always changes in such a way that resolution and MTF curves on the subject and object side are simply scaled by a factor of m.

The last part is not quite correct. Numerical aperture on the image side is actually determined by the effective f/# , not nominal f/#. But because of the labeling convention for normal lenses, near infinity focus the nominal and effective f-numbers will be very similar. Numerically they are different only by a factor of 1+m/P, which is close to 1 if m is small.
Therefore, the nominal f/# should be used for a normal lens.
No, period, full stop. The wave optics calculations are always based on cone angles, which means they correspond to effective f/#. Whenever the nominal f/# appears in a correct formula, it will always be accompanied by some factor like (1+m) or (1+m/P)), which serves to convert the nominal f/# into an effective f/#. To be honest, I am getting tired of saying this. I feel like you're not listening.
Furthermore, more thoughts :D, the most important thing here is that the ratio of resolution on object and image side is NOT magnification as intuitively thought or expressed using dimensional analysis. It is rather expressed in terms of ratio of nominal aperture from either sides.
No. It is expressed in terms of the ratio of numerical apertures. In turn, those happen to be related simply by the magnification. So indeed, the ratio of resolution IS magnification, exactly as intuitively thought.
Take Mitty 5x 0.14NA as example, once it is made, its image side nominal aperture, or simply the nominal f/# is fixed and is expressed in terms of WD (working distance) and its focal length (which we do not regularly care when using them). Once this is fixed, the relationship between object side resolution and image side resolution is established with Hopkins's equation which has nothing to do with magnification, as we might intuitively thought (intuitively, many of us think the resolution on image side is equal to resolution on object side divided (or multiply, my mind does care for this) by magnification, the m, but that is not true according to Hopkins)
This sounds like simply nonsense. You seem to have misread Hopkins' paper, perhaps by not appreciating that NA_subject = m*NA_sensor (or NA_object = m*NA_image, depending on variable names).

--Rik

mjkzz
Posts: 1689
Joined: Wed Jul 01, 2015 3:38 pm
Location: California/Shenzhen
Contact:

Re: Relationship Between Magnification vs Depth of Field

Post by mjkzz »

rjlittlefield wrote:
Wed Dec 14, 2022 12:27 am
Oh, and you were doing so well for a while! But now I see that you've posted more ramblings.

Let me go back to here:
mjkzz wrote:
Tue Dec 13, 2022 4:29 pm
[1.436 m vs 3.317 m]
What gives?
If you calculate the Airy disk diameter corresponding to Feff = 8.08, you'll find that it's a lot smaller than 0.020 mm.

That's the major reason for the discrepancy between 1.436 and 3.317. By using C=0.020 and Feff=8.08, you've essentially agreed to accept out-of-focus images that are a lot softer than the in-focus ones.

If you repeat your calculation using C = 0.009, which is a lot closer to the effective blur diameter of an f/8.08 Airy disk, then you'll get a result that more closely matches the wave optics calculation.

The key thing to recognize is that the wave optics number tells you how far from perfect focus will yield that 1/4-lambda wavefront error that just results in the MTF curve sagging a little.

It is the amount of focus error that converts this image on the left to the one on the right.


0.025lambdaWavefrontError.jpg


In contrast, your DOF calculated from C=0.020 allows up to 0.56 lambda wavefront error, which converts this image on the left to the one on the right:


0.056lambdaWavefrontError.jpg


In looking at these images, I think you'll agree that Group 6 has suffered rather badly from the larger DOF allowed by C=0.020, and for that matter there is severe loss of contrast even at much larger scales.

The results that I'm showing here come from my work on the paper that we've discussed earlier, the one from 2014.

If you doubt these results, then I suggest to run some physical experiments of your own, and see what results you get.

--Rik
Huh? In your equation 2, there is no CoC there, it has nothing to do with selection of CoC. Please read my calculation again, pretty please :D

[edit] Or I was not clear. What I meant is that the 1.4m is an error of 1.4/(1.4+3.3) = 29.87%, this will not be acceptable for people, like those over fxsolver or Stanford, using simply geometric formula, since I thought we agree that total DOF is sum of dofs due to wave optics and geometry. But even using your interpretation, focus it to 200m away, say, magnification is 0.001. Please sit down and do the maths, you will see your equation 2 is becoming so large, it does not make sense anymore. So please actually calculate it at m=0.001, m=0.0001, etc.
Last edited by mjkzz on Thu Dec 15, 2022 6:51 am, edited 1 time in total.

mjkzz
Posts: 1689
Joined: Wed Jul 01, 2015 3:38 pm
Location: California/Shenzhen
Contact:

Re: Relationship Between Magnification vs Depth of Field

Post by mjkzz »

OK, Rik, it has been going on too long and I think you are stuck somewhere, I am not sure where and somehow I do not think you understand or mis-interpreting Hopkins's equation which relates two angles (you know what their are) and respectively resolutions. And I quote:
The first part is sort of correct. It does matter how the cone angle changes on the object side, but that cone angle always changes in such a way that resolution and MTF curves on the subject and object side are simply scaled by a factor of m.

This sounds like simply nonsense. You seem to have misread Hopkins' paper, perhaps by not appreciating that NA_subject = m*NA_sensor (or NA_object = m*NA_image, depending on variable names).
Please look at what Hopkins is saying, it basically says resolutions ratio is same as inverse of ratio of their numerical aperture values (one is object side, one is image side, or use your terms, one is subject side, one is camera side). Please draw a diagram and take a look at what Hopkins' equation is saying. It establishes PRECISE relationship between incoming resolution (object or subject side) and out going resolution (image or camera side). It has NOTHING to do with magnification. Your statement that "resolution and MTF curves on the subject and object side are simply scaled by a factor of m." is simply wrong. They are not scaled by m, they are scaled by the ratio of two numerical aperture values respectively.

I suspect you are using or interpreting something using some formula that is an approximation, because there is NO WAY you can explain the (1+1/m)^2 factor if using your equation 2 for wave optics. PERIOD. (well, except the only way is that you think as m approaches zero, wave optics has huge impact on DOF)

Anyways, I do not think I can explain it better as all the maths are there, please sit down and do some maths based on your equations, read through all the double integrals Hopkins did, you will see :

1. your equation 2 is suspiciously wrong when m is approaching zero.
2. your statement "resolution and MTF curves on the subject and object side are simply scaled by a factor of m." is wrong per Hopkins' paper.

I am out on this, maths is only way I can express the situation and I did all I can :D

mjkzz
Posts: 1689
Joined: Wed Jul 01, 2015 3:38 pm
Location: California/Shenzhen
Contact:

Re: Relationship Between Magnification vs Depth of Field

Post by mjkzz »

Hahaha, see how interesting this is :D I know I said I am out, but I think the fundamental difference between us is the question 2 in previous post, that is:
2. your statement "resolution and MTF curves on the subject and object side are simply scaled by a factor of m." is wrong per Hopkins' paper.
Please read Hopkins' paper, those double integrals, the final result, calculate the ratio between R and R'. It establishes precise relation between two spatial frequencies. Since I do not know optics, so I do not know how you derived those formula like f_eff = f_lens * (m + 1), etc, maybe they are true, not an approximation, in spatial relationship, but, in term of spatial frequencies where wave optics cares, that is not, the ratio does not depends on m, see that equation 17 in Hopkins' paper for yourself.

PeteM
Posts: 180
Joined: Sat Jan 05, 2019 12:06 am
Location: West Coast, USA

Re: Relationship Between Magnification vs Depth of Field

Post by PeteM »

mjkzz wrote:
Thu Dec 15, 2022 7:01 am
. . . I know I said I am out . . .
At least twice . . . and this seems a compulsion to be right?

Rik's patient suggestion of experimental verification seems a logical next step.

mjkzz
Posts: 1689
Joined: Wed Jul 01, 2015 3:38 pm
Location: California/Shenzhen
Contact:

Re: Relationship Between Magnification vs Depth of Field

Post by mjkzz »

Rik's patient suggestion of experimental verification seems a logical next step.
NO! Please do some calculations using Rik's formula, [edit]if you are capable to, that is, j/k :D [/edit], it does not make sense.
Last edited by mjkzz on Thu Dec 15, 2022 3:24 pm, edited 2 times in total.

mjkzz
Posts: 1689
Joined: Wed Jul 01, 2015 3:38 pm
Location: California/Shenzhen
Contact:

Re: Relationship Between Magnification vs Depth of Field

Post by mjkzz »

Rik, here is what Hopkins' equation is saying: the ratio between resolutions is related to ratio of red segments, your magnification is ratio of blue segments, on optical axis. The difference is subtle, but substantial when you focus to the moon, that is where your equation 2 fails. In other words, you can not use f_eff = f_lens * (m+1), that is valid only on axis and in spatial terms, not in terms of spatial frequency. If you take double integral (well, probably single integral in 2D space), it will show Hopkins is right. Well, let me qualify it a bit, assuming n = n' in Hopkins equation, if n != n', I think the difference is even more significant.

[edit]

more hints for those capable of following :D :

In diagram below, the beta is the alpha prime in Hopkins' equation. Magnification = tan(alpha) / tan(beta) = v / u, but it is along the optical axis.

To simplify it more, lets deal it in 2D. So suppose you have a dot pair (line pair in 3D) on the left hand side going upwards, any dot pair off optical axis will make f_eff = f_lens * (m + 1) invalid, subtle difference, but significant enough if you, say, focus to the moon.

Essentially, and I say it again, Hopkins' equation says, ratio of resolutions is inverse ratio of two numerical aperture values, independent of magnification. (with simplification of n=n' :D )
WaveOpticsHopkins.png

mjkzz
Posts: 1689
Joined: Wed Jul 01, 2015 3:38 pm
Location: California/Shenzhen
Contact:

Re: Relationship Between Magnification vs Depth of Field

Post by mjkzz »

Rik, I think the problem with your equation 2, TDOF_qlwe = lambda * 4 * f_eff * f_eff / (m*m) and f_eff = f_lens * (m + 1) is that it is only valid for a point using paraxial analysis.

When dealing with spatial frequency, on the object (subject in your terms) side, it is not a point, it is a small segment and (off optical axis). The ratio of this small segment with the projected small segment on image size (camera or sensor side in your terms) is the inverse ratio of two sine of angles (alpha and beta in my diagram), which is independent of magnification.

[edit]
Somehow I have the feeling that when dealing with spatial frequency, f_eff = f_lens * m (not m+1), ie, the sensor sees that segment in object (subject in Rik's terms) space as if with the effective aperture of factor of m. This is hunch, it needs to be proven however, maybe some clever member can prove it.

Or since, m = tan(alpha) / tan(beta), you can not approximate it to m = sin(alpha) / sin(beta) and making the statement that NAo = m * NAi, where NAo is object (subject in Rik's term) side NA and NAi is image side (camera or sensor side) NA, even for small numbers for alpha and beta.

[/edit]

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

Re: Relationship Between Magnification vs Depth of Field

Post by rjlittlefield »

mjkzz wrote:
Thu Dec 15, 2022 3:22 pm
Essentially, and I say it again, Hopkins' equation says, ratio of resolutions is inverse ratio of two numerical aperture values, independent of magnification. (with simplification of n=n' :D )
I totally agree about the first part: "ratio of resolutions is inverse ratio of two numerical aperture values".

But then I don't know how to take your second part, "independent of magnification". It is a fact of basic optics that the numerical aperture values at two different focal planes are related by the magnification between those two planes. For the current case, NA_object = m*NA_image . This implies that the resolutions also scale in proportion to magnification.

As for the distinction between your red and blue lines, that results from drawing a simplified picture of what the light does.

Hopkins draws it this way:

HopkinsFigure1.jpg

which he describes as follows:
Let a ray from the axial point, O, of the object plane of an optical system (figure 1) be inclined at an angle α to the optical axis, and let it intersect the reference sphere in the object space at a height h. The reference sphere has its centre at O and is of such radius that it passes through E, the axial point of the entrance pupil. This ray emerges from the system and proceeds to the axial image point O', making an angle α' with the optical axis and meeting the reference sphere in the image space at a height h'.
The words "reference sphere" are important, and are related to a footnote by Kingslake in his "Optics in Photography", page 107. You can see that page in its entirety HERE. The key thing is the footnote:
It is a common error to suppose that the ratio of Y/f is actually equal to tan θ', and not sin θ' as stated in the text. The tangent would, of course, be correct if the principal planes were really plane. However, the complete theory of the Abbe sine condition shows that if a lens is corrected for coma and spherical aberration, as all good photographic objectives must be, the second principal plane becomes a portion of a sphere of radius f centered about the focal point, as is correctly shown in Fig.6.2. In this case, Y/f is equal to sin θ', and it is evidently impossible for any lens corrected for those two aberrations to have an aperture greater than twice the focal length. Thus, no well-corrected photographic lens can have a relative aperture greater than f/0.5.
It is this observation by Kingslake that explains why NA_wherever = 1/(2*Feff_sameplace) is an exact relationship, and not an approximation that is valid only in the limit of small angles.

--Rik

Post Reply Previous topicNext topic