Skip to main content
Solved

MTF tolerancing focus errors - Can I use RMS spot metric to refocus during MTF tolerancing?

  • February 14, 2025
  • 5 replies
  • 60 views

Giles Sheppard

New Zemax user, long time CodeV user

I am attempting to do a tolerancing exercise on a lens, but some Monte Carlo results are not focusing correctly.  I suspect it is something to do with the default focus optimization for MTF tolerancing being wavefront optimization (which is bad at finding best focus even in the optimizer stand-alone when I open the worst Monte Carlo result and manually optimize).
Is there a way to tell the refocus method within the tolerancing function to use RMS spot optimization?  Or does someone have other wisdom to offer?

Best answer by Chris Normanshire

Hi Giles,

You can use a tolerance script for this. This article explains how to use a script to report any value from the merit function during tolerancing How to get any optimization operand value in the tolerance report – Knowledgebase.


You could have one merit function that optimises for spot size and then has one, or more, zero-weighted, MTF operands for reporting. However, it would be more efficient to create and save two merit functions, one for spot size and one with the MTF operands. Then, in your script, you’d first the load the spot spot size merit function and optimise your compensators, and second you’d load the MTF merit function and just report the values you need.

Chris

View original
Did this topic help you find an answer to your question?

5 replies

Mike.Jones
En-Lightened
Forum|alt.badge.img+3
  • En-Lightened
  • 113 replies
  • February 14, 2025

Try this:  Create and use your own merit function, and set Criterion to Merit Function.  Under Comp use Optimize All (DLS).  If you can, add other compensators besides BFL to give the tolerancing optimizer more degrees of freedom.  You can constrain the range of all compensators in the Merit Function.

Mike


Giles Sheppard
  • Author
  • Single Emitter
  • 3 replies
  • February 17, 2025

Hi Mike,

 

This solves the focusing problem, but removes the MTF information.  Sure, I can trawl the Monte Carlo files and extract the performance info but it would be much nicer to use the tolerancing tool to do the work.

 

Thanks,

Giles


Giles Sheppard
  • Author
  • Single Emitter
  • 3 replies
  • February 17, 2025

Best approach appears to be to use Paraxial Focus compensation and ignore spherical aberration for rough tolerancing then tolerance on another metric and extract MTF manually for final results.


Chris Normanshire
Zemax Staff
Forum|alt.badge.img+2

Hi Giles,

You can use a tolerance script for this. This article explains how to use a script to report any value from the merit function during tolerancing How to get any optimization operand value in the tolerance report – Knowledgebase.


You could have one merit function that optimises for spot size and then has one, or more, zero-weighted, MTF operands for reporting. However, it would be more efficient to create and save two merit functions, one for spot size and one with the MTF operands. Then, in your script, you’d first the load the spot spot size merit function and optimise your compensators, and second you’d load the MTF merit function and just report the values you need.

Chris


Giles Sheppard
  • Author
  • Single Emitter
  • 3 replies
  • February 19, 2025

Thanks Chris, I’ll give it a go!


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings