Skip to main content
Solved

How to set RayInfo.Vignetted in ZOS-API_Python

  • April 19, 2021
  • 1 reply
  • 232 views

Hello,


I would like to raytrace in SQ mode and check vignetted surface number .


In ZPL, RAYTRACE Hx,Hy,Px,Py ; RAYV() ;


In ZOS-API-Python, I would like to perform the command content above.


But I don't know how to use  RayInfo.Vignetted in ZOS-API_Python.(Error Code:instance property must be accessed through a class instance)


Do you know how to solve this problem?


Thank you


 


Hideki Nishioka

Best answer by David.Nguyen

Hi Hideki,


This is because RayTrace has fully-implemented settings, but not fully-implemented results (have a look at this post). Therefore, it doesn't have RayData, and that is why you get this error.


Usually, when this is the case, you can use the GetTextFile method of the IAR_ result interface to write the results to a text file. This corresponds to the text tab often found in the analysis windows, which doesn't exist for the Single Ray Trace. Have a look at this knowledgebase article for more information.


Then, you'll need to parse this text file, which contains a column Comment. This column will have the word Vignetted written at the corresponding surface.


Alternatively, you could use the BatchRayTrace tool, which is used to launch multiple ray traces, but works fine with a single ray as well. The advantage is that is has a slightly more user-friendly results.


I hope this helps.


Take care,


David

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

1 reply

David.Nguyen
Luminary
Forum|alt.badge.img+2
  • Luminary
  • 1088 replies
  • Answer
  • April 23, 2021

Hi Hideki,


This is because RayTrace has fully-implemented settings, but not fully-implemented results (have a look at this post). Therefore, it doesn't have RayData, and that is why you get this error.


Usually, when this is the case, you can use the GetTextFile method of the IAR_ result interface to write the results to a text file. This corresponds to the text tab often found in the analysis windows, which doesn't exist for the Single Ray Trace. Have a look at this knowledgebase article for more information.


Then, you'll need to parse this text file, which contains a column Comment. This column will have the word Vignetted written at the corresponding surface.


Alternatively, you could use the BatchRayTrace tool, which is used to launch multiple ray traces, but works fine with a single ray as well. The advantage is that is has a slightly more user-friendly results.


I hope this helps.


Take care,


David


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