The Ray Database Viewer reports quite a bit of data, but it doesn't seem to have angle of incidence. Is there an option to show that information? Or do I have to derive it myself?
Best answer by Allie
View originalThe Ray Database Viewer reports quite a bit of data, but it doesn't seem to have angle of incidence. Is there an option to show that information? Or do I have to derive it myself?
Best answer by Allie
View originalOpticStudio 19.4 provides a lot of useful information in a Ray Database Viewer. All of this information is considered to be the “base” information and there is some useful information that a user might have to derive from this base information. The information reported is:
To visualize the LMN and Normals in terms of Angle of Incidence rather than the provided vector representation, you will need to derive the values yourself. To do so, you will need to use the equation for the angle between 2 vectors:
Translating this to OpticStudio values, you get the angle to be:
In order to automate this process, you can create a ZPL macro that will loop through each row in an opened Ray Database Viewer (the RDV needs to be opened to ensure that the proper LMN and Normal values are displayed since these can be toggled on & off). The ZPL attached in the next post will ask the user for the window number of the RDV, which is the number in the left part of the tab. The only 2 caveats for using this macro are:
The following will be the output. Notice that the LMN and Normal components are printed out so you can verify that the inputs are correct. The last column will be the AOI of the ray with respect to the surface normal.
Hi,
The attached zpl file cannot be opened! could you please attach it again? thanks.
Is this method works for sequential mode as well?
Cheers,
Sahar
Hi Sahar,
Thanks for the message. I've gone ahead and reuploaded the file as a .zip folder. Can you try downloading it again? When you open the file, make sure to <right-click> and select Open With...Notepad (or another text editor). I found that my computer was defaulting to another program.
That said, to answer your second question, out of box, this method will not work for Sequential Mode. This macro reads information from the Ray Database Viewer, which is only available in Non-Sequential Mode. However, you can report the angle of incidence for a given ray at a given surface in your sequential system using the optimization operand, RAID. With this, you could define a macro to loop over a given set of rays and report the RAID operand values for them. Check out this article on the Knowledgebase for some guidance on how to do this.
Cheers,
Nick
AOI macro seems to be working unexpectedly for my case,
Could you make comment on this ?
Hi
Thank you for your response Allie,
I attached the zipped version of my ZRD file. I am not clear about how to read the correct angle values.
A comment on the sitiuation is welcomed.
Based on the ZRD file you sent me, I think when you ran the macro, it somehow picked up the wrong values for L, M, and N which would result in the incorrect values for the AOI. I’m not sure how this would happen as it appears we have the same settings for the Ray Database Viewer. Here’s what I would suggest:
For your reference, I am attaching the output I saw with the macro. Let me know if you still have trouble getting this to run after running through the steps I sent. In that case, maybe we can set up a screenshare so I can see what’s going on.
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.