Skip to main content
Solved

Understanding OPDMode in ZOSAPI.Tools.Raytrace


Forum|alt.badge.img+1

Hi All,

I’m working on a Batch Ray Trace tool using the ZOS-API and need the optical path length of each ray I trace. When I look on the docs there appear to be three options
1) “None” : which returns optical path length of the ray
2) “Current” : which returns the path difference between the current ray and the previous ray
3) “CurrentAndChief”: which returns the path difference between the current ray and the chief ray

I was seeing results that were inconsistent with my expectations so I ran a test. If “None” returns the optical path length of the ray, and I subtract the mean value of all the computed OPL’s from each ray trace, then I should see a result that is similar to the Wavefront Map. 

 



What I found is that the shape is similar, but the amplitude greater by a factor of ~10
 


What causes this difference?
 

Best answer by Jeff.Wilde

Hi Jaren,

The wavefront map is a plot of the OPD (in waves) over the pupil.  The OPD for an arbitrary ray is simply the difference between the optical path length of the ray minus the optical path length of the chief ray (again, typically expressed in terms of waves).

To compute the wavefront map in ZOS-API, it seems that the best way would be to use either the “Current” mode if the chief ray does not change, or “CurrentAndChief” if the chief ray happens to change.  The predecessor to the NormUnpol batch raytrace in ZOS-API was the Mode 0 version in Extensions (which are now deprecated).  Here’s what the help documentation says about this older mode of doing the same thing:

 

 

Regards,

Jeff

 

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

2 replies

David.Nguyen
Luminary
Forum|alt.badge.img+2

Hi Jaren,

 

Nice to see you here! Didn’t know you were looking to use Zemax for your project. I think we are working towards a similar goal, let’s have a chat one day (I’ll write you an email).

In the meantime, have a look at this reply from @MichaelH. Perhaps it can help you. From Michael’s answer, it seems None gives you the absolute path length, probably in lens unit (at least not in waves, that’s what he’s saying in his reply).

Take care,

 

David


Jeff.Wilde
Luminary
Forum|alt.badge.img+3
  • Luminary
  • 491 replies
  • Answer
  • July 7, 2022

Hi Jaren,

The wavefront map is a plot of the OPD (in waves) over the pupil.  The OPD for an arbitrary ray is simply the difference between the optical path length of the ray minus the optical path length of the chief ray (again, typically expressed in terms of waves).

To compute the wavefront map in ZOS-API, it seems that the best way would be to use either the “Current” mode if the chief ray does not change, or “CurrentAndChief” if the chief ray happens to change.  The predecessor to the NormUnpol batch raytrace in ZOS-API was the Mode 0 version in Extensions (which are now deprecated).  Here’s what the help documentation says about this older mode of doing the same thing:

 

 

Regards,

Jeff

 


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