I have been looking for a way of obtaining the complex electric field of a system. My goal is to use the aberrated wavefront as input for a different system. I understand the Wavefront Map tool gives the wavefront aberration with respect to a reference sphere at the Exit Pupil, but I would like to know if there is a way to get the phase or OPL up to a reference plane of equal diameter as the Exit Pupil without having to do a ray trace and use OPTH iteratively. I was looking at this post about the Hyugens PSF and it seems like the Pupil Function might be what I need. I would appreciate any clarification as well as any guidance on how to obtain it.
Thanks in advance.
Best answer by Jeff.WildeView original
To get the wavefront relative to a plane, can’t you just add a spherical phase to the OPD? OpticStudio gives you the Exit Pupil location relative to the image plane, so that distance would be the radius of curvature for the additional spherical phase (which corresponds to the reference sphere).
Thanks for the reply. Adding a spherical phase to the OPD I believe would be a good approximation if aberrations are small. However, because of the correction term that Zemax adds to the OPD, adding a spherical phase is not always correct. Referring to the equation for OPD provided in the Exit Pupil section of the help PDF (pages 206-208), the OPD with the correction term is equivalent to the difference in OPL from propagating from image to aberrated wavefront and from image to reference sphere of the aberrated rays (OPD = OPL(x,y)_Image-Wavefront - OPL(x,y)_Image-Ref.Sphere). Following the example in the image below, you can see that the aberrated ray does not have the same OPD from wavefront to exit pupil as would an ideal ray corresponding to a spherical phase.
I am interested in an approach that would work well even in the case of large aberrations. Let me know if maybe I have a misconception regarding the way Zemax calculates the OPD or if there is another way of getting OPD without the correction term.
For the case of large aberration, I think the only option is to write a script to trace a set of rays that sample the entrance pupil and calculate the OPD referenced to the exit pupil plane (instead of the exit pupil reference sphere).
As discussed in: https://support.zemax.com/hc/en-us/articles/1500005488381-What-is-a-ray-
So, in this case, OPL_ray would be the optical path length calculated from the source field point to a ray intercept point on the exit pupil plane.
Yes, that is indeed an option. I was just wondering if there was a way to directly extract this data without having to iteratively calculate OPL. Since the complex field is probably used in other calculations, I would think Zemax would have a way of obtaining it. Also, when the exit pupil is virtual (which is often the case), tracing up to it does not cover the entire system and would therefore not yield the right phase, if I’m not mistaken. I believe that is the reason for the correction term. Otherwise, the OPD could be determined always from just the absolute OPD.
Even if the exit pupil is virtual, which is often the case, the exit pupil still defines the only location in image space where the beam is diffraction free. I’m not sure what you mean by the ‘right phase’. Phase is the difference between two quantities, in this case the real wavefront and a reference. The reference can be chosen to be the exit pupil, an ‘Infinite’ reference which assumes the exit pupil is very far away and so that a plane reference can be used, and two ‘Absolute’ references for cases where the exit pupil position cannot be accurately determined.
The exit pupil reference is almost always the correct one for a system forming an image.
As your goal is to use the wavefront as the input to another system outside of OpticStudio, the simplest way is to just save the Zernike coefficients for your file and then enter those coefficients into your new system, at a pupil plane of that system.