Define Zernike polynomials into an elliptic pupil

  • 12 January 2022
  • 5 replies


I am trying to add the Zernike polynomials (i.e add WFE) into my optical sytem provided by a WaveFront Analyzer.

My entrance pupil is elliptic and so on the collimated wave front analyzed.

I know how to implement the zernike polynomials for a circular pupil. I would be interested in if it is possible to define an elliptic pupil and how while transfering the .dat file of the polynomials.

Here in the attached picture the semi-diameter of the pupil is 1.5mm I want to switch it to an elliptic pupil (two axis to be defined).

Many thanks in advance,



Best answer by Mark.Nicholson 14 January 2022, 18:47

View original

5 replies

Userlevel 5
Badge +3

Hi Ben,

This is tricky, and you need to distinguish between two possibilities:

  1. The Zernike Coefficients are orthogonal over a unit circle, and you have an elliptical aperture on top of it
  2. The Zernike coefficients themselves are orthogonal over an ellipse

So I guess it comes down to the definitions of the coefficients in your data file. How are those coefficients defined?

  • Mark

Hi Mark,

Thanks for your answer.

You are true. It is simple to get a circular pupil with the Shack-Hartmann with the diameter equivalent of the higher dimension of the ellipse and then to limit the pupil into Zemax. I will then get the right WFE onto the defined pupil.

But the Wave Front Sensor (WFS) have not always square detectors, and if you need to use the overall  FOV, you will need to get the polynomials onto a rectangle or an ellipse, not to exceed the WFS field.

In that case, you have to be able to inform Zemax off the exact shape of the analyzed pupil to be able to put the right WFE inside the system.


Userlevel 5
Badge +3

Hi again,

Thanks for that. I think the real question though is if the definition of the coefficients has changed. If you construct a circular wavefront with Zernikes and then put an aperture (elliptical or otherwise) on top of it, the wavefront is still correct, but the Zernikes will not be orthogonal over the sub-aperture.

Alternatively, you might have a set of coefficients which is orthogonal over an elliptical aperture, in which case OpticStudio would need to know how these terms are defined in order to reconstruct the wavefront from the coefficients. 

  • Mark

Hi Mark,

I understand what you mean.

your last sentence is the exact wording of the question I am asking. How do you get Zemax to recognise that the polynomials calculated are from an elliptical pupil?


Userlevel 5
Badge +3

Well, my guess is that you are using circular coefficients, so just enter those into the appropriate surface and put an elliptical aperture of the correct size on the surface.

But if the coefficients are defined on the ellipse, you’ll need to write a user-defined surface that uses the same coefficient definition as your elliptical coefficients. So, it still comes down to what the coefficients in your .DAT file represent. If they are standard or fringe coefficients, you’re good. If they are some special definition, you’ll need to write a user-defined surface to handle the new conventions.