Optical System Calculator

A forum to ask questions, post setups, and generally discuss anything having to do with photomacrography and photomicroscopy.

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

VytisM
Posts: 3
Joined: Fri Jan 17, 2025 5:26 am
Location: Lithuania
Contact:

Optical System Calculator

Post by VytisM »

Dear forum members,

I will start with a disclaimer: I'm not an optical systems expert nor do I work in this field.

Recently, I developed an interest in macro-photography as a side hobby, mainly to support my primary passion - audio.
I'm still figuring things out as I go, and to help myself along the way, I created a simple optical system calculator.
It turned out to be quite effective, so I decided to share it on my site. I also added visualizations to make it more intuitive.

You can find it here.

The main idea behind it is to help you choose the right objective and match it to your camera sensor.
It's also very useful for identifying the limiting factors of system resolution and understanding the compromises involved.
I'm sure there are many more use cases, and I hope it will be especially helpful to those who are just starting out.

Side note: We had an email exchange with rjlittlefield, and he helped me fix a couple of misconceptions. Thanks to him, I'm now pretty sure it matches reality as well as theoretical simplifications allow.

All comments and questions are welcome, and I will try to answer them as time and my knowledge allows.
--BR, Vytis

Sym P. le
Posts: 348
Joined: Thu Jul 04, 2019 9:53 pm
Location: BC

Re: Optical System Calculator

Post by Sym P. le »

That's impressive. I find sliders easier than the up/down arrows.

Further, does this replicate the impact of a bayer filter, and if not can that be included?

VytisM
Posts: 3
Joined: Fri Jan 17, 2025 5:26 am
Location: Lithuania
Contact:

Re: Optical System Calculator

Post by VytisM »

Further, does this replicate the impact of a bayer filter, and if not can that be included?
No, currently it assumes monochrome sensor for simplicity. I really didn't thought about CFA implementation, but obviously when using monochromatic light, color sensor resolution will be limited to 50% green, 25% red and 25% blue.
I could probably make a selection for sensor type and then just divide pixel count by 2 or 4, depending on what part of the spectrum color slider is. That would be a crude approximation of effective color sensor resolution, but maybe still useful?
--BR, Vytis

Sym P. le
Posts: 348
Joined: Thu Jul 04, 2019 9:53 pm
Location: BC

Re: Optical System Calculator

Post by Sym P. le »

Sometimes the extra detail, though seemingly redundant, can assist with further thought experiments. What I already gleaned from your presentation is that a particular objective, say 10X 0.30, could be optimum for one primary wave length but not for others depending on the sensor characteristics and tube length selection.

At an even deeper level, the three primary wavelengths could be segregated and then combined to demonstrate the composition of a color image as assembled with current technology.

Congratulations on a very well thought out application.

Lou Jost
Posts: 6322
Joined: Fri Sep 04, 2015 7:03 am
Location: Ecuador
Contact:

Re: Optical System Calculator

Post by Lou Jost »

Looks nice, thanks for sharing it. But I don't understand the "Delta Tube Check". I don't see any option to specify whether the objective is infinity-corrected or not. Because of that, I don't know how to interpret your numbers for "used tube length" and "nominal tube length". Your use of "180mm" as an example of nominal tube length suggests that It seems like you really mean "nominal tube lens focal length" and not the physical tube length. But if that is what you mean, you seem to be suggesting that there is some reason not to stray too far from the nominal length. Can you explain how you came to that number? When pushing down, is it the point at which the image no longer covers the sensor? Or are you using other criteria? What determines the limit for using longer-than-nominal tube length?

VytisM
Posts: 3
Joined: Fri Jan 17, 2025 5:26 am
Location: Lithuania
Contact:

Re: Optical System Calculator

Post by VytisM »

Sym P. le wrote:
Fri Jan 17, 2025 1:44 pm
Sometimes the extra detail, though seemingly redundant, can assist with further thought experiments.
Would be hard to disagree, so I added another drop-down for sensor type. Now when color is selected, sensor resolution is halved for green spectrum and quartered for others.
This corresponds to worst case scenario, so make sure to select 2 pixels per Rayleigh distance to bring sensor resolution closer to reality.
Sym P. le wrote:
Fri Jan 17, 2025 1:44 pm
Congratulations on a very well thought out application.
Thank you for positive feedback, really appreciated!
Lou Jost wrote:
Fri Jan 17, 2025 5:17 pm
But I don't understand the "Delta Tube Check".
This part was most difficult for me too, so no worries. Calculator assumes finite objective is used, then any mismatch between specified tube length and used one will be Delta Tube Length.
Now there is some allowable error that is a function of objective NA. It is experimentally derived here as fig 2-2. I use this function to predict if used tube is outside the allowable range, meaning is there a drop in sharpness and system resolution.

So as it's stand now, if you enter Nominal tube length for your infinity objective and Used Tube Length as tube lens focal length - you will see your real sensor coverage that is effected by "Tube magnification".

In the default case, we have 180mm objective and let's use Raynox 150 with it. So our "Used tube length" is 208mm. Now effective tube magnification becomes x23.11 and together with sensor crop we have effective x32.70 magnification. Also FOV at image side shrinks to Ø0.81 mm. Unfortunately whole "Delta Tube Check" is not correct now, as we can use more or less any focal length for tube lens with infinity corrected objectives and get away with only change in magnification (no degradation).

In principle I could make a selection for objective type, then change input field names to "Used Tube Length" and "Tube Lens f" and calculate correct "Delta Tube Length". I guess all of us experienced that we can move sensor away from a point where tube lens is at it's focal length (perfectly at infinity) and still get a good image from objective. So this would simulate this available deviation from ideal tube lens focal length. Problem is that I'm not sure how well does a function from the article that I'm using now would fit this scenario.
--BR, Vytis

Lou Jost
Posts: 6322
Joined: Fri Sep 04, 2015 7:03 am
Location: Ecuador
Contact:

Re: Optical System Calculator

Post by Lou Jost »

Thanks for the clarifications. That all sounds reasonable, now that I know it refers to finite objectives.

Post Reply Previous topicNext topic