Solved

POP Switching Results from Graph to PropResults

  • 15 October 2021
  • 3 replies
  • 141 views

Hi,

When I run POP analysis, I also want to have a look to the Propagation Report, just to be sure that the beam is properly sampled across all surfaces. However, when I swith from Graphic tab to the Prop Report (or vice-versa) the POP analysis runs from scratch.

This is quite slow, expecially when high sampling is required. Is there a way to avoid this behavior?

A (non efficient) solution seems to save the files data at all the surfaces and use the beam viewer to see the plots and set the POP to the Prop Report tab. But is requires the creation of huge files.

Thanks for any hint!

 

Marco

icon

Best answer by Csilla Timar-Fulep 19 October 2021, 16:04

View original

3 replies

Userlevel 5
Badge +2

Hi Marco,

Thanks for your post here on the Community forums.

Unfortunately, currently there is no built-in way to avoid the POP tool to recalculate the results when switching between the Graph and Prop Report tabs. The current way is the “designed” behavior, OpticStudio was set up like this when this analysis feature was first introduced. This is because, we need to write a lot of information to a database when performing the POP calculation. Both the Graph and Prop Report tabs access this database, but require different data from the internal POP calculations. The original idea was that writing all of the data for both the Graph and Prop Report will double the amount of time to initially write the POP file at the expense of not having to rewrite the database when switching tabs. 

As you mentioned, a potential workaround could be to save the surface by surface data and use the Beam File Viewer for visualization. Since the ZBF Beam File Viewer provides the same analysis features as the POP Graph but allows you to view all the surfaces rather than just the final surface, the Beam File Viewer was intended to be the advanced visual analysis and the Prop Report to be the advanced textual analysis, eliminating the need to switch back and forth between the Graph and Prop Report.

However, as using the Beam File Viewer requires large files, it is not an ideal solution. Therefore, there is an active feature request in our internal system from our users to avoid POP recalculation when switching tabs. I have gone ahead and added your vote to this feature request internally.

Please keep in mind that feature requests are weighed based on impact, difficulty to implement, and the number of users who request it. A request is not a guarantee that the feature will be added to a future release. These feature requests are very important to us and shape the future of OpticStudio, so we appreciate your input regarding desired functionality.

Best,
Csilla

Thank you Csilla for your detailed answer.

 

All in all, even if not optimal, I find manageable to work with PropReport tab open and the File Viewer. It is not optimal, but it works.

If I may suggest, I think that priority should be given to introduce an option to export the beam data in binary format rather than ASCII Exporting data in ASCII end importing them in programs that offer better plotting capabilitis (Matlab, Origin, gnuplot) takes jurassic times :)

I tried to extract beam data by using the ZOS-API in Matlab and Python, but I think this approach is still rather cumbersome… (and I did not succeed).

 

Ciao,

 

Marco

 

 

Userlevel 5
Badge +2

Hi Marco,

Thanks for your follow-up questions here.

If you select the “Save Output Beam To:” option in the POP tool, then the beam data will be saved into a binary ZBF file. Although you can manually generate text ZBF files to define the input beam for POP, the output ZBF files saved by OpticStudio will be binary files. You may find more details about the ZBF files and their specification in the Help files at:
The Analyze Tab (sequential ui mode) > Laser and Fibers Group > About Physical Optics Propagation > Defining the Initial Beam > File (defining the initial beam)

Besides, an example about how to manually generate ZBF files is presented in this Community forum thread:
How to manually create a ZBF file | Zemax Community

If you would like to analyze the POP data from the API, I would suggest to take a look at these forum threads, which discuss in detail how to access POP from MATLAB and Python API:
Physical Optics Propagation (POP) - API settings | Zemax Community
retrieving pop beam via ZOS_API Python | Zemax Community

Finally, you may also try to post-process the data from the ZPL macro, which option is discussed in detail in this knowledgebase article:
How to sum POP beams coherently – Knowledgebase (zemax.com)

 

I hope this helps, but if you have any further questions, please do not hesitate to ask.

Best,
Csilla

Reply