How to calculate step size

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

Moderators: rjlittlefield, ChrisR, Chris S., Pau

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

Re: How to calculate step size

Post by rjlittlefield »

4odonates wrote:
Tue Feb 21, 2023 2:10 am
My blog post is online at the following address …

https://waltersanford.wordpress.com/202 ... alculator/

Corrections and/or suggestions for improvement are invited and welcome.
On quick read, that all looks good to me.

One more thing relevant to DOF... I was clicking around in earlier months of your blog and ran into the post at https://waltersanford.wordpress.com/2023/01/ , where you wrote that
Look closely at the full size version of the composite image. I don’t see any glaring “focus banding” so the 200 micron step size seems to have worked.
I plugged your data (2.5X, f/4) into the calculator, which reports wave optics DOF of only 69 microns. I was puzzled by absence of focus banding at 200 microns, so I visited the full size image at https://waltersanford.files.wordpress.c ... ropped.jpg and zoomed in to actual pixels.

Zooming in made the situation clear. In fact there is lots of focus banding, at the locations that I've marked here with dots. But I agree the bands are not "glaring", partly because the random nature of the surface texture makes the bands difficult to see unless you're used to looking for them.
2023-02-21_13-21-08.jpg

Playing with the setting for COC in the calculator, it turns out that to get 200 microns at 2.5X and f/4 requires a COC diameter of 0.045 mm. That is significantly larger than the classic value of 0.020 mm used for APS-C, so not very sharp.

But if you are happy with the level of sharpness indicated by 0.045 mm, then the calculator also suggests using a smaller aperture. By playing with the aperture, while leaving COC set to 0.045 mm, you'll see that the calculator reaches "Aperture is near optimum" at f/11, at which point the classic and wave optics calculations agree that you'll get over 0.500 mm DOF.

Alternatively, if you really want to shoot at 0.200 mm step size, and you also want the sharpest image you can get with that step, then the thing to do is adjust aperture so that the wave optics DOF is 0.200 mm. That happens at just a hair below f/7, call it f/8 for ease of setting. This is the aperture setting where the worst losses from diffraction and defocus are balanced. If the aperture were smaller, then the whole image would become more blurred (from diffraction), and if the aperture were larger, then the most blurred parts would get even more blurred (from defocus).

--Rik

4odonates
Posts: 41
Joined: Sun Oct 30, 2022 12:43 pm
Location: Fairfax County, Virginia

Re: How to calculate step size

Post by 4odonates »

A step size of 200 microns was a wild guess based upon guidance from what I know now is a flawed calculator. I thought I just got lucky but after working with your DOF Calculator I figured there must be focus banding issues that I didn’t see because there’s so little contrast in most of the subject. I should update that post to reflect my new understanding, maybe even redo the composite image. More than likely I’ll move on to a better subject especially since my primary goal was to test the NiSi NM-200.

Thanks for the feedback, Rik!
Walter

4odonates
Posts: 41
Joined: Sun Oct 30, 2022 12:43 pm
Location: Fairfax County, Virginia

Re: How to calculate step size

Post by 4odonates »

I’m definitely going to update my old blog post. May I have permission to use your annotated image of my toy dinosaur, Rik? Of course you will be credited.

I tend to be a perfectionist. My goal is to create the best focus stacked composite images that I can, given the limitations of the macro photography gear I own. I’m not married to any particular settings — I will use the settings likely to produce the best results.

Which leads to a follow-up question. I have watched several videos that convincingly demonstrate f/4 is the "sweet spot" for the Laowa 25mm Ultra Macro lens. Does that apply only to one-off single shots? Would I get better results by stacking single images shot using another aperture, despite the fact that each individual image might not look as good as ones shot at f/4?

Same question regarding my Canon 100mm macro lens? I used f/16 as the example in my latest blog post because the DOF Calculator says that will produce the best results. But in my experience shooting one-offs, an aperture setting of f/8 to f/11 produces the best results.

Finally, my latest blog post includes all of my basic macro rigs, minus add-ons. Which one(s) do you think should give me the best results? Bear in mind, I’m all about odonates (dragonflies and damselflies). Odonate larvae and exuviae are typically less than 35 mm long; most are 25 mm or less. Adults are much larger; macro shots tend to focus on smaller parts of their anatomy.

Thanks for your advice!
Walter

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

Re: How to calculate step size

Post by rjlittlefield »

4odonates wrote:
Tue Feb 21, 2023 6:04 pm
I’m definitely going to update my old blog post. May I have permission to use your annotated image of my toy dinosaur, Rik? Of course you will be credited.
Permission granted, thanks for asking.
I tend to be a perfectionist. My goal is to create the best focus stacked composite images that I can, given the limitations of the macro photography gear I own. I’m not married to any particular settings — I will use the settings likely to produce the best results.
For this goal, you should test each lens to see what aperture gives the sharpest single image, then use that aperture setting and let the calculator determine the corresponding step size.

You should also not specify CoC when using the calculator. The reason is explained below.
Which leads to a follow-up question. I have watched several videos that convincingly demonstrate f/4 is the "sweet spot" for the Laowa 25mm Ultra Macro lens. Does that apply only to one-off single shots? Would I get better results by stacking single images shot using another aperture, despite the fact that each individual image might not look as good as ones shot at f/4?

Same question regarding my Canon 100mm macro lens? I used f/16 as the example in my latest blog post because the DOF Calculator says that will produce the best results. But in my experience shooting one-offs, an aperture setting of f/8 to f/11 produces the best results.
I think you have not quite grasped the role of CoC yet. Let me try again to explain that.

CoC is the way that you specify how much blur you are willing to tolerate. When the calculator said "Aperture is near optimum", it was telling you only that the aperture setting was a good match for the CoC that you specified.

But the CoC that you specified was 0.030 mm, which on a Canon EOS 5D Mark II spans almost 5 pixels. An image which uniformly has that much blur will not look as sharp as it could be. But that's what you said you wanted, so the calculator dutifully gave you an aperture to match. It is "optimal" in the sense that the aperture is well matched to the size of the CoC, so you won't be shooting more frames than you need for that specified lack of sharpness. It certainly does not mean optimal in the sense of giving you the sharpest result, because the calculator has no idea about that particular lens's sweet spot.

The reason I recommend to not specify CoC at all is to avoid having the calculator say anything at all about "optimal". If you want the sharpest possible result, you should just set the aperture to the lens's sweet spot, and not give the calculator any misleading information.

I have modified the calculator so that it now says "Aperture is near optimum for specified CoC" or "Resolution is limited by sensor or CoC setting, consider a narrower aperture or omit CoC". I'm hoping this will be more clear, but it's always hard to predict that.

Finally, my latest blog post includes all of my basic macro rigs, minus add-ons. Which one(s) do you think should give me the best results? Bear in mind, I’m all about odonates (dragonflies and damselflies). Odonate larvae and exuviae are typically less than 35 mm long; most are 25 mm or less. Adults are much larger; macro shots tend to focus on smaller parts of their anatomy.
Unfortunately this must be a matter for experimentation with your particular lenses. You have three lenses that will work at 4X: the 4X NA 0.10 microscope objective, the Laowa 25mm Ultra Macro, and the Canon MP-E 65. Any one of them might be sharpest at 4X, and the only way to tell is to try it. In addition there may be differences in chromatic aberration and there will definitely be differences in ease of use. Individual lenses can vary, for example there are reliable reports of some MP-E 65's being sharpest at f/4, but my unit is sharpest at f/2.8.

Please let us know what you find!

--Rik

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

Re: How to calculate step size

Post by JKT »

Testing the microscope objective is easy as it takes just one stack the with recommended Z-step.

The Laowa and MP-E are something else. As Rik wrote, you need to find the optimal aperture for each magnification by testing. You could start with whole number magnifications and add values between them later.

For each magnification I'd start by plugging in the values for the camera, desired magnification and then the maximum aperture for the lens. Then I'd decrease the aperture until the calculator reports that settings are optimal. That's the largest aperture for testing with that magnification. Using larger aperture will increase work and results in differences that are rather difficult to see. Then you need to test starting from that aperture towards smaller ones ... within reason. You could start with maybe two full stops down from the min, so it would take 7 stacks / magnification. Each stack is naturally done with the recommended step for that aperture.

With larger magnification even the maximum aperture might give a recommendation to increase aperture. In that case the maximum is the starting aperture.

No, I would not use single images for the evaluation. I might be wrong, but the stack is the end result, so that is what I would use.

4odonates
Posts: 41
Joined: Sun Oct 30, 2022 12:43 pm
Location: Fairfax County, Virginia

Re: How to calculate step size

Post by 4odonates »

Rik said ...
You should also not specify CoC when using the calculator.
so I recalculated the DoF/step size for all my macro photography rigs (using the "sweet spot" for each lens), created new screen captures, and updated my blog post.

https://waltersanford.wordpress.com/202 ... alculator/

As a result of the latest round of discussion, I'm unable to think of a single situation in which Options 2 and 3 would be good choices. What am I missing? (Probably a lot, but hey, I'll never know if I don't ask.)

Walter

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

Re: How to calculate step size

Post by JKT »

4odonates wrote:
Wed Feb 22, 2023 2:49 pm
As a result of the latest round of discussion, I'm unable to think of a single situation in which Options 2 and 3 would be good choices. What am I missing? (Probably a lot, but hey, I'll never know if I don't ask.)
I would use 3 instead of 1. The difference is that after you have learned what kind of sharpness you require from your images you can avoid taking unnecessary number of shots. The sharpness is the multiplier used to get CoC from the sensor pixel pitch. It could as well be the multiplier between pixel pitch and optical resolution. The two behave almost the same with a multiplier 0.61 between them. For the simple formula for wave optics DoF there would be no "almost" there.

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

Re: How to calculate step size

Post by rjlittlefield »

4odonates wrote:
Wed Feb 22, 2023 2:49 pm
As a result of the latest round of discussion, I'm unable to think of a single situation in which Options 2 and 3 would be good choices. What am I missing? (Probably a lot, but hey, I'll never know if I don't ask.)
Any option involving CoC is intended to help you avoid shooting more frames than you really need to.

Option 2, with CoC specified directly in mm, is useful in the unusual case that somebody is targeting a specific end application where viewers will not be permitted to zoom in to camera-resolution pixels. For me, it's also helpful as a pedagogical device: "Look, if you plug in 0.03 mm on full frame, and manage to get all the other settings to match also, then my calculator gives the same result that other calculators do. Now, let's try some other numbers and see why you might want to go smaller or larger."

Option 3, with CoC specified as number of camera pixels, is helpful if you're shooting at low mag and wide aperture, intending to get a nice soft background. In such cases the wave optics DOF can be way shallower than you actually need, because at wide aperture the Airy disk is too small for the camera sensor to appreciate. In tables 2-A and 2-B at https://zerenesystems.com/cms/stacker/d ... romicrodof , the upper left corner contains DOF numbers that are ludicrously too small for current camera sensors. That's because they were calculated to promise "won't see focus banding no matter how good a camera or lens you're using". But now the interactive calculator can know about sensor limitations and give a tighter bound on what you really need in that area.

--Rik

4odonates
Posts: 41
Joined: Sun Oct 30, 2022 12:43 pm
Location: Fairfax County, Virginia

Re: How to calculate step size

Post by 4odonates »

Thanks Rik, for your explanation of when to use Option 2 and 3 in your DOF Calculator.

I just updated my blog post featuring the composite image of an orange toy dinosaur to include the annotated version that you created show focus banding.

https://waltersanford.wordpress.com/202 ... ocus-rail/

Thanks again!
Walter

Post Reply Previous topicNext topic