Solved

# Getting complex electric field.

• 5 replies
• 101 views

• Single Emitter
• 2 replies

Hello,

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.

icon

Best answer by Jeff.Wilde 6 January 2023, 21:40

View original

### 5 replies

Userlevel 6
+3

@Arturo.M.J.:

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).

Regards,

Jeff

Hello Jeff,

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.

Userlevel 6
+3

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).

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.

Userlevel 6
+3

Hey Arturo,

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.