Correction of resonant optical scanner dynamic aberrations using nodal aberration theory

: The rapid oscillation of galvanometric resonant optical scanners introduces linear astigmatism that degrades transverse resolution, and in confocal systems, also reduces signal [V. Akondi et al. , Optica 7, 1506, 2020]. Here, we demonstrate correction of this aberration by tilting reflective or refractive optical elements for a single vergence or a vergence range, with and without the use of an adaptive wavefront corrector such as a deformable mirror. The approach, based on nodal aberration theory, can generate any desired third order aberration that results from tilting or decentering optical surfaces.


Introduction
Resonant galvanometric scanners are used in a diverse range of applications, including microscopy [1][2][3], retinal imaging [4][5][6], and optical coherence tomography [7][8][9]. Their rapid sinusoidal oscillation, which enables high speed imaging and sensing, induces dynamic oblique astigmatism that is proportional to the angular displacement. This astigmatism can result in up to a factor of two transverse resolution degradation, and up to an order of magnitude signal reduction in confocal instruments [10]. Here, we propose the compensation of this aberration, linear with angular displacement, by tilting optical elements following the resonant scanner. Our approach is based on the nodal aberration theory (NAT) prediction that the tilting and/or decentering of optical elements introduces linear astigmatism. NAT, developed by Shack and Thompson [11], describes the aberrations of optical systems with tilted and/or decentered surfaces. Recently, this theory has been extended to include non-rotationally symmetric surfaces, such as, the primary mirror of Ritchey-Chrétien telescopes [12], φ-polynomial surfaces [13], and Zernike polynomial surfaces [13,14]. Despite its mathematical elegance and physical insight, there are very few practical demonstrations of NAT [14][15][16][17][18], such as the one provided here.
In the next section we introduce NAT concepts, notation, and conventions. Then, we propose the minimization of the analytical field-averaged variance of third order aberrations, as a method for finding the surface tilts and decenters that achieve a desired target wavefront. We then calculate this field-averaged wavefront variance for circular pupil and a 1-dimensional (line segment) field of view to describe the resonant scanner. To deal with the need for correction of aberrations for multiple conjugate planes simultaneously, we calculate the vergence-averaged field-averaged wavefront variance. Both these quantities, calculated analytically here, are the continuous equivalent of the discrete merit functions used by ray tracing software to design and optimize optical instruments, thus providing a natural conceptual understanding for optical designers. The third section of the manuscript provides a description of two afocal relays used here to illustrate the correction of linear astigmatism caused by a resonant scanner. This is followed by the analytical calculation of the NAT aberration coefficients due to the tilting and decentering of the optical elements in the relays. The fourth section consists of a description of the parameters used for the calculation of the tilt solutions and the numerical optimization using ray tracing software. The results section shows the comparison of the calculated solutions against those found by ray tracing software, in terms of the estimated tilts, wavefront maps and wavefront root mean squared. Finally, a summary of the method, findings and observation is provided.

Nodal aberration theory
The scalar wavefront aberrations of rotationally symmetric optical systems can be described as the weighted sum of the contributions from individual surfaces, each of which is represented by a polynomial of normalized field and pupil coordinates [19]. NAT extends this mathematical description to include rotationally symmetric systems perturbed through the tilting and/or decentering of optical elements [11,13,20,21]. In NAT, the normalized pupil and field positions are represented as the vectors ⇀ ρ and ⇀ H, respectively (see Fig. 1), and the wavefront aberrations are calculated as the weighted sum of the aberration field for each surface j shifted by a vector ⇀ σ j [11], Here k = 2p + m, l = 2n + m, and the field shift vector is defined as [21], where i j is the chief ray angle of incidence in the centered system, and ⇀ i * j is the optical axis ray (OAR) angle of incidence measured with respect to the local axis of the tilted and/or decentered surface. The OAR is a real (as opposed to paraxial) ray that connects the center of the object and the center of the aperture stop [11]. The field positions at which each term in Eq. (1) becomes zero are the aberration nodes which give the mathematical formalism its name. The vectors in Eq. (1) are Cartesian coordinate vectors, with their dot and cross products defined in the conventional way, and their multiplication defined as [11]. If the two vectors were complex numbers, this new operation would be their multiplication, with the output being a coplanar vector with magnitude |︁ |︁ |︁ |︁ |︁ |︁ and an angle θ A + θ B . In order to calculate the field displacement vector ⇀ σ j , we first need to calculate the OAR angle of incidence, which is defined as [21], with ⇀ N j denoting the unit vector normal to the object plane and its conjugates, ⇀ R j the unit direction vector of the optical axis ray, and ⇀ S j the unit surface normal vector at the intersection point with the OAR, as shown in Fig. 2 [21].
with ⃑ denoting the unit vector normal to the object plane and its conjugates, ⃑ the unit direction vector of the optical axis ray, and ⃑ the unit surface normal vector at the intersection point with the OAR, as shown in Fig. 2 [21]. Fig. 2. Unit vectors used to calculate the optical axis ray angle of incidence in an optical system with tilted optical elements for a reflective surface (left) and a refractive surface (right).

Tilt convention and OAR angle of incidence
In what follows, we adopt the tilt convention used by the ray tracing software OpticStudio (Zemax, Kirkland, WA, USA), which is depicted in Fig. 3. In this way, ⃑ cos sin , sin , cos cos .
Now, for each surface , ⃑ is normal to the object plane in an unperturbed rotationally symmetric optical system, and thus, has Cartesian coordinates 0,0, 1 [21]. If the optical elements are titled but not decentered, as it is the case in the optical systems considered in this work, the OAR unit vector ⃑ will be coaxial with ⃑ , which when substituted in Eq. (3) yields, ⃑ * cos sin , sin , 0 .
Here it is important to note that when a ray reflects off a mirror, the angle ⃑ * in Eq. (5) must be multiplied by the refractive index of the medium before the surface. If the medium is air and the surfaces are all reflective, then the refractive index should be considered as 1 . Fig. 3. Tilt definition used to derive the unit surface normal vector ⃑ , the optical axis ray angle of incidence ⃑ * , the field shift vector ⃑, and eventually, the wavefront aberrations. Unit vectors used to calculate the optical axis ray angle of incidence in an optical system with tilted optical elements for a reflective surface (left) and a refractive surface (right).

Tilt convention and OAR angle of incidence
In what follows, we adopt the tilt convention used by the ray tracing software OpticStudio (Zemax, Kirkland, WA, USA), which is depicted in Fig. 3. In this way, Now, for each surface j, ⇀ N j is normal to the object plane in an unperturbed rotationally symmetric optical system, and thus, has Cartesian coordinates [0, 0, −1] [21]. If the optical elements are titled but not decentered, as it is the case in the optical systems considered in this work, the OAR unit vector ⇀ R j will be coaxial with ⇀ N j , which when substituted in Eq. (3) yields, Here it is important to note that when a ray reflects off a mirror, the angle ⇀ i * j in Eq. (5) must be multiplied by the refractive index of the medium before the surface. If the medium is air and the surfaces are all reflective, then the refractive index should be considered as (−1) j .

Third order aberrations
For many optical systems, the terms in Eq. (1) referred to as third-order aberrations (k + l = 4), provide an adequate description of the optical performance. These third-order wavefront aberrations in a perturbed system are written as [11], with elements are titled but not decentered, as it is the case in the optical systems considered in this work, the OAR unit vector ⃑ will be coaxial with ⃑ , which when substituted in Eq. (3) yields, ⃑ * cos sin , sin , 0 .
Here it is important to note that when a ray reflects off a mirror, the angle ⃑ * in Eq. (5) must be multiplied by the refractive index of the medium before the surface. If the medium is air and the surfaces are all reflective, then the refractive index should be considered as 1 . Fig. 3. Tilt definition used to derive the unit surface normal vector ⃑ , the optical axis ray angle of incidence ⃑ * , the field shift vector ⃑, and eventually, the wavefront aberrations. where we have excluded distortion (W 311 ) because it does not affect image sharpness. It should be emphasized here, that the wavefront coefficients W klm are calculated as functions of paraxial ray tracing quantities [22] in the rotationally symmetric system, and remain unchanged when surfaces are tilted and/or decentered.

Third order aberrations
The last term in Eq. (6) is the third order astigmatism, where the scalar W 222 is the amplitude of the astigmatism quadratic in the radial field coordinate, and the vectors ⇀ A 222 and ⇀ B 2 222 , are the amplitudes of astigmatism that are linear and constant across the field of view, respectively. Equation (7) shows that these amplitude vectors depend on the quadratic astigmatism (W 222 j ) and the field shift vector ⇀ σ j associated with each optical surface, which indicates that surfaces could be intentionally tilted to achieve a desired linear and constant astigmatism, which is the strategy we propose to compensate for the linear astigmatism introduce by the resonant scanner.

Wavefront targeting
Let us now consider the general problem of generating a target, or desired, wavefront W d in an initially rotationally symmetric system by tilting and/or decentering surfaces. That is, the optical elements and the distance between them have been selected and the only remaining parameters to adjust are their tilts and/or decenters. This can be pursued by first deriving the explicit formula for the residual field-averaged wavefront variance [23], where, the integration is performed over the desired field of view and, with the integration performed over the entire pupil. The surface tilts α j , β j and decenters d x,j , d y,j , can be chosen to minimize the field-averaged wavefront variance of the difference between the system and desired wavefronts by solving the system of equations, for all surfaces j. From within the solutions to this system of equations, only the actual minima, as opposed to maxima or saddle points, are desirable solutions, which can be determined by calculating the sign of the local second derivatives. Finally, the tilts and decenters that correspond to local minima can be substituted in Eq. (8) to determine which of these is the global field-averaged wavefront variance minimum, thus providing the best fit to the desired wavefront. It should be noted, that even if the number of tilts and decenters was equal or greater than the number of equations, there is no guarantee that solutions for this set of transcendental equations exist.

Linear astigmatism targeting over a linear field of view
In this work, we aim to generate oblique linear astigmatism equal and opposite to that introduced by the dynamic distortion of a resonant scanner at the entrance pupil [10], which is described by the aberration coefficient Our goal is to find the optical element tilts that achieve this desired linear astigmatism while keeping all other third order aberrations to a minimum. To achieve this, we first calculate the field-averaged wavefront variance over a circular pupil and the field of view of the resonant scanner, which is the line segment defined as H x = 0 and H y = [−1, 1]. If the field-constant defocus is chosen such that W 020 = −B 220 M , that is, if the system is refocused to compensate for any defocus introduced by the surface tilting, we get, (11) Since tilting and decentering do not change the rotationally symmetric wavefront aberration coefficients, they can be ignored in the minimization process, as they are constant. The remaining terms can be thought of as the non-rotationally symmetric (NRS) wavefront variance, The next step is to substitute here the formulae for each coefficient in terms of the optical system parameters, followed by the calculation of the partial derivatives with respect to the tilts α 1 , β 1 , α 2 , and β 2 , which will be equated to zero. Solving the resulting set of equations provides an initial set of angles that can be fed to ray tracing software for further refinement.
The search for analytical solutions for such system of equations could be pursued using symbolic calculation engines, such as MATLAB (Mathworks, Natick, MA, USA) or Mathematica (Wolfram Research, Champaign, IL, USA). Alternatively, numerical solutions could be pursued, although widely used solvers (e.g., MATLAB's vpasolve or the Nelder-Mead minimization method implemented in MATLAB through the fminsearch function) might not be able to find the global field-averaged wavefront variance minimum, as they might get stuck in local minima.
Part of the challenge in solving such system of equations comes from the appearance of trigonometric functions of the tilts. Therefore, in what follows we sought approximate solutions by using the small angle approximation (i.e., sin θ ≈ θ, cos θ ≈ 1) on the formulae describing the wavefront aberration coefficients.

Linear astigmatism targeting across a vergence range
Some applications require a target wavefront across a range of conjugates, which for convenience we express in terms of vergence (ϕ v ), defined as the marginal ray angle divided by the ray height at the pupil. In this scenario, the quantity that should be minimized, assuming that all vergences within the range are of equal importance, is the field-averaged wavefront variance averaged across the desired vergence range, where the first overbar denotes average across the field of view and the second across the vergence range.

Afocal relay
Let us now study an afocal relay consisting of two elements with focal lengths f 1 and f 2 , separated by the sum of their focal lengths, with the entrance pupil a focal length in front of the first optical element and the exit pupil, a focal length behind the second element. For the infinite conjugate in this system, the magnification is m = −f 2 /f 1 , with the marginal ray of height with radius h 0 at the entrance pupil emerging collimated.

Reflective afocal relay
When the proposed afocal relay is reflective and formed by two concave spherical mirrors as depicted in Fig. 4 below, the field shift vectors calculated using Eqs. (2) to (5) are, These can be combined with the traditional definition of the W klm, j coefficients for rotationally symmetric aberrations of each surface [22] and substituted in Eq. (7) to calculate the nonrotationally symmetric wavefront aberration coefficients, which we show in Table 1 below as a function of vergence.

Linear astigmatism targeting across a vergence range
Some applications require a target wavefront across a range of conjugates, which for convenience we express in terms of vergence ( ), defined as the marginal ray angle divided by the ray height at the pupil. In this scenario, the quantity that should be minimized, assuming that all vergences within the range are of equal importance, is the field-averaged wavefront variance averaged across the desired vergence range, where the first overbar denotes average across the field of view and the second across the vergence range.

Afocal relay
Let us now study an afocal relay consisting of two elements with focal lengths and , separated by the sum of their focal lengths, with the entrance pupil a focal length in front of the first optical element and the exit pupil, a focal length behind the second element. For the infinite conjugate in this system, the magnification is / , with the marginal ray of height with radius ℎ at the entrance pupil emerging collimated.

Reflective afocal relay
When the proposed afocal relay is reflective and formed by two concave spherical mirrors as depicted in Fig. 4 below, the field shift vectors calculated using Eqs. (2) to (5) These can be combined with the traditional definition of the , coefficients for rotationally symmetric aberrations of each surface [22] and substituted in Eq. (7) to calculate the non-rotationally symmetric wavefront aberration coefficients, which we show in Table 1 below as a function of vergence.   The difference between quadratic, linear and constant astigmatism is illustrated by the wavefront maps shown in Fig. 5 for zero vergence, with the spherical mirrors tilted to generate 0.07 waves of oblique astigmatism at the field edge. The quadratic astigmatism, unchanged by the tilting of the spherical mirrors rotate with the angle of the position vector ⇀ H. The linear astigmatism wavefronts, induced by the tilting of the spherical mirrors, rotate only by half of the position Table 1. Third order non-rotationally symmetric aberration coefficients for an afocal reflective relay formed by tilted concave spherical mirror for conjugates defined in terms of: vergence (φ v ), half field of view (HFOV ), entrance pupil radius (h 0 ), focal length of the first spherical mirror (f 1 ), magnification (m) and spherical mirror tilt about the local x-(α) and y-axis (β). Note that B 220 M is a scalar. The difference between quadratic, linear and constant astigmatism is illustrated by the wavefront maps shown in Fig. 5 for zero vergence, with the spherical mirrors tilted to generate 0.07 waves of oblique astigmatism at the field edge. The quadratic astigmatism, unchanged by the tilting of the spherical mirrors rotate with the angle of the position vector ⃑ . The linear astigmatism wavefronts, induced by the tilting of the spherical mirrors, rotate only by half of the position vector (see dashed lines), while the constant astigmatism wavefronts, also induced by the tilting, do not change their orientations across the field of view.

Refractive afocal relay
For an equivalent afocal relay formed by two thin plano-convex lenses with refractive indices n 1 and n 2 , the non-rotationally symmetric aberration coefficients are calculated using the thin lens approximation, and therefore, each lens has only one field shift vector ⇀ σ j . The formulae were derived with the flatter surfaces facing the infinite conjugate, as depicted in Fig. 6, to minimize pupil aberrations. The results of the field shift vectors are similar to that of the reflective system, other than for replacing the 2(−1) j factor due to the reflection on the mirror surfaces with the (n j − 1) due to the refraction on the lens curved surfaces, For simplicity, the coefficients in Table 2 have been calculated only for zero vergence.
For an equivalent afocal relay formed by two thin plano-convex lenses with refractive indices and , the non-rotationally symmetric aberration coefficients are calculated using the thin lens approximation, and therefore, each lens has only one field shift vector ⃑ . The formulae were derived with the flatter surfaces facing the infinite conjugate, as depicted in Fig. 6, to minimize pupil aberrations. The results of the field shift vectors are similar to that of the reflective system, other than for replacing the 2 1 factor due to the reflection on the mirror surfaces with the 1 due to the refraction on the lens curved surfaces, ⃑ cos sin sin and ⃑ cos sin sin .
For simplicity, the coefficients in Table 2 have been calculated only for zero vergence. Fig. 6. Systematic of the refractive afocal relay. Lenses are drawn with thicknesses for illustration purpose only. Black line represents the optical axis of the system, red line represents the marginal ray, and ℎ is the entrance pupil radius.

Simulation
The optical systems described above, together with a scanning mirror with dynamic distortion, were evaluated using the ray tracing software OpticStudio, assuming 680 nm light. Three afocal relays were studied: one formed by two concave spherical mirrors, one formed by two commercially available plano-convex singlets (LA1725-A, Thorlabs and PLCX-50.8-412.1-C, Fig. 6. Systematic of the refractive afocal relay. Lenses are drawn with thicknesses for illustration purpose only. Black line represents the optical axis of the system, red line represents the marginal ray, and h 0 is the entrance pupil radius.

Table 2. Third order non-rotationally symmetric aberration coefficients for infinite conjugates in an afocal refractive relay formed by two tilted thin plano-convex lenses in terms of: half field of view (HFOV ), entrance pupil radius (h 0 ), focal length of the first lens (f 1 ), magnification (m) and lens tilt about the local x-(α)
and y-axis (β). Note that B 220 M is a scalar.

Simulation
The optical systems described above, together with a scanning mirror with dynamic distortion, were evaluated using the ray tracing software OpticStudio, assuming 680 nm light. Three afocal relays were studied: one formed by two concave spherical mirrors, one formed by two commercially available plano-convex singlets (LA1725-A, Thorlabs and PLCX-50.8-412.1-C, CVI Laser Optics, Albuquerque, NM, USA), and one formed by two achromatic doublets (ACT508-400-A, Thorlabs, Newton, NJ, USA, and DLB-50-800PM, Laser 2000, Huntingdon PE29 6XS, UK), all of them with f 1 = 400 and f 2 = 800 mm. The dynamic distortion of the resonant scanner was simulated by inserting a Zernike fringe phase plate at the entrance pupil plane, with the amplitude of the 6 th Zernike term varying linearly across the ±1°mechanical scanning angle, creating 0.07 or 0.28 waves of oblique astigmatism at the field edge [10]. Five uniformly spaced field points were simulated as five different OpticStudio configurations.
A continuous surface wavefront corrector, such as a deformable mirror, was modeled at the exit pupil plane as a second Zernike fringe phase plate that did not vary across the field of view, in which all coefficients up to the 8 th order were allowed to change during the optimization process. To avoid introducing unwanted piston and tilts on the deformable mirror, the following constraints were imposed.
where C n is the coefficient of the Zernike polynomials Z n . These constraints lead to C 1 = C 4 , C 2 = 0.5 C 7 and C 3 = 0.5 C 8 , which were set up in OpticStudio as pickups across all configurations, to account for the fact that the DM affects all configurations equally.
Two ray tracing optimization approaches were pursued for the zero vergence case, one without the DM and one with it, both using OpticStudio's default merit function using centroid as reference (to ignore tilt). This merit function is a discretized version of the field-averaged wavefront variance. As mentioned earlier, field-constant defocus induced by the tilting of the relay elements is removed by allowing the distance after the paraxial lens at the exit pupil to vary during the optimization process.
For the optimization across a vergence range, the same approach was pursued, first without the DM, and then with it, always with three times the number of configurations, one per vergence. The chosen vergences were -2.25, 0.0 and 2.25 diopters (D, inverse of meters), representing the extremes and middle of the vergence range for an adaptive optics ophthalmoscope [4]. The vergence was induced by placing paraxial lenses at the entrance and exit pupils with opposite sign focal lengths and with the exit pupil paraxial lens focal length scaled by the inverse of the magnification squared. The same DM correction was applied to all vergences and field points.
Piston and tilt were removed from all calculated wavefront maps and their root-mean-squared (RMS) values. Oblique astigmatism is reported in all figures using the Optical Society of America [24] and American National Standard Institutes [ANSI Z80.  conventions, in which the 3 rd Zernike term corresponds to the 6 th Fringe Zernike coefficients in OpticStudio divided by the normalization factor √ 6. Pupil distortion values, inferred from the wavefront maps generated by OpticStudio, are not thought to be accurate and thus should be considered just a coarse approximation. In fact, the comparison of wavefront map generated using the same optical setups using two different ray tracing software, can provide strikingly different pupil distortion, as illustrated in Fig. 7.

Reflective afocal relay optimized for zero vergence
When considering the zero vergence case, the numerical minimization of the field-averaged wavefront variance yields two solutions for each desired linear astigmatism amplitude, shown on Table 3. These solutions show symmetries that can be gleaned from the formulae for  Table 1 with ϕ v = 0). Table 3. Numerical tilt solutions that minimize the field-averaged third order wavefront variance in an afocal reflective telescope formed by two concave spherical mirrors with parameters: h 0 = 2 mm, HFOV = 2 • , f 1 = 400 mm, m =-2, and φ v = 0. The square root of the wavefront variances was calculated using the small angle approximation and the exact formulae in Table 1 The wavefronts and metrics resulting from the ray tracing can be seen in Fig. 8 and Fig. 9 for 0.07 and 0.28 waves of linear oblique astigmatism simulating the dynamic distortion of two different resonant scanners, respectively. The top row in these figures correspond to the rotationally symmetric initial configuration (i.e., α 1 = α 2 = β 1 = β 2 = 0), in which the dominant aberration is the resonant scanner linear oblique astigmatism. The second rows show the performance when the spherical mirrors are tilted as per the first solution in Table 3. The third rows show the performance when the spherical mirror tilts are optimized by the OpticStudio starting with zero tilts. For 0.07 waves of linear astigmatism, the tilts calculated using third order nodal aberration theory and the paraxial approximation are within 5% of the angles found by OpticStudio, which does not use the paraxial approximation and accounts for higher order aberrations. The corresponding pupil distortion is 8% for the small angle NAT prediction, 7% for the ray tracing optimization and less than 1% for the ray tracing solution with a deformable mirror compensating field-constant aberrations. Fig. 8. Wavefront maps and metrics for an afocal relay formed by two spherical mirrors for -2, -1, 0, 1, and 2°field points, with 0.07 waves of oblique astigmatism at the field edge, assuming zero vergence (i.e., infinite conjugates).
The small angle approximation NAT calculated tilts provide a poor starting solution for compensating the 0.28 waves of resonant scanner linear astigmatism. In fact, it increases the wavefront RMS by more than an order of magnitude, also inducing very large pupil distortion (77%). This is not surprising, given that the calculated tilts are too large for the small angle approximation to be valid. Ray tracing optimization, however, reduces the linear astigmatism while keeping all other aberrations low. In this case, the inclusion of the deformable mirror in the optimization delivers wavefront RMS at all field points lower than λ/100 with less than λ/1000 of linear astigmatism, and negligible pupil distortion (<1%) despite spherical mirror tilts being as large as 40°.

Refractive afocal relay optimized for zero vergence
For a refractive afocal relay formed by two plano-convex singlets, the numerical minimization of the field-averaged wavefront variance yields three solutions for each of the linear astigmatism amplitudes considered (shown on Table 4). These solutions show symmetry that can be gleaned from the formulae in Table 2 for linear and constant astigmatism ( ⇀ A 222 and ⇀ B 2 222 ), the dominant non-rotationally symmetric aberrations, which cancel when α 1 = α 2 and β 1 = −2β 2 , respectively. These relations have opposite signs to their reflective relay equivalent.
The wavefronts and metrics resulting from the ray tracing are shown in Fig. 10-Fig. 13 for the 0.07 and 0.28 waves of linear astigmatism, first for a relay formed by plano-convex singlet lenses, and then for a relay formed by commercial achromatic doublets. The rows in these figures match those from the reflective system. In the plano-convex singlet relay, the rotationally Fig. 9. Wavefront maps and metrics for an afocal relay formed by two spherical mirrors for -2, -1, 0, 1, and 2°field points, with 0.28 waves of oblique astigmatism at the field edge, assuming zero vergence (i.e., infinite conjugates). Table 4. Numerical tilt solutions that minimize the field-averaged third order wavefront variance in an afocal refractive telescope formed with by two thin plano-convex lenses with parameters: h 0 = 2 mm, HFOV = 2 • , f 1 = 400 mm, m =-2, n 1 = n 2 = 1.5136, and φ v = 0. The square root of the wavefront variances was calculated using the small angle approximation and the exact formulae in Table 1 Fig. 10. Wavefront maps and metrics for an afocal relay formed by two plano-convex lenses for -2, -1, 0, 1, and 2°field points, with 0.07 waves of oblique astigmatism at the field edge, assuming zero vergence (i.e., infinite conjugates). . 11. Wavefront maps and metrics for an afocal relay formed by two plano-convex lenses for -2, -1, 0, 1, and 2°field points, with 0.28 waves of oblique astigmatism at the field edge, assuming zero vergence (i.e., infinite conjugates). symmetric system is dominated by the linear astigmatism and other field-varying aberrations. The tilts predicted by the small angle NAT approximation are reasonable initial solutions that are within 20 and 32% of those found by the ray tracing optimizer for 0.07 and 0.28 waves of linear astigmatism, respectively. The ray tracing solutions deliver λ/60 wavefront RMS or better across the field of view, and no substantial improvement when using a deformable mirror. Pupil distortion is negligible (<1%) in all configurations for the 0.07 waves of linear astigmatism, but not for 0.28 waves (9%), which requires the use of a deformable mirror to achieve both good wavefront correction and negligible pupil distortion. The achromatic doublet relay shows similar performance to that of the plano-convex lens relays, suggesting that the singlet NAT derivations can be used to generate initial solutions for more complex lenses. Interestingly, the refractive element tilts are ∼3-4 times lower than their reflective equivalents to achieve the same linear astigmatism, due to the ∼15 times larger W 222,j surface coefficients and ∼2 times smaller field displacement vectors in our application.

Reflective afocal relay optimized for a vergence range
The numerical minimization of the vergence and field-averaged wavefront variance, defined in Eq. (13), yields only one solution for the desired linear astigmatism amplitude (α 1 = α 2 = 0, β 1 = 1.89 • , and β 2 = 1.33 • ). Interestingly, the small angle approximation NAT solution and the ray tracing optimal solutions (with and without using a DM) have much smaller angles than those for the zero vergence case, achieving a more modest level of correction that varies between 50 and 70% across vergences and field points (Fig. 14).  Wavefront maps and metrics for an afocal relay formed by two spherical mirrors for -2, -1, 0, 1, and 2°field points, with 0.07 waves of oblique astigmatism at the field edge, for three vergences.

Summary
Here we illustrated how third order nodal aberration theory can be used to estimate initial tilting and/or decentering of optical elements to be refined by ray tracer optimizers. The first step in this broadly applicable approach is to analytically derive the field displacement vectors and the aberration coefficients for rotationally symmetric surfaces, together with a symbolic calculator to obtain a small angle approximation of the field-averaged wavefront variance that is then analytically or numerically minimized. This method, which can be applied to any pupil and field geometries, can be thought of a generalization of that by Zhong and Gross, in which the authors only consider a single field point [15]. Moreover, our approach is the continuous equivalent of what ray tracer optimizers do, by minimizing merit functions that discretely sample the continuous field-averaged wavefront variance. The main difference between the two, is that ray tracing software traces real, rather than paraxial, rays and includes higher order aberrations. Just like the merit function in ray tracers can be tailored to a particular optical design problem, the function to minimize analytically (or numerically) can be equally modified, as we demonstrated by calculating the field-averaged wavefront variance for a field of view that is a line segment and then averaging across a vergence range. Finally, and despite the small angle approximation, the analytical approach provides insight and can reveal all the solutions and their symmetry. This might not be trivial to find with ray tracing optimization without systematic exploration of the multi-dimensional design parameter space. When the proposed design method is applied to the compensation of the dynamic distortion of a resonant scanner, it guided us to solutions that compensate modest linear astigmatism amplitudes using reflective or refractive afocal relays, while keeping all other aberrations well beyond the diffraction limit (λ/14 wavefront RMS). This is of practical significance, because it indicates that the linear astigmatism induced by resonant scanners in high resolution optical systems can be cancelled or mitigated just by tilting existing optical elements, even if multiple conjugates are used simultaneously.