Exporting Ray outputs on plots to text file

  • 18 September 2020
  • 2 replies
  • 397 views

Badge

I have possibly a rather elementary question.


Is it possible to export to a txt file (ASCII) the ray coordinates (or cosine directors) shown on a 'Standard Spot Diagram' or 'Footprint Diagram' ?


The 'Text' tabs only offer a summary of the overall ray tracing but not the rays themselves.


The closes thing I found is in 'Extended Scene Analysis --> Geometric Image Analysis' but has a completely different purpose, so not sure why it cannot be done for standard analysis tools... this is a big obstacle for more complex optical analysis.


Many thanks!


2 replies

Userlevel 5
Badge +2

Hi Giorgio,


Thanks for your question here!


Unfortunately, currently there is no way to export the diagram in order to get all the coordinates.


Currently, as a workaround, you could achieve this by running a macro looping over an array of single ray traces and saving the coordinates at the desired surface. You will need the following keyords and numeric functions: RAYTRACE, RAYX(n), RAYY(n), RAYZ(n) for the coordinates and RAYL(n), RAYM(n), and RAYN(n) for the direction cosines following the surface.

You may find more info about this in the Help file under:

The Programming Tab > About the ZPL > KEYWORDS (about the zpl) > RAYTRACE


This idea to give acces to the coordinates from the Spot Diagram or Footprint Diagram has been brought up before our customers and there's a feature request for it. I have gone ahead and voted for this feature request in our internal system on your behalf. 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. However, these feature requests are very important to us and shape the future of OpticStudio, so we appreciate your input!


Thanks, 


Csilla


 

I just want to add here that this is a feature I would also really appreciate! So maybe you can push this development even more.

Reply