Skip to main content
Question

Tolerancing nominal criterion value differs from spot diagram

  • October 1, 2025
  • 16 replies
  • 121 views

Julien Dejonghe

Hi, I’m trying to learn how to use tolerancing tools in zemax. For this, I uploaded a singlet file from thorlabs catalog, to start with something simple. No merit function or variables in this file. I do not understand why the RMS spot value is not the same in the tolerancing summary and in the spot diagram.

I tried different sampling but it didn’t help. Here the values are close (7.7 and 9.1 microns), but with more complex files the difference was really large.

See capture:

 

16 replies

Jkbrz
  • Monochrome
  • 1 reply
  • October 1, 2025

Hello, as far as I know, nominal criterion set as RMS spot radius in the tolerancer refer to the spot radius in the RMS vs. Field tool in the Analyze tab. Spot diagram is more accurate.


Sean Turner
Fully Spectral
Forum|alt.badge.img+1
  • Fully Spectral
  • 106 replies
  • October 1, 2025

Hexapolar pattern with ray density 10 in the spot diagram is not the same as sampling value of 10 in the tolerance analysis. Increase the ray density in your spot diagram to see the RMS spot radius decrease. Eventually it should converge around the same value as the tolerance analysis. 

Spot Diagram:
Ray Density The Ray Density specifies the number of Hexapolar Rings to be traced if a Hexapolar or Dithered Pattern is selected, or the Number of Rays across the Width and Height if a Rectangular Pattern is selected. The more Rays traced, the greater the accuracy of the RMS Spot Radius, although the computation time increases. There are 6 Rays in the first Hexapolar Ring, 12 in the second, 18 in the third, and so on. The Ray Density Minimum Value is 3.
 

Tolerancing:
Sampling: Sampling is used to set how many rays are traced when computing the tolerance criterion. Higher sampling traces more rays, and gives more accurate results. However, the execution time increases. If the selected criterion is RMS spot or RMS wavefront, then the sampling value is an integer that refers to the number of rays traced along a radial arm of the pupil in the Gaussian quadrature technique (see "Selecting the pupil integration method" for a description of this technique). The number of arms is always twice the number of rays along each arm. 


Julien Dejonghe
  • Author
  • Visible
  • 25 replies
  • October 1, 2025

Thanks! Indeed, increasing the sampling in the spot diagram brought the RMS value close to the one in the tolerancing tool, but I had to increase a lot (200)!

 


Julien Dejonghe
  • Author
  • Visible
  • 25 replies
  • October 2, 2025

Well, today I restarted with the file on which I actually need to compute tolerancing, an achromatic doublet, and I was unable to get the same values in the spot diagram and in the tolerancing criterion. See capture below…

So it is a bit difficult to trust the tolerancing results if I don’t really understand what the criterion value is.

Any ideas?

Julien

 


Sean Turner
Fully Spectral
Forum|alt.badge.img+1
  • Fully Spectral
  • 106 replies
  • October 2, 2025

It’s hard to say exactly without seeing the wavelengths and fields in your file, but it probably comes down to those settings are not the same between the spot diagram and tolerancing. 

Your spot diagram is only showing 1 field and one wavelength, so the RMS radius is calculated based on those settings. The nominal criterion in the Tolerancing Results takes all fields into account. Try changing your spot diagram settings to include all wavelengths and fields and you should see better agreement. 

 


Julien Dejonghe
  • Author
  • Visible
  • 25 replies
  • October 2, 2025

Makes sense. I put the 2 fields and all wavelengths in the spot diagram, and get 2 RMS values. The one in the tolerancing tool is in between, so it is better but still a bit difficult to analyse. By the way, changing the value of the test wavelength doesn’t change the criterion value.

 


Julien Dejonghe
  • Author
  • Visible
  • 25 replies
  • October 2, 2025

Then I simplified the file and kept only one field and on wavelength, now the values in spot diagram and tolerancing tool are very close: 0.8 microns.

Thanks


Julien Dejonghe
  • Author
  • Visible
  • 25 replies
  • October 6, 2025

Still learning about tolerancing: I tried to use “paraxial focus” or “optimize all (DLS)” as compensator, then ran the process and openend the worst MC file to see how the performances are affected. Each time, the focusing doesn’t seem at its best, and I can improve it by using the quick focus in the Optimize tab. Why the compensation doesn’t seem to work fully?

Thanks


Julien Dejonghe
  • Author
  • Visible
  • 25 replies
  • October 6, 2025

Turns out each time I re-open the last MC WORST, analyse windows are not udated (setting is udate all windows in the preferences, weird...), so it probably misleaded me in my understanding of what was happenning, sorry...


Julien Dejonghe
  • Author
  • Visible
  • 25 replies
  • October 6, 2025

Ok, so when using Optimize All (DLS or OD) as compensators, the result is better, no need to perform a quick focus optimization.


Julien Dejonghe
  • Author
  • Visible
  • 25 replies
  • November 4, 2025

Hi, I’m re-opening this topic: today, when performing tolerance analysis, while “use focus compensation” is selected, if I run the tool and then open the MC_worst file, I can see there is no refocusing!

Anybody has an idea?

 

 

 


MichaelH
Ansys Staff
Forum|alt.badge.img+2
  • Ansys Staff
  • 402 replies
  • November 4, 2025

Hey Julien,

Do you have a COMP defined in your TDE?  I can’s see what is actually defined but a COMP would be a light blue color and your TDE starts with what looks like a TWAV followed by TRAD  & TTHI operands.  You can consider a COMP as a variable during tolerancing.

Also, it looks like you’re defining your test wavelength as 633um, not 0.633um.  I would double check that this is the wavelength that you want (OpticStudio only deals in microns, not nanometers).  

If you can upload your file, someone can better diagnose what is actually going on with your file.  


Julien Dejonghe
  • Author
  • Visible
  • 25 replies
  • November 5, 2025

Indeed, I don’t… So it is probably the reason why the back focus is not adjusted correctly. About the wavelength, you are right, I should have entered it in microns. By the way, when re-opening the TDE, the test wavelength is set at zero, I don’t know what it means. My understanding is that the test wavelength used for tolerancing is not necessarily the same as the one used in the system (my design here is centered on 1.35), ami right?

Below is my current TDE, I will add a COMP and try again, but I have another question: A merit Function can be used as a criterion, but I believe it is not the same Merit Function I used to optimise the design, so where do I define the Merit Function for tolerancing? 

Thanks

Julien

 


Julien Dejonghe
  • Author
  • Visible
  • 25 replies
  • November 5, 2025

Doesn’t seem to work… I added a compensator, but it disappears if I click on apply or save in the TDE. I tried it anyway and the focus wasnt adjusted when openig the MC_Worst file. I am obviouly missing something! Attached is the zemax file.


MichaelH
Ansys Staff
Forum|alt.badge.img+2
  • Ansys Staff
  • 402 replies
  • November 5, 2025

For the COMP, the Min and Max are delta values, not absolute values.  So, when you have your COMP 5 nominal at ~232.83mm, you should set the maximum deviation from this nominal value.  You have the Min set to 230 and the Max set to 236, meaning OpticStudio is targeting the compensator value of between ~462mm and ~468mm.  These values should be -2 & +4:

I would suggest saving 1 Monte Carlo file and opening it up to see what OpticStudio is actually doing to the modified system.  

 

In your case, you can see that OpticStudio is properly adding the variable to Surface 5 but then when you look at the Merit Function Editor, you have a CTLT and CTGT targeting the improper min & max values you had set.

As for the test wavelength, this is used to determine the number of fringes for other operands like TFRN or TEXI; this is needed to convert from fringes/waves to physical values like nanometers.


Julien Dejonghe
  • Author
  • Visible
  • 25 replies
  • November 5, 2025

Ok thanks, I used -10 and +10 for the Min and Max values for the compensator, it works well. Anyway, this COMP operand keeps being erased if I click “apply” or “ok” int the TDE, which is a bit annoying.

Julien