Light travel distance and travel time.

  • 2 March 2021
  • 4 replies
  • 141 views

Hi Zemax


Thanks for your help every time.


I am using non-sequential mode.


I would like to know the travel distance and travel time until the ray generated at the source point reaches the detector.


Can zemax know this information?


 


Thanks


Suhwan Kim


4 replies

Userlevel 5
Badge +2

Hi Suhwan,


Thanks for your question here!


Yes, it is possible to read the path of the rays from the ZRD files, and then to calculate the time-of-flight data using the speed of light. This knowledgebase article discusses in detail how to create a User Analysis using the ZOS-API to measure the time-of-flight of a LIDAR system:


How to create a Time-Of-Flight User Analysis using ZOS-API · MyZemax


If you have further questions, please do not hesitate to ask!


Best,


Csilla

Hi Csilla


Thanks for your answer.


But I have a few questions.


1. Ray Database Viewer shows the segment lengths of all Rays. But I want to know only the Rays that have been detected. Is it possible? Should I code in c language?


2. Can I know the sum of the Segment Path Lengths for each Ray, not the Segment Path Length?


Thanks,


Suhwan


 


 

Userlevel 5
Badge +2

Hi Suhwan,


Thanks for your follow up questions!


Regarding your first questions about selecting the rays only that have reached the detector, you can use filter strings for this selection. For example, you can use the filter string Hn to select the rays which hit the detector:



You may read more about the filter strings in the Help system at:


The Setup Tab > Editors Group (Setup Tab) > Non-sequential Component Editor > Non-sequential Overview > The Filter String


 


 


Regarding your second question, you will need to sum up the path length for all the segments in case of each ray. You may automate this process via the ZOS-API.


The following knowledgebase article and webinar will help you get started with processing the data from the ZRD files: 


Batch Processing of Ray Trace Data using ZOS-API in MATLAB or Python · MyZemax


Accessing the Ray Database with the ZOS-API using MATLAB - webinar · MyZemax


Best,


Csilla

Hi Csilla


Thanks for your answer.


Can I optimize the path length as short as possible by changing the lens surface treatment (smooth surface, rough surface) or reflector?


Thanks,


Suhwan

Reply