Skip to content

Importing ray data from another file

Question

"It is possible to save the ray data of a ray trace as a text-file. I wonder, is it possible to load (import) the ray data again? This would be very important for me because I want to manipulate the rays with DOE's (diffractive optical elements). Since there is not such a function in TracePro (don't worry. As I know, no non-nonsequential- ray trace-software can do this) I will do this with my own algorithms. Then it will be necessary to import the manipulated rays again."

Synopsis

Importing ray data from another file

Solution

"The ray data is saved as a binary file, and TracePro does not have any provisions for it to be saved as a text file. However, the Incident Ray Tables within TracePro can be saved and easily manipulated. One suggestion to obtain your results is as follows:
  • insert an object at the location of the DOE
  • trace the rays
  • select Analysis|Incident Ray Table with the surface of the DOE selected
  • Select File|Save As, check the ""Export to Source File format"" checkbox, and save the file.
  • manipulate the ray data to account for the effects of the DOE
  • insert the Source File in the TracePro model
  • perform a Surface Source raytrace (or repeat the steps for additional DOE's)