Multi-layer Shack-Hartmann wavefront sensing in the point source regime.

The Shack-Hartmann wavefront sensor (SHWS) is often operated under the assumption that the sensed light can be described by a single wavefront. In biological tissues and other multi-layered samples, secondary wavefronts from axially and/or transversely displaced regions can lead to artifactual aberrations. Here, we evaluate these artifactual aberrations in a simulated ophthalmic SHWS by modeling the beacons that would be generated by a two-layer retina in human and mouse eyes. Then, we propose formulae for calculating a minimum SHWS centroid integration area to mitigate these aberrations by an order of magnitude, potentially benefiting SHWS-based metrology and adaptive optics systems such as those used for retinal imaging and microscopy.


Introduction
The Shack-Hartmann wavefront sensor (SHWS) [1][2][3] is widely used in metrology [4], astronomy [5][6][7], microscopy [8][9][10], line-of-sight communications [11], refractive surgery [12][13][14][15][16], vision science [17][18][19][20][21][22] and retinal imaging [23][24][25][26] among other applications. This device operates by sampling a wavefront using an array of lenslets with a pixelated detector at its geometric focus [27]. This sensor operates by sampling an incoming wavefront or superposition of wavefronts using an array of lenslets in front of a pixelated sensor. The light reaching the wavefront sensor originates from an area or volume to which here we refer to as a beacon. When the beacon is so small that all wavefronts arriving to the lenslet array are identical, it is said that the SHWS is operating in the point source regime. In this regime, when the intensity of the wavefront W is approximately uniform over each lenslet [28], the centroid displacement ρ of the lenslet image at the pixelated sensor from its nominal position, is given by [29], where r is the position vector on the SHWS pixelated sensor, f l is the lenslet focal length, and the integrals are performed over the entire lenslet area. In multiple applications, including adaptive optics retinal imaging [23], microscopy [30], and ground-based astronomical adaptive optics [31], a beacon is generated by illuminating an object and measuring the wavefront generated by the backscattered or fluorescent light. If the backscattering or fluorescence originates from multiple layers [32][33][34][35][36][37], then each layer's beacon generates its own SHWS spot pattern, as depicted in the two-layer model shown in Fig. 1. When the chief ray of the beacon illumination coincides with the optical axis of the SHWS, these spot patterns are radially shifted with respect to one another due to the different distances between the layers and the SHWS (see Fig. 1). When the illumination beam is shifted or tilted, however, the radial shift between spot patterns is now relative to a point away from the pupil center (see black crosshairs in Fig. 1). A thick layer could be thought of as a continuum of thin adjacent layers, each of which generates its own set of SHWS spots, giving the appearance of elongated spot, such as those seen in ground-based astronomical adaptive optics laser guide stars [7,31,38]. Geometrical optics depiction of SHWS lenslet images due to a dual layer beacon with on-and off-axis beacon illumination. The red and green SHWS lenslet images correspond to layers 1 and 2, respectively, and the black crosshairs to the lenslet where the beacon image shift is minimal.
If unaccounted for, the presence of multiple SHWS spot patterns can result in artifactual aberrations. In this work, we seek to evaluate the magnitude of these artifactual aberrations and demonstrate their mitigation through the use of a proposed minimum centroid integration area. We first consider how SHWS lenslet images are shifted by the presence of secondary beacons that only differ from a primary beacon in defocus and/or tilt. This scenario can be thought of as an extension of the concept of point source regime [5]. If aberrations other than defocus and tilt change across beacons, spatial filtering or coherence gating to reject light from undesired beacons should be considered [39][40][41][42][43]. Next, we posit formulae for determining the minimum centroid integration area (search box) that captures the central lobe of all beacons. This is followed by a description of the methods used to calculate realistic SHWS spot patterns, accounting for diffraction and defocus in both the illumination and imaging beams, as well as the low Fresnel number of most SHWS lenslets [27]. Finally, the artifactual aberrations are calculated using the traditional and proposed search box sizes in SHWS dual spot patterns in optical systems with 0.24 and 0.53 numerical apertures (representative of the human and mouse eyes, respectively). The simulations include four commonly used beacon pupil illumination profiles: full circular, annular [44,45], small circular on-axis, and small circular off-axis [46].

Multi-beacon Lenslet image centroid
Let us start by assuming a SHWS that sees light from multiple incoherent beacons, each of which creates a uniform intensity profile I i across a lenslet of area A l [28]. The lenslet image centroid ρ is, by definition, the intensity-weighted sum of the centroids of the individual beacon images ρ i , which using Eq. (1) yields where i and j denote beacon indices. If we now define the differences between each wavefront and that of the first beacon, that is, ∆W i (r) = W i (r) − W 1 (r), we have that, which can be interpreted as the first beacon image centroid being biased by the other beacons. When the wavefront differences are pure defocus [47,48], this expression reduces to, where r l is the lenslet position vector assuming that the center of coordinates is at the SHWS pupil center, and D 1,i is the focus difference between the first and i th beacons in units of diopters at the lenslet plane. The dependence on r l means that the centroid bias is zero for a lenslet at the pupil center, increasing linearly with distance from the pupil center, which corresponds to pure defocus bias (see Fig. 1, left). The form of this bias term indicates that if the distance between the beacons and their relative intensities remain constant, then the defocus bias term will also remain constant, and thus can be calibrated out. When using off-axis beacon illumination [46,49], lenslet images are laterally shifted, with Eq. (4) becoming where, T 1,i is the tilt difference vector at the lenslet plane between the first and the i th beacon in units of radians. Because tilt shifts all the centroids equally, the SHWS images will appear radially shifted away from an off-center pupil location, as depicted in the right panel of Fig. 1.

Centroid search box size determination
Diffraction at the lenslet aperture dictates that SHWS lenslet images have infinite extent, and thus the estimation of the centroid of a SHWS lenslet image should require an infinitely large area on the pixelated sensor. In practice, however, centroids are estimated using pixels within regions of interest referred to as search boxes, ignoring the crosstalk due to the overlap of these infinitely large light distributions from other lenslets. In the interest of simplicity, this crosstalk is assumed negligible here, which is equivalent to assuming infinitely large Fresnel numbers. SHWS centroiding algorithms are usually iterative [19,33,40,[50][51][52][53][54][55][56][57], recentering the search box on the previous iteration centroid estimate, while also shrinking it, aiming to only use the pixels with higher intensities in the final iteration. In the presence of a single beacon, the truncation of the centroid integration area due to finite search boxes (truncation) does not introduce substantial error, provided the search box center is close to the actual centroid and it is comparable to or larger than the central lobe of the lenslet image. In the presence of multiple beacons, however, excessively small search boxes can result in non-negligible errors due to asymmetric beacon image truncation [58,59]. When the beacon wavefront differences are dominated by defocus, the truncation of the multi-beacon image results in radially symmetric artifactual aberrations, such as defocus, primary, secondary and higher order spherical aberrations [58,59]. When the wavefront differences also contain tilt, excessive search box shrinking will also result in non-radially symmetric artifactual aberrations, such as coma.
Here, we suggest a minimum search box size for iterative SHWS centroid algorithms that fully contains the central lobes of all beacon images [59,60], assuming that previous iterations centered the search box on the approximate image centroid. For simplicity, we discuss next the two-beacon case, but the reasoning can be extended to more beacons. If two beacon images at the SHWS pixelated sensor have radii R 1 and R 2 and their center separation is given by the vector d 1,2 (see Fig. 2), then the proposed search box width w SB,x and height w SB,y are and w SB,y = 2 (d 1,2 .ŷ + max{R 1 , R 2 }) where x and ŷ denote unit vectors along the x-and y-axis. These dimensions assume the worst-case scenario in which the relative intensity of one of the beacons is much greater than that of the other, and that one or more iterations have centered the search box close to the multi-beacon centroid. This condition could be relaxed, and therefore a smaller search box could be used, if knowledge of the relative intensity of the beacons is available. If the beacons size and intensity are identical, then the search box dimensions can be half of those in Eqs. (6) and (7) (minimal value).
If the only differences between beacon wavefronts are defocus and tilt, then the vector d 1,2 , which varies across lenslets, can be calculated as [61], where, as stated in the previous section, D 1,2 is the beacon focus difference in diopters (difference of the inverse wavefront radius of curvature), and T 1,2 is the tilt vector difference between the wavefront beacons in radians, both at the lenslet array. D 1,2 and T 1,2 can be calculated from their entrance pupil values by accounting for the refractive index of the object space n and the SHWS pupil magnification M (ratio of exit to entrance pupil diameters) [62]. The intensity of the beacon lenslet image I i (x, y) generated by illuminating a plane perpendicular to the optical axis of the SHWS with uniform scattering or fluorescent properties as depicted in Fig. 3 with a point source, and assuming that the imaging process is linear in intensity (temporal incoherence), is given by, with h illum and h i being the illumination and i th lenslet amplitude point spread functions (PSFs) respectively, and ⊗ represents convolution. We can coarsely approximate the convolution as an addition of the full-width at half maximum of the lenslet (assumed square) diffraction pattern central lobe and the beacon radius generated by a near-focus Gaussian beam with numerical aperture NA. The Gaussian modeling is adequate for modeling the fundamental spatial modes of many lasers and light sources delivered through single-mode optical fibers, which are commonly used as beacon illumination source. With these assumptions, the radius of the beacon image R i at the SHWS pixelated detector is (see Appendix A) where w l is the SHWS lenslet width, f o is the focal length of the optics focusing light onto the sample with numerical aperture NA, z is the beacon plane distance to the illumination focus, λ is the illumination wavelength and the factor 3.54 arises from the use of the 1/e 2 half width Gaussian beam propagation formula. For uniform (top-hat) illumination profiles and away from the focus, the above expression can be approximated using geometrical optics as Fig. 3. Shack-Hartmann wavefront sensor schematic with a beacon generated using a point source that illuminates a backscattering or fluorescent plane, where P denotes pupil conjugate planes. The beacon illumination can be spatially modulated using pupil masks at the pupil plane with binary transmission.

Point spread function diffraction calculation
The point-spread-functions in Eq. (9) were numerically evaluated using the diffraction theory presented next assuming aberration-free optics. The beacon illumination was modeled as a converging spherical monochromatic wave normally incident on a pupil mask with either circular or annular binary transmission. The emerging electric field of wavelength λ and amplitude A at the pupil had an outer circular radius a and converged towards a point at a distance f along a line perpendicular to the aperture plane and passing through its center, as shown in Fig. 4. The complex electric field U N near the focus can be calculated in polar coordinates using Li's approximation [63,64], which is similar to the Fresnel approximation of the Huygens-Fresnel principle but also accounting for the focal shift seen in most SHWS lenslet arrays due to their low Fresnel number (a 2 /λf ) [27], where and it is assumed that The PSF calculation of the i th square lenslet with center coordinates (ξ 0 , η 0 ) was performed assuming a spherical monochromatic wave emerging from the beacon plane with low Fresnel number. In this way, the amplitude of the electric field at the SHWS pixelated sensor, in Cartesian coordinates for convenience, was calculated as, (15) where, P D is the optical power of the spherical wave at the lenslet in units of diopters and 1/f = 1/f l + P D . Here, P(ξ, η) is a circular binary pupil function of radius R accounting for the partial illumination of lenslets at the SHWS pupil edge, To account for the longitudinal magnification from the beacon to the lenslet image, the value of z to be used in the calculation of the imaging PSF is evaluated in terms of the axial separation z illum between the beacon and the illumination focus as (see Eq. (5.28) in [62]), where, f e is the focal length of the eye. The diffraction integrals in Eq. (12) and Eq. (15) were numerically evaluated using MATLAB's (Mathworks, Natick, Massachusetts, USA) integral2 function with default tolerances, taking advantage of circular symmetry when possible. The corresponding intensities, calculated as the modulus square of the complex electric field amplitudes, were convolved as given by Eq. (9). Calculation times for each SHWS lenslet on an i7 (Intel Corporation, Santa Clara, California, USA) 4-GHz CPU varied between 20 and 70 minutes, for the respective human and mouse dual retinal layer models described below.

Dual layer model
The physical parameters chosen for the two simulations presented below are motivated by the ophthalmic SHWS, which is widely used in adaptive optics instruments for retinal imaging and vision science. Cross-sectional imaging of the living mammalian retina using optical coherence tomography suggests that the human and mouse retina can be coarsely modeled as two scattering layers (see Fig. 5) approximately 250 [65,66] and 200 µm [67,68] apart, respectively. This imaging modality suggests that the ratio of backscattering intensity from these layers could span over two orders of magnitude, although this only considers light emerging from the eye with the same polarization as the incident light [69][70][71][72]. These two retinal layers were modeled as embedded in a medium with ∼1.33 refractive index (the vitreous) [73], and seen by the SHWS through the optics of the eye with 8 mm pupil diameter and 16.7 mm back focal length [73] for the human eye, and 2 mm and 1.9 mm for the mouse eye. For the human eye, a 0.7 pupil magnification [26] and a lenslet array with 200 µm pitch and 7.8 mm geometrical focal length was assumed. For the mouse eye a lenslet array with 300 µm pitch and 4 mm focal length was assumed, with 2.8 pupil magnification to account for the smaller pupil of the mouse eye. The illumination and imaging wavelengths were assumed to be 850 nm and delivered to the retina through one of the following binary transmission pupil masks: full diameter circular; annulus with 100% outer diameter and 50% inner diameter; circular on-axis with 50% pupil diameter; and circular with 25% pupil diameter shifted towards the pupil edge. It is important to note that the relative intensity of the layers used here, namely 1:1 and 10:1, will only affect the magnitude of the artifactual aberrations, and not the size of the search boxes proposed in Eqs. (6) and (7).

Numerical calculations
The electric field distribution of the beacon illumination was calculated using Eq. (12) over a square region 100 Airy disk diameters (ADDs) in width, to capture more than 99.9% of the energy passing through the transmission masks and with 10 samples per ADD. The beacon illumination for each pupil mask was calculated for the foci shown in Fig. 6 between -375 to 375 µm range in 125 µm steps for the simulated human eye and between -300 and 300 µm range in 100 µm steps for mouse eye. The resulting intensity (|U N | 2 ) patterns show that the beacon size changes dramatically with focus (Fig. 7), and that the decentered circular pupil shows a transverse shift δx given by, where δξ is the transverse decenter of the circular mask relative to the SHWS's (and eye's) optical axis. These beacon profiles also show that other than at the focus, the patterns could be reasonably approximated using geometrical optics as uniformly illuminated circles or annuli. Thus, the more complex diffraction calculations described above could be simplified given that these patterns will be blurred by the convolution with the lenslet point-spread function. The point spread function of each lenslet was calculated using Eq. (15), making sure that the sampling matched that of the beacon illumination while also considering the lateral magnification factor from the beacon onto the lenslet image. This was achieved using Matlab's spline interpolation to match the sampling required for calculating the convolution (see Eq. (9)) while keeping intensity errors below 0.003% of the maximum intensity value.
Four tests were performed to validate the numerical calculations. First, the calculated intensity at the geometrical focal plane of a circular pupil was compared against the analytically derived intensity, which is the Airy disk. A maximum error <10 −13 of the peak intensity was obtained for an area centered on the propagation axis and 2 ADDs across. Next, cross-sections of the field across a plane containing the propagation axis with various Fresnel numbers (f = 6.5 mm, a = 101.5 µm and λ = 0.16 -3.17 µm) were calculated [27], and the axial positions of the peak intensities relative to the geometrical focus (focal shift) were compared against the approximate formulae by Li [74] and Sheppard and Török [75]. The results, shown in Fig. 8(a) agree over the range in which these approximations are considered valid. Thirdly, the numerically evaluated intensity along the axis of a circular aperture with a large Fresnel number approximation is within 10 −10 of the theoretical predictions (Eq. (26) of Section 8.8 in Ref. [76]). Finally, a comparison of the Gaussian beam approximation from Eq. (10), assuming a lenslet image due to a single defocused layer and the width of the same lenslet image obtained from exact numerical evaluation of Eq. (9), is shown in Fig. 8(b), showing agreement to within ∼8% for the human eye (Gaussian model) and ∼14% for the mouse eye (geometrical optics model).

Centroiding algorithm
After performing the convolution in Eq. (9) each simulated SHWS lenslet image had more than 600 and 2000 samples across each lenslet for the human and mouse retinas, respectively. The centroid of each lenslet image was then estimated using an iterative centroid algorithm, in which the first search boxes matched the projection of the square lenslet onto the pixelated sensor. The search boxes in subsequent iterations were re-centered on the centroid estimated in the previous iteration and shrunk by the factor (w f /w 0 ) 1/(n−1) , where n is the number of iterations, which for this study we chose as 10, and w 0 and w f are the initial and final search box widths, respectively. The algorithm allows the search box to move beyond the boundaries of the initial search box, where the images were also calculated. The only unrealistic aspect of this approach is that each lenslet intensity pattern at the SHWS pixelated sensor assumes the absence of lenslet crosstalk.

Lenslet images
Simulated lenslet images for circular pupil illumination with 1:1 intensity beacon ratio are shown in Fig. 9 and Fig. 10 for the simulated human and mouse retinas, respectively. In these figures, the defocused beacon images are substantially broader than the lenslet diffraction pattern central lobe, indicating that irrespective of the presence of a secondary beacon, the search box size should be increased with beacon defocus to fully capture the lenslet image. Fig. 9. SHWS lenslet images at the pupil positions shown in the top row diagrams, calculated for a human eye using a full circular illumination pupil at five foci, assuming beacon light originating from the red and green planes with equal amplitude. The images show normalized intensity using the logarithmic scale indicated by the color bar. The black solid line squares represent the lenslet outline projected onto the pixelated sensor, while the dashed-line rectangles show the search boxes used in the final centroiding iteration with sizes matching the lenslet central diffraction lobe (white dashed lines) and that provided by Eqs. (6) and (7) (green). The estimated centroids are indicated with green 'x' and white '+' markers, and the number below each panel is the difference between centroids estimated with the two marked search boxes, in units of the lenslet diffraction pattern first minimum-to-minimum lobe distance. These figures also show that images of the secondary beacons can reach the edge of the lenslet outline, suggesting that iterative centroiding algorithms must allow the search box to translate beyond the lenslet boundary. Additional figures (Figs. 14-19) with 1:1 beacon ratio for the other simulated pupil illumination profiles in Appendix B, provide further qualitative confirmation that the proposed minimum centroid final search box size formulae are adequate.
All SHWS lenslet image figures show that for rotationally symmetric pupil illumination, centroid errors are approximately proportional to the lenslet distance to the pupil center, indicating that the dominant artifactual aberration across all foci is defocus.
For small off-axis illumination, however, the centroid error varies nonlinearly across the pupil, suggesting the presence of tilt, defocus, and coma. The centroid error along the middle panel row (focus in layer C) for rotationally symmetric illumination are negligible or zero because both beacons are equally defocused and have identical intensity. This results in equal and opposite beacon displacement which cancels the centroid bias even if the search boxes do not completely capture the central lobe of either beacon.

Artifactual focus error
Artifactual focus error, defined here as the difference between the defocus in the single-and dual-layer model retinas, was calculated using a linear fitting of the centroid displacements as a function of the lenslet radial coordinate, and dividing the slope by that generated by a diopter of defocus at the entrance pupil plane. As mentioned above, this showed that the major artifactual aberration due to the secondary beacon is defocus, which is plotted in Fig. 11 as a function of SHWS focus for all pupil masks. These plots show that when using the SHWS to aid the focusing of an instrument, as it is commonly done in adaptive optics ophthalmoscopes, the estimation of axial separation between two planes in an image stack or two features will be affected in a manner that is dependent on the beacon axial separation and intensity ratio.  (7) are shown for the human and mouse eyes with four different beacon illumination strategies and two different anterior to posterior reflectivity ratios. Each curve in the plots represents an illumination focus (from A-E, see Fig. 6). The shaded area (green) in these plots indicates the centroid repeatability (∼0.01 pixels) of our custom SHWSs using scientific-grade CCD cameras.
Large search boxes result in flatter curves that correspond to a focus offset which depends on the beacon intensity ratio, as predicted by Eq. (5). Therefore, when the SHWS is used to adjust focus, axial distances will be correctly estimated.

Artifactual primary spherical aberration and coma
The first derivative of primary defocus is tilt, and therefore defocus-subtracted centroid displacements were obtained by subtracting the linear component of the spot displacement as a function of radial lenslet coordinate. The subtraction of defocus reveals the residual artifactual wavefront slopes shown in Fig. 12, where the green shaded areas indicate the centroid repeatability in our SHWS (∼0.01 pix). The use of smaller final search boxes in the centroiding algorithm in the rotationally symmetric pupil masks results in approximately anti-symmetric third order polynomials, which indicates that the dominant residual artifactual aberration is primary spherical aberration (which has a third order derivative). For the off-axis pupil illumination, the smaller search boxes result in curves that can be approximated as a second order polynomial, which corresponds to artifactual coma. In all simulated conditions, the artifactual spherical aberration and coma are greatly mitigated using the proposed search boxes.
The plots in Fig. 12 were fitted with the curves that would be generated by spherical aberration and coma, to estimate their amplitude [29], which are plotted in Fig. 13, where the shaded region represents a wavefront RMS greater than the Marechal's criterion for diffraction-limited imaging (i.e., ≤ /14, with = 850 nm). Again, these plots show that for both the human and mouse simulated retinas, the proposed larger centroid search box is beneficial. Here it is important to note that when this appears not to be the case (i.e., red solid dots below green squares) the aberration amplitude is most likely below the repeatability and/or sensitivity of any SHWS built to date, and most certainly of ours, as the plots in Fig. 12 show. In the human eye plots, the artifactual aberration due to the use of the smaller search boxes are always close to or below the diffraction limit. This might suggest that using the smaller search boxes is acceptable, but it should be kept in mind that in real SHWSs there will be numerous other sources of errors that will compound with these artifactual aberrations, including those caused by photon noise, readout noise, pixelation, finite bit-depth, non-uniform sensitivity across the pixelated sensor and lenslet crosstalk. Therefore, we suggest that larger search boxes should be used. In the mouse eye plots, we can see that the smaller search boxes can introduce artifactual aberrations with amplitudes well above the diffraction limit for the rotationally symmetric pupil masks, and that the use of larger search boxes is desirable.

Summary
The presence of secondary wavefronts from axially and/or transversely displaced beacons can lead to artifactual aberrations in SHWS measurements. Here we proposed formulae to estimate a minimum centroid search box to mitigate these artifactual aberrations. Numerical simulation of two dual layer beacon scenarios relevant to ophthalmic wavefront sensing show that the secondary wavefronts can introduce defocus, spherical aberration and coma that vary with the relative intensity of the beacons. The proposed approach is, that is the calculation of a minimal search box size, is independent on the amplitude of the beacons, and therefore, it is broadly applicable, and not just restricted to ophthalmic SHWSs. Interestingly, the simulations show that the lenslet Fresnel number should be chosen not purely based on aberration dynamic range or sensitivity, as it is usually the case [4], but also taking into account the potential crosstalk due to the large size of out-of-focus beacon images.

Appendix A: illumination beacon radius
The 1/e 2 half-width of the illumination beacon ω due to an evolving Gaussian beam at a single layer separated axially from the illumination focus by a distance z can be calculated using the following hyperbolic relation, where, z R is the Rayleigh range and ω 0 is the Gaussian waist radius, which is related to the numerical aperture NA as follows for circular pupils, Then, the radius of the illumination beacon R illum (z) can be written as follows,    (7) (green dashed lines). The estimated centroids are indicated using corresponding green 'x' and white '+' markers, and the number below each panel is the difference between centroids estimated with the two marked search boxes, in units of the diffraction-limited first minimum to minimum lobe distance. Fig. 17. SHWS lenslet images calculated for a mouse eye at various pupil positions (see top row diagrams) and using an annular pupil and five foci, and assuming beacon originating from the red and green planes with equal amplitude. The images show normalized intensity using the logarithmic color scale indicated by the color bar. The large black solid line squares represent the lenslet outline projected onto the pixelated sensor, while the dashed-line rectangles/squares show the search boxes used in the final centroiding iteration with sizes matching the lenslet central diffraction lobe (small black box) and that provided by Eqs. (6) and (7) (green dashed lines). The estimated centroids are indicated using corresponding green 'x' and white '+' markers, and the number below each panel is the difference between centroids estimated with the two marked search boxes, in units of the diffraction-limited first minimum to minimum lobe distance. Fig. 18. SHWS lenslet images calculated for a mouse eye at various pupil positions (see top row diagrams) and using an on-axis small circular pupil and five foci, and assuming beacon originating from the red and green planes with equal amplitude. The images show normalized intensity using the logarithmic color scale indicated by the color bar. The large black solid line squares represent the lenslet outline projected onto the pixelated sensor, while the dashed-line rectangles/squares show the search boxes used in the final centroiding iteration with sizes matching the lenslet central diffraction lobe (small black box) and that provided by Eqs. (6) and (7) (green dashed lines). The estimated centroids are indicated using corresponding green 'x' and white '+' markers, and the number below each panel is the difference between centroids estimated with the two marked search boxes, in units of the diffraction-limited first minimum to minimum lobe distance. Fig. 19. SHWS lenslet images calculated for a mouse eye at various pupil positions (see top row diagrams) and using an off-axis small circular pupil and five foci, and assuming beacon originating from the red and green planes with equal amplitude. The images show normalized intensity using the logarithmic color scale indicated by the color bar. The large black solid line squares represent the lenslet outline projected onto the pixelated sensor, while the dashed-line rectangles/squares show the search boxes used in the final centroiding iteration with sizes matching the lenslet central diffraction lobe (small black box) and that provided by Eqs. (6) and (7) (green dashed lines). The estimated centroids are indicated using corresponding green 'x' and white '+' markers, and the number below each panel is the difference between centroids estimated with the two marked search boxes, in units of the diffraction-limited first minimum to minimum lobe distance.