Question

Zernike Coefficients for Zemax and Shack-Hartmann Relationship

  • 12 January 2024
  • 1 reply
  • 199 views

Hello everyone,

I'm a new user of Zemax OpticStudio, and my current focus is on simulating Zernike coefficients to characterize mirrors, specifically focusing on the spherical aberration coefficient Z11. Currently, I'm in the calibration phase, working to establish the correlation between the Zernikes measured with my Shack-Hartmann (SH) sensor and those obtained through simulations in Zemax.

In our lab, we are using a Shack-Hartmann Wavefront sensor with 127 microlenses arranged in a hexagonal shape. The mirror under test is a known spherical mirror with a 2-inch diameter and a focal length of 1000 mm. The SH sensor specifications include a pixel size (Deltax=Deltay) of 9.9 um, lenslet focal length of 18 mm, lenslet diameter (pitch) of 300 um, clear aperture of 3.9 mm, and a CCD camera with dimensions 640x480 px, operating at 633 nm.

Initially, I simulated a basic setup in Zemax with a collimated laser, circular aperture of 50 mm @ 633 nm, reflecting off the mirror and returning to the Shack-Hartmann sensor at a distance of 22.5 cm. Following the guidance from the "Zernike Standard Coefficients" in the Help Panel, I activated ray aiming and set System Explorer>Advanced>Reference OPD to "Absolute 2." However, the resulting Z11 (Spherical Aberration) was 0.0046, significantly lower than the measured value of 0.0377 in the lab.

Upon further investigation, I noted the difference in notation between Zemax's Noll notation and the normalization constant of 1 used in my SH WFS. Although I adjusted for this by multiplying 0.0377 by sqrt(5), resulting in 0.0843, there is still an order of magnitude difference between the Zernikes obtained in the SH setup and those simulated in Zemax.

 

 

In an attempt to address this, I followed the guidelines provided in the article (https://support.zemax.com/hc/en-us/articles/4406838460819-Modelling-of-a-Shack-Hartmann-Sensor-for-eye-aberration-evaluation) for modeling a Shack-Hartmann Sensor. Additionally, I incorporated the "us_array_hex.dll" file provided by Michael Cheng in this forum. Despite my efforts to tailor it to my SH WFS (13x13 lenslets arranged as rectangular despite the actual arrengement being an hexagonal shape), the calculated Z11 was -755, indicating an error, as I am testing a spherical mirror, and the spherical aberration coefficient should be low.

I am attaching the file I worked on (excluding the SH) with only the laser source, mirror, and the image plane at 22.5 cm from the mirror, where I checked the Zernike values of my wavefront.

I understand there may be mistakes in my approach, as I am still in the early stages of learning Zemax. My ultimate goal is to establish a reliable relationship between my SH setup and Zemax simulations to predict aberrations in different mirrors we test.

Thank you in advance for your assistance.

Sara


1 reply

Userlevel 7
Badge +3

Hi Sara,

Thank you for the link to Pascale Parrein’s KB article. I hadn’t read it before and it’s very good.

You didn’t attach the file, so I can only suggest how I would go about debugging this. My assumptions would be that the normal OpticStudio calculation of wavefront and Zernike decomposition are ‘correct’, and so the problem is in how your model of the Shack-Hartmann works.

Although you can do this in sequential mode, I’d create a non-sequential file that contains a source ellipse producing collimated rays, a Zernike surface object, a Hexagonal Lenslet Array and a Detector Rectangle with a large pixel count. Put a known Zernike coefficient(s) on the Zernike and capture the Detector data for some suitably large number of rays. Then write your analysis code in either ZPL or some other language, and iterate until you find out where the problem lies.

One place I’d look is at the lenslet array sampling. If it’s a 13x13 array, try comparing it with the Zemax calculation at 32x32, which is I think the lowest it goes. You should definitely try to compare like with like, so don’t use 13x13 for the Shack-Hartmann and compare it to 64x64 wavefront calculations. Or at least, be sensitive to the sampling issues.

  • Mark

Reply