Skip to main content
Solved

Modifying Flux vs Wavelength settings with ZOS-API

  • February 23, 2023
  • 2 replies
  • 135 views

Forum|alt.badge.img

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. 

 

 

Best answer by David.Nguyen

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

 

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

2 replies

David.Nguyen
Luminary
Forum|alt.badge.img+2
  • Luminary
  • 1089 replies
  • Answer
  • February 23, 2023

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

 


Forum|alt.badge.img
  • Author
  • Single Emitter
  • 1 reply
  • February 26, 2023

Hi David,

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


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