Traceable calibration of Shack–Hartmann wavefront sensors employing spherical wavefronts

Abstract. Traceable, highly accurate calibration of wavefront sensors such as Shack–Hartmann sensors is a challenging task and an active field of research. We have developed a measurement system for the traceable calibration of wavefront sensors employing spherical wavefronts and a point light source in combination with a three-axis linear stage. We obtain an absolute calibration of sensor errors, including the reference spot position and wavefront gradient-dependent errors for each microlens individually. We discuss the main error influences and present an initial measurement uncertainty budget for the calibration. The calibration can be performed with an expanded measurement uncertainty (95% coverage interval) of better than 5  μrad for the wavefront gradient deviation.


Introduction
Shack-Hartmann wavefront sensors (SHSs) 1 are widely used in different fields that require accurate wavefront sensing. These fields include ophthalmology, 2 adaptive optics for astronomy, 3 laser beam characterization, 4 and quality control in optics fabrication. To obtain a highly accurate measurement, the wavefront sensors must be calibrated. Sensor errors occur due to residual misalignment between the microlens array (MLA) and the image sensor 5 or imperfections such as aberrations of the MLA. The calibration should include the reference spot position for each microlens, which creates a constant offset error for each measurement and the wavefront-dependent errors of the sensor.
A common approach for calibration uses a collimator to generate a plane reference wavefront. This approach relies heavily on the quality of the employed optics, thus limiting the calibration accuracy. Another approach to obtaining a high-quality spherical reference wavefront is to use a single-mode fiber with a known distance to the sensor. The main problem, in this case, is how to determine the exact absolute distance between the sensor and the fiber tip: an erroneous value of this distance would result in a power error due to the spherical reference wavefront employed. This can be overcome by performing several measurements at different distances between the fiber tip and the sensor and by measuring only the relative movements. [6][7][8] Additional sensor parameters such as the distance between the MLA and the image sensor can be obtained using this approach. However, microlens-specific errors that are dependent on the incident wavefront slope cannot be characterized.
The setup proposed in this paper can be used to measure all these errors with high accuracy. This is possible by additionally shifting the light source perpendicular to the optical axis and by consecutively recording wavefront gradients in the respective measurement positions.

Spot Displacement Error in Shack-Hartman Wavefront Sensors
The SHS measures the incoming wavefront gradient using an MLA. For small angles, the wavefront gradient in the x and y directions is well approximated by the local wavefront tilt angles α ij;x and α ij;y . The indices employed are allocated by separating the wavefront under test into M × N patches of index i ∈ ½1; M, j ∈ ½1; N and assuming an M × N MLA with the lens index m ∈ ½1; M, n ∈ ½1; N. For ease of notation, the direction-indicating index of the angle α ij is employed only when an explicit notation of the considered direction is required, since the underlying theory is completely analog for the x and y directions. The same is true for the spot displacement s ij . An image sensor is placed in the focal plane of the MLA. When the incident wavefront passes through the MLA, each lens produces a spot on the image sensor. The wavefront-dependent focal spot displacement s ij relative to its reference position and its associated microlens and wavefront-dependent deviation ξ ij;mn indicate the wavefront angle α ij over the size of the respective microlens. Figure 1 shows the basic principle of the SHS. The determination of the local wavefront angle α ij as a function of the spot displacement is given in Eq. (1) E Q -T A R G E T ; t e m p : i n t r a l i n k -; e 0 0 1 ; 1 1 6 ; 4 0 2 The shape of the whole wavefront can be reconstructed from the measured spot displacements s ij þ ξ ij;mn using numerical reconstruction algorithms. Commonly these algorithms retrieve the wavefront by least-square fitting. 9 For an ideal SHS with no displacement errors and no microlens aberrations, the reference positions of the focal spots would be on a predefined regular grid. Different errors that can occur during sensor manufacturing lead to a systematic deviation. A nonideal substrate of the microlenses or image sensors can result in uneven spacing between pixels or lenses. Furthermore, a curvature of the substrates or a thickness variation will cause the distance between the image sensor and the lens array L 0 þ ΔL mn to vary, where ΔL mn indicates the distance variation at the respective microlens. Additional errors can occur during the alignment between the image sensor and the MLA; 5 these errors also contribute to ξ ij;mn and ΔL mn .
The image recording and signal evaluation of the focal spot using the image sensor introduce additional errors. These deviations are dependent on the local wavefront gradient and the microlens parameters. Quantization effects caused by the image sensor 10 or variations between pixels in terms of their gain can substantially influence the accuracy of the spot localization and cause a microlens-specific spot displacement deviation. All these errors are represented by ξ ij;mn in Eq. (1).

Setup of the Measurement System
The setup uses a fiber-coupled light source. The fiber tip is mounted on a three-axis linear stage and the wavefront sensor under test. The light source is an LED in combination with a multimode fiber with a core diameter of 200 μm. Alternatively, a laser coupled into a single-mode fiber can be used. Figure 2 shows a schematic drawing of the measurement setup.

Measurement Procedure
For the calibration, the fiber tip is moved stepwise in a plane perpendicular to the optical axis at a fixed radial distance r 1 þ Δr. The step width equals the microlens pitch P 0 . At each step, each spot displacement s ij þ ξ ij;mn on the image sensor is measured and recorded.
Since the step width of the fiber displacement equals the microlens pitch P 0 , the same sections of the wavefront are measured with different microlenses. The curvature (and thus, the local gradient and angle α ij of the incoming spherical wavefront) depends on the distance of the light source to the sensor r 1 þ Δr. Therefore, if the fiber end is shifted at a fixed distance parallel to the orientation of the MLA by increments of the microlens pitch P 0 , the wavefront sections associated with the starting position will be consecutively shifted to each individual microlens. When the measurement is complete, each lens has measured each wavefront section considered.
This results in a linear equation system of ðM × NÞ 2 equations with i ∈ ½1; M, j ∈ ½1; N for each of the M × N wavefront patches and m ∈ ½1; M, and n ∈ ½1; N for each of the M × N microlenses in accordance with Eq. (1). E Q -T A R G E T ; t e m p : i n t r a l i n k -; e 0 0 2 ; 1 1 6 ; 4 1 9 The double index indicates the measurement of the ij'th wavefront patch using the mn'th microlens. Because the same ij'th wavefront section is measured M × N times by the respective microlenses, an overdetermined subsystem of M × N equations for a fixed index set ij results. This procedure is repeated with a different distance r 2 . The distance between r 1 and r 2 equals the movement of the traceably calibrated z axis and is referred to as Δz.

Calibration of the Image Sensor Distance Variations
To determine the unknown distance variations ΔL mn between the microlenses and the image sensor, 2 × M × N measurements of the wavefront using the same mn'th microlens at two different radii r 1 þ Δr and r 2 þ Δr are employed. Thus, each microlens measures two spherical wavefronts with different unknown radii but with a known axial displacement Δz between them.
A spherical wavefront of radius r produces a linear slope s r on the measured spot displacement 6 proportional to the position of the center of the respective microlens (Fig. 3).
The local wavefront angle α ij;x for each lens position is given by Eq. (3) and the according spot displacement by Eq. (4). The index k ∈ ½−M∕2; M∕2 counts the patch difference in the x direction from the central patch E Q -T A R G E T ; t e m p : i n t r a l i n k -; e 0 0 3 ; 1 1 6 ; 1 8 1 E Q -T A R G E T ; t e m p : i n t r a l i n k -; e 0 0 4 ; 1 1 6 ; 1 2 7 From Eqs. (3) and (4), it follows as The value s ij;x þ ξ ij;mn;x in Eq. (5) represents the measured spot displacement for the mn'th microlens that records the ij'th wavefront patch. For an ideal system, the measurement value s ij;x þ ξ ij;mn;x would equal the linear increase k × s r when scanning the wavefront patches in the x or y direction with the mn'th microlens. However, in the real system, the spot displacement is distorted. To reduce the influence of these deviations, the information of all wavefront patches measured with the same microlens is employed to yield an estimates mn of the slope s r . The spot displacement in x direction s ij;x þ ξ ij;mn;x is measured for the two different radii r 1 and r 2 . The measurement of the undisturbed spot displacement s ij;x is affected by the microlens-specific error ξ ij;mn;x ; this error consists of a systematic error due to the shift of the reference spot position Δs mn , which is calibrated in Sec. 2.3, and stochastic errors. As outlined in Sec. 2.1, the M × N wavefront sections are all measured with the same mn'th microlens, which introduces a constant offset error Δs mn . Thus, the linear slope s r of the spot displacement s ij;x associated with a spherical reference wave impinging on an ideal wavefront sensor illustrated in Fig. 3 may be approximated by linear regression of the spot displacement measurements. Since s r is represented by the slope of the fitted line, the constant offset Δs mn does not influence the result and the stochastic errors are reduced via the averaging effect of the approach. The estimate of the slopes mn in the mn'th microlens employing the complete set of the M × N measured ij'th wavefront patches results from the following linear regression: E Q -T A R G E T ; t e m p : i n t r a l i n k -; e 0 0 6 ; 1 1 6 ; 3 1 1 E Q -T A R G E T ; t e m p : i n t r a l i n k -; e 0 0 7 ; 1 1 6 ; 2 4 8s mn;x ¼ E Q -T A R G E T ; t e m p : i n t r a l i n k -; e 0 0 8 ; 1 1 6 ; 1 9 8s mn;y ¼ In Eqs. (6)- (9), s x denotes the mean value of the measured spot displacement ands mn refers to the estimated slope of the spot displacement.  For the two measurements at radius r 1 and r 2 , we obtain E Q -T A R G E T ; t e m p : i n t r a l i n k -; e 0 1 0 ; 1 1 6 ; 7 2 3 P 0 r 1 þ Δr ¼s mn;1 L 0 þ ΔL mn ; E Q -T A R G E T ; t e m p : i n t r a l i n k -; e 0 1 1 ; 1 1 6 ; 6 6 8 P 0 r 2 þ Δr ¼s mn;2 L 0 þ ΔL mn : The distance between r 1 and r 2 can be written as Δz, which is measured using the glass scales of the axis. Thus, Eq. (11) can be written as E Q -T A R G E T ; t e m p : i n t r a l i n k -; e 0 1 2 ; 1 1 6 ; 6 2 2 P 0 r 1 þ Δr þ Δz ¼s mn;2 L 0 þ ΔL mn : Equations (10) and (12) can be solved for the radial distance r 1 þ Δr. This distance is the same for all microlenses, thus enabling averaging over all microlenses to further reduce measurement noise.
E Q -T A R G E T ; t e m p : i n t r a l i n k -; e 0 1 3 ; 1 1 6 ; 5 4 3 Δz ·s mn;2 ðs mn;1 −s mn;2 Þ : This value for the radial distance r 1 þ Δr can be used to determine the distance L 0 þ ΔL mn from Eq. (10) L 0 þ ΔL mn ¼s mn;1 · ðr 1 þ ΔrÞ P 0 : The step size P 0 in Eq. (14) and the distance change Δz in Eq. (13) are applied via the calibrated linear axis and characterized using the uncertainty of the axis. By considering Fig. 1, we can immediately conclude that L 0 þ ΔL mn represents a measure of the sensitivity of the spot displacement to changes in the wavefront gradient. In this step, we assume the pixel pitch from the image sensor to be ideal. An erroneous pixel pitch that is constant in the image sensor region considered for the mn'th microlens would cause a linear error in L 0 þ ΔL mn . However, it would also affect the measurement of the focal spot s ij þ ξ ij;mn in the same way. From Eq. (1), we can observe that these elements cancel each other out and do not affect the measurement of the wavefront angle.
It follows that the determined value L 0 þ ΔL mn also corrects an erroneous pixel pitch, although in this case, it does not represent the real distance between the microlens and the image sensor.

Reference Spot Position Calibration
As described in Sec. 2.1, s ij þ ξ ij;mn of each microlens is measured with the radial distance r 1 þ Δr and the associated local wavefront angle α ij of each wavefront patch. The systematic deviation ΔL mn is identified in advance using the procedure introduced in Sec. 2.1 and included as a compensation value for the values in this section.
Since the undisturbed local wavefront angle a ij and the associated spot displacement s ij depend on the ij'th wavefront patch considered, they do not change if measured with different microlenses.
To determine the constant systematic, microlens-specific spot displacement error Δs mn , the same ij'th wavefront section is measured with each mn'th microlens.
The term s ij þ ξ ij;mn represents the spot displacements measured in the experiment. Using pairwise comparison of the spot displacements measured for the same wavefront section and by averaging the differences, the microlens-specific spot displacement coefficient Δs mn is determined by employing the following equation: The resulting calibration parameter Δs mn describes the systematic spot displacement error of the respective single microlens. After application of Δs mn for the correction of the spot displacement of each of the mn'th microlenses, all microlenses show the same unknown offset deviation from the absolute reference spot position. This unknown offset results in a constant tilt error in the wavefront reconstruction. However, the wavefront form is not affected.
By referencing the microlenses against each other, the calibration of the reference spot position is independent of the quality of the incident wavefront; it is not necessary to measure its form (and thus, the absolute position of the fiber tip on the optical axis defining the radial distance r 1 þ Δr) with high accuracy. In general, for the calibration, the wavefront emitted by the fiber tip must be stable and the relative movement of the axis must be measured accurately. Furthermore, it is assumed that the microlens has been manufactured with an ideal pitch P 0 . An error in the pitch would result in different parts of the wavefront being compared and would therefore create an error in Δs mn that would depend on the incident wavefront shape. Significant errors in the microlens pitch would become apparent through differences in the respective calibration maps when measurements with different wavefront curvatures are conducted. The result of Eq. (15) for the MLA is confirmed when the calculation with the second set of ðM × NÞ 2 measurements is repeated at the r 2 position.
The above steps may be taken to preclude the usage of MLAs with an erroneous microlens pitch. A feasible result for Δs mn may also be obtained employing only a subset of the M × N microlenses for comparison.
This setup can also be used to retrieve the wavefront angles α ij of the incident wavefront. As shown in Eq. (1), the measured spot displacement s ij þ ξ ij;mn is dependent on the two variables α ij and L 0 þ ΔL mn . The constant systematic spot displacement error Δs mn and the distance variation ΔL mn are determined above. To obtain the wavefront gradient, we average all measurements associated with the respective ij'th wavefront section, taking the correction values Δs mn and ΔL mn into account E Q -T A R G E T ; t e m p : i n t r a l i n k -; e 0 1 6 ; 1 1 6 ; 3 7 8 By averaging over all microlenses, stochastic errors in ξ ij;mn can be substantially reduced.
As with the calibration of the reference spot position, only the relative tilt and form of the wavefront can be reconstructed.
The light source for this setup can be easily replaced. This enables us to analyze the effects of different wavelengths and the degree of coherence of the light source on the measurement. We have published some of these effects in Ref. 11 using a different calibration setup.
The traceability chain is shown in Fig. 4. The method relies on the axes being correctly positioned to ensure that the microlenses are illuminated with the identical wavefront section.
A displacement-measuring interferometer is used to validate the linear scales of the axes. The tilt errors of the axes are obtained via measurements with an autocollimator. The wavefront measurement is self-referencing because the wavefront is measured during the calibration as outlined in Eq. (15) and only the differences between the lenses affect the results. The laboratory Fig. 4 Traceability chain for wavefront sensor calibration. temperature influences the measurement in different ways. The sensor characteristics (Δs mn and ΔL mn ) are particularly temperature dependent due to thermal expansion and must therefore be measured as well.

Measurement Results
In this section, we present the measurement results of a Shack-Hartmann sensor obtained with the setup described above. As a light source, we used a green LED (λ ¼ 530 nm). The z distance between the sensor and the light source is varied between r 1 ¼ 1.77 m and r 2 ¼ 1.83 m. Figure 5 shows the effect of the systematic spot displacement error Δs mn on the local wavefront angle measurement as given in Eq. (1), Δα mn ¼ tan½Δs mn ∕ðL 0 þ L mn Þ, for each microlens.
Furthermore, we obtained the image sensor distance variation L 0 þ ΔL mn . This is shown in Fig. 6 for each microlens. The microlens-to-image-sensor distance of this sensor is on a low scale and ranges between 17.7 and 17.74 mm with a standard deviation of 6.3 μm.
Our setup measures the same part of a wavefront with different lenses. After the correction of the systematic sensor errors using the results above, the difference between the measurements of the same wavefront part should be minimized. This can be used to verify our calibration system. These results are shown in Fig. 7.
The color bar gives the rms deviation between the lenses for the spot displacement measurement. The mean value of this error is about 3.7 μrad. Without the correction of the reference spot position, the mean rms value is at 20.1 μrad, which shows the capability of our calibration.
The accuracy is limited by the sensor noise of the image sensor. Additional errors are generated by our calibration setup, including positioning errors of the axes and errors due to the stability of the laboratory environment. Another error is due to the pixelization effect of the image sensor, which influences the spot measurement; this creates a dependency of the wavefront measured on the position of the focal spot on a pixel (see Ref. 10).
These pixelization effects become apparent by comparing the wavefront measured through all microlenses with the measurement of a single microlens. In this way, we obtain detailed information on the tilt error as a function of the incoming wavefront gradient. Figure 8 shows the corresponding data for a single microlens. To enhance the visibility of the systematic parts, the noise is reduced by smoothing the data with a low-pass filter.
The x and y directions denote the incoming wavefront gradient and the color bar shows the measurement error for this microlens. The error has a periodic structure equal to the periodicity of the image sensor pixels. A shift of one pixel on the sensor equals a wavefront gradient of 0.72 mrad. This effect is caused by pixel effects of the sensor. This systematic error is about 10-μrad peak-to-valley (PV) and therefore on a low scale.
Additionally, we obtain the gradient of the incident wavefront. Since we used a point-light source for illumination, the wavefront has a good spherical shape, which results in a linear slope in the map of the wavefront gradient. Figures 9(a) and 9(b) show the measured wavefront gradient. In Figs. 9(c) and 9(d), a best-fit plane is subtracted to show the nonspherical part of the wavefront.
The remaining differences from an ideal sphere have a low PV value in the range of 1 μrad and are again caused by the pixelization effects of the sensor.

Uncertainty Analysis
The measurement uncertainty u α is influenced by various properties of the system and the specific sensor. Overall, we determine the wavefront angle error Δα mn with an expanded uncertainty U α ¼ 4.2 μrad (k ¼ 2). For the uncertainty of the calibration, the main input quantity is the exact determination of the position of the light source. The positioning accuracy depends on the axis used. We estimated the positioning accuracy to be 2.9 μm. This general positioning error consists of the positioning errors of the single axis and errors due to a constant tilt between the axes and due to movement-dependent tilt effects. At a distance of about 1.7 m between the sensor and the light source, this general positioning error contributes a standard uncertainty of ∼1.7 μrad to u α .  Further input quantities include the adjustment of the setup, the temperature stability of the setup and random errors due to noise on the image sensor vibrations and air turbulence.
The repeatability of the calibration is determined by comparing several measurements of the same wavefront sensor, which leads to a standard deviation of 0.3 μrad. This is employed as an estimate of the standard uncertainty. The repeatability includes the random errors caused by electric, thermal, pixel-related, and mechanical noise. These random deviations are estimated from the results shown in Fig. 7 and yield a standard deviation for a single measurement in the interval of ½3; 5 μrad for the respective microlenses. Their impact is significantly reduced via averaging over the 2601 wavefront patches, which results in a standard deviation of the mean value below 0.1 μrad.
The alignment between the three-movement axes and the sensor axes also contributes to the measurement uncertainty. The standard uncertainty of the adjustment errors is estimated to be 0.5 μrad.
Temperature effects are analyzed using a cooled wavefront sensor with varying temperatures. The temperature variations during the measurement are 0.2 K; the resulting contribution to the uncertainty is below 1 μrad determined by comparison measurements at different temperatures. Table 1 lists these input quantities together with the corresponding uncertainties. Errors due to the tilt of the fiber tip during measurement of the wavefront are neglectable due to the low deviation of the wavefront from an ideal sphere and the accuracy of the axes.  Optical Engineering 084104-9 August 2020 • Vol. 59 (8) This uncertainty can be further improved by improving the measurement of the light source position or by increasing the distance between the sensor and the light source. However, this is limited by the increased sensor noise caused by the reduced light intensity.

Conclusion and Discussion
In this paper, we present a setup for a highly accurate, traceable characterization of SHS using spherical wavefronts and linear stages. This calibration setup allows measurements of the microlens-specific reference spot position deviation Δs mn , the microlens-specific distance variation to the image sensor ΔL mn , and further wavefront-dependent effects ξ ij;mn .
An SHS was calibrated using this setup with an expanded uncertainty of U α ¼ 4.2 μrad (k ¼ 2) for the angular reference spot position deviation Δα mn of each microlens. The main input quantities for this uncertainty budget are taken from the positioning of the light source. The setup could potentially be further enhanced by better measurement of the light source position. The setup presented could easily be expanded to include other wavefront sensors such as shearing-based sensors.