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 »

I totally agree about the first part: "ratio of resolutions is inverse ratio of two numerical aperture values".
Great, we now agree on that.
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.
The word, "corrected" for aberrations , well, now we are talking about engineering, making modifications to a simple lens.

And no, tan(theta) is not same as sin(theta) when dealing with extreme conditions, like focusing to infinity. The very fact, using your equation 2, when m is approaching zero, you are saying the effect of wave optics is infinite, That is wrong, with your modified lens or not. Period!

For the rest of your argument, I think you are not recognizing the fact when we speak of spatial frequencies, we are dealing with segments, not a point and the ratio is determined by those two red segments, which make it independent of magnification.

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 »

I totally agree about the first part: "ratio of resolutions is inverse ratio of two numerical aperture values
First you agree, even that statement says ratio of resolution is independent of m, and then
As for the distinction between your red and blue lines, that results from drawing a simplified picture of what the light does.As for the distinction between your red and blue lines, that results from drawing a simplified picture of what the light does.
That red and blue lines are exactly the same as what the first quote you agreed upon, sit down and do some maths, it is the same as saying "ratio of resolutions is inverse ratio of two numerical aperture values".

Then you go on finding some modifications to a simple lens, to justify your argument tan(theta) = sin(theta). NO, that is wrong, you are quoting things based on its apparent form without stating the condition that it is valid. NO, tan(theta) is NOT the same as sin(theta), particularly when dealing with ratio, even when theta is very small and that difference is the cause of why your equation 2 fails when m approaches zero.

Now come to think of it, your derivation of equation 2 is a spatial analysis instead of spatial frequency analysis where wave optics effect takes place. That equation is totally wrong.

I think for those capable of following, the key part is the difference between spatial analysis and spatial frequency analysis. Now I am out :D

rjlittlefield
Site Admin
Posts: 23606
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 7:45 pm
I think for those capable of following, the key part is the difference between spatial analysis and spatial frequency analysis.
I agree, and that will make things particularly simple for them because spatial analysis and spatial frequency analysis produce the same results when each is properly applied.

Unfortunately, mjkzz's polemic arguments are riddled with errors and misunderstandings that he seems unable or unwilling to correct. Despite my best efforts, it seems I cannot change that situation. The teacher in me is saddened, but so be it.

Regarding the original question about DOF, a quick summary is that the classic DOF equations work fine, except that due to diffraction the circle of confusion should be limited to C >= 0.0011*Feff. [*]

When you set C = 0.0011*Feff, then the classic equations reproduce the wave optics DOF that use the usual criterion of 1/4-lambda wavefront error.

As a numeric example, consider the following situation:
  • nominal f/4
  • pupil factor 1
  • magnification 2X
In this case the standard equation Feff = Fnom*(m+1) gives Feff = 12, which implies a diffraction-limited value of C = 0.0132 mm.

The classic DOF equation says that DOF = 2*C*Fnom*(m+1)/m^2 . Using the diffraction-limited value C = 0.0132 mm, this gives DOF = 2*0.0132*4*(2+1)/2^2 = 0.0792 mm.

Alternatively, the 1/4-lambda wave optics formula is DOF = lambda * 4 * Feff^2 / m^2. Using lambda = 0.00055 mm (green light), this gives DOF = 0.00055 * 4 * 12^2 / 2^2 = 0.0792 mm.

If an application can tolerate a larger value of C, then it's fine to use that larger value in the classic formula.

These rules generalize even to microscopy applications using a dry objective, in which case they are equivalent to DOF = max ( lambda/NA^2, C/(m*NA) ) .

--Rik

[*] C >= 0.0011*Feff is for green light, wavelength lambda = 0.00055 mm. For other wavelengths, substitute 2*lambda in place of 0.0011 .

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, here is what is wrong with your equation 2 (TDOF_qlwe = 4 * lambda * f_eff * f_eff / (m*m) and f_eff = (m+1) * f_lens). Since this is a very important concept in this community, I think I should reveal it here rather than simply "accuse" you being wrong :D

Using our "classic" 100mm lens as an example. Say there is a lamp on a mountain hill 100 meters away and such that it aligns with North Star in the sky and we want to capture both on camera. Lets again, set aperture at f/8, so, magnification for the lamp is about [edit]1/1000 or factor of 1000[/edit], and probably billionth for the North Star. Rayleigh's equation says, to be able to distinguish the two, we need adequate aperture at certain angles. If f/8 is not enough and we have to use f/8, we move slightly till they both are captured, meaning the angle between the two are large enough to satisfy Rayleigh equation. Or we can open up aperture, or for that matter, we can get larger diameter lens.

Your equation 2 having magnification there does not make sense in that, once you have the m there, you are assuming two points are at same distance. This is why I "accuse" you being "spatial" -- in that particular case, you are essentially trying to resolve a point or two at certain distance (same m). In spatial frequency sense, like Rayleigh equation, we are dealing with resolving power of the lens (inverse of spatial frequency), which is solely dependent on the diameter of the lens (or iris). This is why I used nominal NA translated from f/8 before -- Rayleigh's equation when you presented me with a calculation.

If you read Hopkins' work carefully, it is also dealing with the nominal aperture (there is a sentence of "edge" of lens when describing those diagrams), ie Hopkins is not assuming any specific magnification, but only the diameter of the lens, ie the resolving power of the lens.

The concept of magnification is essentially a dimensional/geometrical term, ie, spatial term, not a spatial frequency term. By introducing the term magnification, you are really trying to distinguish whether two points are one or two at same distance in space, in the lamp and North Star example, clearly the magnification are hugely different, so spatial frequency analysis, like Rayleigh equation, is needed, the two points can be billions of km away.

It seems that your equation 2 is trying to blend both geometric analysis with wave optics. But even that it fails when magnification is large, say, focusing that 100mm lens at something 10km away where magnification is about 10^-5 [edit]ie, 1/10^-5 factor = 10^5[/edit], yielding DOF well over 10km at f/8 (even at f/2.8).

So why is that equation 2 predict good results, evidenced by your excellent work with all the experimental charts? Well, that equation works (sort of) when dealing with high magnification because DOF is much thinner. Magnification for a point at far end of the DOF (BTW predicted by geometry) and magnification for near end are are very close, so using a single magnification does not matter much.

Overall, I believe Nikon school of thoughts, that is, the wave optics operator produces a constant value for a lens of certain size or set at certain aperture. Total DOF is the sum of geometric term and wave optics term. When you change magnification, like zooming in and out on a Mitty, it is the geometric term that is in play for change of DOF.
Last edited by mjkzz on Wed Dec 21, 2022 8:22 pm, edited 3 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, since your work is based on Hopkins' work, you can think about it this way: In Hopkins work, the angle alpha prime in his work, or the beta in my "simplified diagram" as you put it, the light ray hitting sensor at that angle might be coming from 100 meters away or billions of kilometres away. Hopkins' work did not assume a certain magnification, it is purely dealing with spatial resolution regardless magnification, ie, how far away the light comes from.

However, your work approximates it well when magnification is fairly large like microscopic work, but it does not work for "generic" application like Nikon's school of thought.

JKT
Posts: 424
Joined: Fri Oct 28, 2011 9:29 am
Location: Finland
Contact:

Re: Relationship Between Magnification vs Depth of Field

Post by JKT »

mjkzz, in case you have not noticed, BOTH the formulas (the one with NA and the one with feff and m) go equally to hell when you approach infinity. They give same dof, but at some point you reach hyperfocal distance and after that both forms of the dof formula become invalid. They still give the same value, though.

rjlittlefield
Site Admin
Posts: 23606
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 »

JKT wrote:
Thu Dec 22, 2022 11:16 am
BOTH the formulas (the one with NA and the one with feff and m) go equally to hell when you approach infinity. They give same dof, but at some point you reach hyperfocal distance and after that both forms of the dof formula become invalid. They still give the same value, though.
Partly true, partly not. To clarify...

There are at least 4 equations at play in this thread: The first two do go equally bad as m approaches zero. But there's nothing that corresponds to hyperfocal distance in those equations, and there's also no singular point where suddenly things get awful. Instead, those two are good approximations whenever DOF is small compared with distance to lens, and they get progressively less good as DOF gets large compared with distance to lens.

In contrast, the equation at fxsolver does have a concept of hyperfocal distance, which is reached when m gets small enough that the formula's main denominator goes to zero. After that, the denominator goes negative and the formula just gives a nonsense number. I am amused to note that mjkzz's test case, the 100 mm lens focused on a lamp 100 meters away so m=0.001, causes this formula to compute DOF of minus 205.3 meters.

The fourth formula, from microscopyu, well, let's not talk about that right now.

Anyway, I agree completely with mjkzz that the first two equations behave badly as m goes to zero. That's because their derivations implicitly assume that DOF is small compared with distance to lens. It's the same reason that the classic geometric optics DOF formula for closeup work says 2*C*N*(m+1)/m^2, versus fxsolver's 2*N*C*(m+1)/(m^2-(N*c/f)^2) . That second term in the denominator, (N*c/f)^2, is a refinement that lets the refined formula hold up better for smaller m. There are similar refinements for the wave optics approach, but I omitted those from the formulas because I was focusing on macro/micro applications where they would add a lot of complexity for essentially no value.

mjkzz wrote:
Wed Dec 21, 2022 5:55 pm
If you read Hopkins' carefully, it is also dealing with the nominal aperture (there is a sentence of "edge" of lens when describing those diagrams), ie Hopkins is not assuming any specific magnification, but only the diameter of the lens, ie the resolving power of the lens.
I've read Hopkin's work very carefully, and your phrasing about "nominal aperture" is nonsense. Substitute "effective aperture", and you would be correct. The lens diameter is fixed, but the distance from focus can vary depending on magnification. If it does, then effective aperture is the number that describes the angles Hopkins is working with.

mjkzz wrote:
Wed Dec 21, 2022 6:14 pm
Rik, since your work is based on Hopkins' work, you can think about it this way: In Hopkins work, the angle alpha prime in his work, or the beta in my "simplified diagram" as you put it, the light ray hitting sensor at that angle might be coming from 100 meters away or billions of kilometres away. Hopkins' work did not assume a certain magnification, it is purely dealing with spatial resolution regardless magnification, ie, how far away the light comes from.
I agree completely with the part quoted above.

However, you seem to keep missing a couple of basic facts of optics: NA_object = m*NA_image = m/(2*Feff) . In English, the angles scale in proportion to magnification.

In Hopkins' notation, his figure 1 and equation 17, those object and image NA's are represented by n sine alpha and n prime sine alpha prime, and the values of those expressions always have an m:1 relationship.

So, in a lens system that gives magnification m, Hopkins' analysis of MTF and resolution on the image side transfers equally well to the object side simply by scaling the spatial frequencies (cycles/mm) in proportion to m.

Likewise, except for the issue with very small m as discussed above, Hopkins' analysis of defocus transfers from image side to object side simply by scaling the defocus distance in proportion to 1/m^2.

Yeah, it's all in the angles -- and the angles scale in proportion to the magnification.

--Rik

JKT
Posts: 424
Joined: Fri Oct 28, 2011 9:29 am
Location: Finland
Contact:

Re: Relationship Between Magnification vs Depth of Field

Post by JKT »

I guess I did cut a few corners :D
I figured these formulas were simplifications that didn't really work at infinity, but I was aiming at showing how weird it was that mjkzz was testing values in just one of the functions and declaring that invalid, but apparently accepting the first form and the Nikon formula without bothering to check them with the same input values.

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 »

JKT wrote:
Thu Dec 22, 2022 3:12 pm
I guess I did cut a few corners :D
I figured these formulas were simplifications that didn't really work at infinity, but I was aiming at showing how weird it was that mjkzz was testing values in just one of the functions and declaring that invalid, but apparently accepting the first form and the Nikon formula without bothering to check them with the same input values.
Hmmmmm, I will explain why I accept Nikon's equation :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 »

Rik,
I've read Hopkin's work very carefully, and your phrasing about "nominal aperture" is nonsense.
No, please read Hopkin's work without the word "effective" in your mind, I fell into the same trap and I did try to rectify your equation, but in vain, and this is what lead me to "accuse" you being wrong :D I will explain why later.
However, you seem to keep missing a couple of basic facts of optics: NA_object = m*NA_image = m/(2*Feff) . In English, the angles scale in proportion to magnification.
Here is my answer to that and I think this is the key part of it which also lead me to think you are dealing with points instead of segments.

Lets call the angle formed by ray and optical axis, theta on the image side. In my simplified diagram, theta = beta. However, that diagram is "simplified", in that we are dealing with a point on optical axis on object (subject in your terms) side. So please draw a diagram with a segment, think of it as limited by wave optics, ie, governed by Rayleigh equation, instead of a single point on optical axis in object space, one end of the segment can be on the optical axis to make it simple. Now you will see that theta is not the same as beta, and subsequently, [edit] f_eff = (m+1) * f__lens will fail [/edit].

Since you know a lot about optics, I think you can work it out quickly. And this is the key that the term 1/m does not get cancelled out in your equation when expressed in terms of f_lens, ie, the nominal aperture.

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 »

Why Nikon's school of thoughts make sense? First of all, the first term dealing with wave optics is a constant for a given lens with fixed diameter or set at certain aperture. This makes sense, though I have not checked their derivation, but Rayleigh equation says much the same -- resolving power is solely determined by the diameter or set aperture of an optic, nothing to do with magnification, effective things etc. So we can call it "inherent" property. This "inherent" value is probably measured in microns, maybe at millimetre range if the optic has really small diameter.

When dealing with "regular" photography, we are talking about meters, so this "inherent" value can be ignored, probably within error measurement. In this sense, the M in the equation can be approximated by the distance from the object over focal length. For example, a 100mm lens focused at 10m will result in magnification of 1/100. When dealing with stars, we can safely say, it is infinite. So to address JKT's concern, yeah, DOF is infinite, ie, if you focus to the moon, you might be able to see other stars clearly.

One "draw back" of Nikon's equation for regular photography is that the second term, the geometric term, is not providing near and back end of focus. So again, to address JKT, since the wave optics part is almost irrelevant and is constant, this provides us the basis for using other geometric model for DOF without the M being there. So, in a sense, Nikon's school of thought indeed has values in normal photography.

At macrophotography level, this "inherent" value can not be ignored, but it is constant, (I think) governed by resolving power of the lens. change of DOF will solely be determined by geometry, the 2nd term.

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 »

So, @JKT, if you think about that the DOF caused by wave optics is a constant value, though I do not have access to Nikon's derivation, I still think that makes sense, probably has something to do with resolving power, governed by Rayleigh's equation, everything will be clear (to you hopefully :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 »

I've read Hopkin's work very carefully, and your phrasing about "nominal aperture" is nonsense. Substitute "effective aperture", and you would be correct. The lens diameter is fixed, but the distance from focus can vary depending on magnification. If it does, then effective aperture is the number that describes the angles Hopkins is working with.
I hope we are talking about the same PDF I downloaded from your site. If so, I think I found it, page 1, the term h, is picked to pass through a point at the edge of the diaphragm, that means, what is really important is the physical size of diaphragm, which can be calculated from nominal f number, even from image side, for a given lens. So, it is not nonsense, [edit] in a sense that lens diameter can be calculated [/edit]:D Unless "nominal aperture" means something else, or does it? Or maybe use Hopkins' term, "limiting aperture" (I thought that means nominal aperture)

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 »

mjkzz wrote:
Thu Dec 22, 2022 8:47 pm
I've read Hopkin's work very carefully, and your phrasing about "nominal aperture" is nonsense. Substitute "effective aperture", and you would be correct. The lens diameter is fixed, but the distance from focus can vary depending on magnification. If it does, then effective aperture is the number that describes the angles Hopkins is working with.
I hope we are talking about the same PDF I downloaded from your site. If so, I think I found it, page 1, the term h, is picked to pass through a point at the edge of the diaphragm, that means, what is really important is the physical size of diaphragm, which can be calculated from nominal f number, even from image side, for a given lens. So, it is not nonsense, [edit] in a sense that lens diameter can be calculated [/edit]:D Unless "nominal aperture" means something else, or does it? Or maybe use Hopkins' term, "limiting aperture" (I thought that means nominal aperture)
Essentially what I am saying is this: use f_lens, the nominal f number in your equation 2, instead of f_eff! In that case, your equation 2 agrees with equation 1, also agrees with Nikon's first term, though you are missing the geometric term.

Speaking of your equation 1, for an optic with constant NA, what number do you use? The effective (m dependent) or the nominal aperture (on label)? In case of what is on the label, that means DOF is constant, too, but . . .

rjlittlefield
Site Admin
Posts: 23606
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 22, 2022 8:47 pm
I hope we are talking about the same PDF I downloaded from your site. If so, I think I found it, page 1, the term h, is picked to pass through a point at the edge of the diaphragm, that means, what is really important is the physical size of diaphragm, which can be calculated from nominal f number, even from image side, for a given lens. So, it is not nonsense, [edit] in a sense that lens diameter can be calculated [/edit]:D Unless "nominal aperture" means something else, or does it? Or maybe use Hopkins' term, "limiting aperture" (I thought that means nominal aperture)
Yes, it's the same PDF.

As for the rest, I'm not sure that what I'm hearing is what you intended to tell me. So let's try a numeric example to clarify my understanding.

The lens is 100 mm focal length, pupil factor 1, nominal f/4 so 25 mm diameter and h = h prime = 12.5 mm radius, operating in air.

We set it up in four different arrangements:
1. Infinity focus, lens at 100 mm from image plane.
2. 0.5X magnification, so lens at 150 mm from image plane.
3. 2X magnification, so lens at 300 mm from image plane.
4. 5X magnification, so lens at 600 mm from image plane.

Question: What values do you want to plug in for sin alpha prime in Hopkins' Figure 1 and equation 17, in each of these cases? This is the image side NA.

Question #2: What values do you want to plug in for sin alpha, in each of these cases. This is the object side NA.

Please show your work so that I can understand what you're trying to tell me.

--Rik

Post Reply Previous topicNext topic