Skip to main content

Hi,

I’m trying to obtain data from the ‘Flux vs Wavelength’ analysis tool while interacting through the ZOS-API (MATLAB). Setting a desired detector and wavelength bins then saving text output of flux by wavelength bin on that detector is my goal. 

There doesn't seem to be any direct way to modify these settings through the ZOS API, I have checked with the ‘HasAnalysisSpecificSettingsTool’. So I am trying to use the ‘ModifySettings’ route to change the configuration file (string code FVW). However, I cannot find the type codes for Flux vs Wavelength in the OpticStudio Manual or on any other help or discussion areas! I can do everything I required through the GUI, but  not through ZOS API, which I am using to automate analysis. This is proving to be a large roadblock for our work.

Could someone please let me know if what I am wanting to perform is possible and what the type codes for the Flux vs Wavelength analysis are?

Or even better if there is a direct method to modify the settings through ZOS-API?

Thanks in advance for your help. 

 

 

Hi Mark,

 

I think you looked in the right place. However, if the analysis doesn’t have specific settings and codes for “ModifySettings”, then you probably can’t change the settings dynamically.

The way forward is to ask Zemax if, and when, they intend to implement this analysis in the ZOS-API. Alternatively, this isn’t such a complicated analysis, and you could consider reprogramming it yourself. All this analysis does is parsing a ZRD file and for each ray, check that it intersects your object of interest, and if it does, add its intensity. This is done in Python, but you could have a look at that: 

Hope this helps.

Take care,


David

 


Hi David,

Thanks for your help. I will contact Zemax, and have a look at parsing ZRD files


Reply