cihologramas / pyoptools

Python tools for optical design
GNU General Public License v3.0
136 stars 45 forks source link

Optical path length not correct, does not include index of refraction #149

Open villeneuved opened 11 months ago

villeneuved commented 11 months ago

Ray.optical_path() seems to return the path length without including index of refraction of the material.
Knowledge of the optical path length is important in femtosecond optical systems, where group velocity delay must be calculated.
In the attached JupyterLab example, two rays of different wavelength propagate through some BK7.
(1) The optical path length to the CCD should be 100 mm plus the index through the BK7, yet it is only 15 mm here. When the thickness of the lens is increased, the path length decreases.
(2) The optical path length should be different for the different wavelengths, due to the different index of refraction.

I would guess that the problem is in Ray.optical_path_parent(). ErrorOpticalPath.zip