Skip to main content

ZOS API (MATLAB)

  • June 16, 2020
  • 1 reply
  • 132 views

I have been trying to retrieve data from Zemax's FootPrint Diagram under  'Rays and Spots’ for various fields into MATLAB. From my reading and searching the help documentation I was able to located the enum ZOSAPI.Analysis.AnalysisIDM.FootprintSettings that may be helpful for the data import I need. Is there an example or help on how to exactly get the FootPrint Diagram data for various fields at different surfaces of the optical model.

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

1 reply

Kevin Scales
En-Lightened
Forum|alt.badge.img+1
  • En-Lightened
  • 185 replies
  • June 16, 2020

There is not a direct way to do this in Matlab. The Footprint Diagram does not have header data or a data series. You can, however, parse the text file, and you have two options.

You can use the GetTextFile property to obtain the text output in a temporary location and then use Matlab read and write functions to get the data.

You can also use a ZPL macro to do the same thing. This one has the advantage that one of my colleagues here at Zemax has already written one for public use in the forums. You can find it here: https://my.zemax.com/en-US/forum/threads/723c2a92-58a0-ea11-a812-000d3a329613#3bb63c93-58a0-ea11-8b72-00155d46a79c.


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