Hello Zemax Community,
I am struggling to navigate the OpticStudio API in MATLAB. What I'm attempting to do shouldn't be that difficult. I think my issue is I'm not an object oriented programmer, much less a competent software developer so I'm really struggling.
First thing I tried was consulting several helpful examples that successfully demonstrated grabbing analysis data through MATLAB. I've run and studies these and can grab wavefans, MTF and spot diagrams. Although the last one looked like it used the ray trace engine directly and not the spot diagram analysis function.
The specific example that I think would get me started is if I had example code showing how to pull wavefront maps at various fields and wavelengths in the 28deg double Gauss sample lens file.
I found the analysis method 'New_WavefrontMap' and can create the object in Matlab but can't figure out how to actually get the data. It does not appear as easy as grabbing a full double array. Rather it looks like all data is grabbed one element at a time, and the arguments needed to do this are very specific to each analysis object. After a few hours, I’m stuck.
Greatly appreciate any help. Thanks!
-Frank