Measuring laser beam quality, wavefronts, and lens aberrations using ptychography

We report on an approach for quantitative characterization of laser beam quality, wavefronts, and lens aberrations using ptychography with a near-infrared supercontinuum laser. Ptychography is shown to offer a powerful alternative for both beam propagation ratio M2 and wavefront measurements compared with existing techniques. In addition, ptychography is used to recover the transmission function of a microlens array for aberration analysis. The results demonstrate ptychography’s flexibility in wavefront metrology and optical shop testing. © 2020 Optical Society of America under the terms of the OSA Open Access Publishing Agreement


Introduction
Controlling the shape of laser beams has been an enabling technology for advances in physics, chemistry, and biology. Gaussian and top-hat spatial profiles are typically encountered in applications where laser beams need to be focused to very small areas, such as laser cutting, laser-produced plasma, and high-harmonic generation [1][2][3]. The focusability of a laser beam is specified by the beam propagation ratio (BPR), often referred to as M 2 [4,5]. It indicates how tight a laser beam can be focused compared with a diffraction limited Gaussian beam (TEM 00 ) at the same wavelength. Commercial M 2 -measurement devices perform beam caustic measurements by translating a pixelated sensor through the focus of a laser beam along the beam propagation direction. Following a fitting procedure, M 2 can be extracted. However, this method is only applicable to stigmatic beams and simple astigmatic beams with fixed principle axes, but not for general astigmatic beams [6]. This means a priori knowledge or assumptions are necessary when applying the M 2 -characterization to a laser beam, which limits its application or leads to inaccurate results in cases where incorrect assumptions are applied. In contrast to applications where focusability is important, other applications require highly structured, non-smooth wavefronts. Twisted beams and tailor-made wavefronts can be used in optical tweezers to impart orbital angular momentum or control the trajectory of microparticles [7][8][9].
Engineering high-quality wavefront shaping devices requires accurate wavefront metrology tools. For smooth wavefronts, the Hartmann-Shack wavefront sensor (HSWFS) is a convenient choice [10]. Here typically a pinhole or microlens array is used to monitor the gradient of the wavefront. From this information the actual shape of the wavefront can be computed up to a constant phase offset. HSWFSs require only a single measurement and can operate at multiple wavelengths [11]. However, disadvantages include the typically low spatial resolution, which is limited by the spacing of its resolving elements. Thus the application of HSWFSs is restricted to wavefronts that vary on spatial length scales larger than the characteristic unit cell of the microlens or pinhole arrays involved. This typically results in a spatial resolution of several tens or hundreds of micrometers in the x-ray and visible range, respectively. Furthermore, singular beams such as Laguerre-Gaussian beams with non-zero topological charge and speckle beams are challenging for HSWFSs, in particular when two singularities enter the same subaperture [12]. An alternative is offered by holographic wavefront sensing methods [13]. While offering superior spatial resolution, typically limited by either the detector pixel size or numerical aperture depending on the experimental geometry, holography requires highly coherent beams, which can be a limiting factor for any application involving sources with limited spatial or temporal coherence. Among other approaches, defocus variation techniques are often applied for wavefront sensing and beam characterization [14]. These methods typically use detector defocus combined with wave propagation modelling to extract wavefront information. While such methods work well for near-Gaussian beams with limited phase variation, they have limitations for more complex beams. In particular, deterministic approaches based on the transport-of-intensity equation suffer from singular behaviour in the presence of zero-crossings and phase vortices. Non-deterministic methods based on iterative phase retrieval can reconstruct more complex beams, but often struggle for convergence or are computationally challenging [15].
In the last decade, ptychography has emerged as both a useful microscopy and wavefront sensing tool [16][17][18][19][20][21][22]. In ptychography, a specimen is translated through a stationary illumination beam, referred to as the probe, and exposed at overlapping regions. The additional information provided by the overlap in scan positions enables extraction of phase information from the measured diffraction intensities. Initially developed for scanning microscopy with known illumination profile [16,17], ptychography's capabilities were rapidly extended to simultaneous probe beam retrieval and microscopy [18][19][20], making it a useful tool for a variety of microscopy, wavefront sensing and optics characterization tasks [23][24][25][26][27]. The translation diversity available in ptychography enables for both a theoretically unlimited field of view and a separation of object and illumination information. The latter provides a complex-valued 2D beam reconstruction, which offers a excellent starting point for quantitative beam quality and wavefront aberration characterization. Moreover, ptychography can deal with a wide variety of beams without any a priori knowledge, including fully coherent, spatially and temporally partially coherent, stigmatic and astigmatic beams, and is not hampered by singularities present in the beams [24,26,[28][29][30][31]. The spatial resolution achievable in ptychography can be orders of magnitude better as compared with HSWFSs. Furthermore, no reference beam is required, which makes it experimentally more convenient than holography, especially for short-wavelength radiation. A drawback of ptychography as compared with holography and HSWFSs is the requirement for sample translation, which makes the technique slower than single-shot methods.
The purpose of this paper is two-fold: In the first part, we perform beam quality characterization of a near-infrared, swept-source, supercontinuum laser, using ptychography. From this analysis we extract the beam matrix, M 2 and the intrinsic astigmatism factor as a function of wavelength. The reproducibility of ptychography wavefront sensing across different samples is investigated. Secondly, we apply ptychography to detect wavefront aberrations due to misalignment, as well as lens aberrations. The recovered wavefront of an astigmatic beam and the recovered transmission function of a microlens array (MLA) are decomposed into Zernike polynomials.

Ptychography
We use ptychography [16][17][18][19][20][21][22] to recover both the complex-valued illumination and transmission function of a test object in the lensless scanning microscope depicted in Fig. 1. The test object is located downstream the focal plane of a focused beam and mounted on an xy-translation stage. The focal plane of the beam does not have to be known a priori. By scanning the sample in overlapping regions, ptychography enables recovering the complex electric field distribution of the illumination P and test object O. In the phase retrieval procedure, as a first step, the detector wave estimateψ is constrained to comply with the observed intensity I for each scan position using the update ruleψ j (q) =ψ j (q) where q are detector coordinates, j denotes the scan position, and the prime distinguishes the updated from the original detector wave estimate. Note that throughout the paper, the term 'intensity' denotes the optical intensity as it is commonly defined in laser physics, i.e. the detected optical power per unit area. As a second step, the updated detector wave estimate is back-propagated to the sample plane forming the updated exit surface wave ψ , which is used to update both the illumination estimate P (r) and object estimate O (r) via the update rules [19] and where r = (x, y) are coordinates in the specimen plane, and t j are the respective scan positions. The above algorithm is referred to as the extended ptychographic iterative engine (ePIE) [19]. We use an accelerated version of ePIE, which makes use of previous search directions to accelerate convergence speed, as described in [32]. A supercontinuum source is spectrally limited via short pass (SP1000) and long pass (LP700) filters to the range 700 nm to 1000 nm. A linearly polarized, quasi-monochromatic beam is produced using a combination of polarizing beam splitters (PBS) and an acousto-optic tunable filter (AOTF). The beam is expanded through lenses L1 (f 1 = 25 mm) and L2 (f 2 = 300 mm), and spatially filtered through elements L3 (f 3 = 50 mm), PH (20 µm pinhole), and L4 (f 4 =200 mm). Finally the beam is focused by L5 (f 5 = 500 mm) onto a sample. Translating the specimen transversely and recording the resulting diffraction intensities give the input data for the ptychographic analysis.

Quantitative laser beam quality characterization
In this section, we summarize the methods for M 2 calculation based on beam intensity measurements as given in ISO 11146 [33][34][35], which we will use in our data analysis. The Wigner distribution function provides a phase space description of laser beams of arbitrary degree of coherence [36]. It enables quantitative laser beam characterization via its intensity moments. The zeroth-order moment describes the total power, the first-order moments provide the centroid and propagation direction, the second-order moments are related to the beam width and far-field divergence angles, and the third-and fourth-order moments are linked to the beam symmetry and sharpness of a laser beam [36,37]. Here we focus on the second-order moments, which are often arranged in a 4 × 4 matrix called the beam matrix [6]: where x, y are the position coordinates, and u, v are the direction angles at position (x, y). There are ten second-order moments in a beam matrix. Depending on the number of independent second-order moments, three geometrical beam classifications are defined: stigmatic (ST), simple astigmatic (SA) and general astigmatic (GA) [6,35]. On the other hand, for a laser beam of any geometrical kind, two invariants exist when the beam propagates through symplectic optical systems, which define the intrinsic classification of beams. The correlation between the geometrical and intrinsic classifications of a laser beam has been studied [38,39]. One invariant is the effective BPR, which describes the focusability of a laser beam, and is often referred as M 2 eff : For SA beams, the BPR can be defined along two principle axes as [6]: where M 2 eff = M 2 x M 2 y holds for SA beams measured along the principle axes. For ST beams, a single factor M 2 = M 2 x = M 2 y = M 2 eff ≥ 1 is used to describe its focusability property. M 2 = 1 holds for a stigmatic Gaussian TEM 00 beam, which indicates ideal collimation and focusing properties.
The other invariant is the intrinsic astigmatism factor (IAF) a [6]: The IAF is zero for ST beams, as well as for SA and GA beams that can be transformed into ST beams through symplectic optical systems. Note that it is different from Zernike-based astigmatic aberration, where the beam exhibits different focii in different planes along propagation. According to ISO 11146 [35], a beam is classified as intrinsically stigmatic if the normalized IAF In practice, most of laser beams are either ST or SA, and the BPRs (M 2 , M 2 x , M 2 y ) can be extracted from caustic measurements [33,34,40]. A more general characterization of an arbitrary laser beam is to reconstruct the full beam matrix, from which the geometric type of the beam can be classified and its intrinsic properties M 2 as well as the IAF can be extracted. Methods for the beam matrix reconstruction of any arbitrary laser beam based on multiple intensity measurements have been proposed [6]. When a laser beam propagates through any paraxial optical system that can be described by a symplectic 4 × 4 matrix S, often known as ABCD optical systems, the propagation of the beam matrix follows P 2 = SP 1 S T . Thus, the second-order moments at the output plane are linearly related to the input and a set of output observations can be inverted to give the input beam matrix. Each intensity measurement only directly provides three spatial second-order moments (W 11 , W 12 , and W 22 ) in the beam matrix. In order to obtain all ten second-order moments, at least four different ABCD optical systems (each can be described by a matrix S) need to be used in total to provide four intensity measurements. Nemes and Siegman [6] proposed a method to measure the beam matrix of GA beams by switching spherical and/or cylindrical lenses in the beam path. The combination of free-space propagation and a cylindrical lens has also been discussed [41]. These methods require lens switching and/or detector translation, which is practically inconvenient.
Ptychography offers a quantitative reconstruction of the complex beam profile. Knowing the complex beam profile theoretically allows to directly compute its Wigner distribution and its beam matrix. However, in practice this approach is challenging since the computational complexity of the Wigner distribution of a two-dimensional signal with N pixels per dimension is N 4 . A computationally less demanding alternative is to implement a numerical equivalent of the approaches [6,41,42] by simulating beam propagation through ABCD optical systems. In this work, we obtain equivalent intensity information as in [42] by numerically propagating the measured complex field of the beam: three intensities are obtained through free-space propagation, while a fourth is obtained by simulating propagation through a cylindrical lens. This choice of output observations can be shown to be non-singular and thus invertible [6]. Because the choice of the propagation distances and focal strengths of lenses in the simulation is flexible, we choose observation planes in which the four transformed beam profiles have beam widths greater than 10% of the numerical array size. This approach avoids inaccurate second-order moment determination due to noise, which can be a major source of error in propagation-based M 2 -measurement devices that require careful background subtraction methods, in particular around the focal plane of a laser beam [33,-35].

Zernike decomposition of aberrated wavefronts and transmission functions
Throughout this paper we use Noll's convention for the definition of Zernike polynomials [43]. The phase of the illumination P (r) = |P (r)| exp [iα (r)] and object transmission function O (r) = |O (r)| exp [iβ (r)] recovered in ptychography can be unwrapped using a 2D phaseunwrapping algorithm [44,45] into smooth functions α (r) and β (r), which then can be expanded into Zernike polynomials Z j , i.e. and where r = x 2 + y 2 and ϑ = arctan (y/x) are polar coordinates. It is noted that the assumption of smoothness does not hold for singular beams and optical elements such as phase plates. While ptychography still functions properly under these circumstances, an aberration analysis in terms of Zernike polynomials is then not suitable and other choices of basis functions such as Laguerre-Gaussian modes are more appropriate.
Polarizing beam splitters (PBS) are used to feed a linearly polarized beam into the AOTF and to select the first diffraction order downstream the AOTF. After a relay unit consisting of lenses (L1, L2) and mirrors (M1, M2), the beam is spatially filtered (pinhole PH, 20 µm) and collimated. A lens (L5) focuses the beam onto a specimen mounted on an encoded xy-translation stage (2x Smaract SLC-1770-D-S, 46 mm travel range, 70 nm repeatability). The resulting diffraction intensities downstream the sample are recorded on a CCD camera (AVT prosilica GX1920, 14 bit, pixel size 4.54 µm). In part of the experiment (discussed in Section 3.2), the lens L5 is rotated to generate astigmatic beams for astigmatic wavefront analysis.

Spectrally-resolved beam parameters (BPR and IAF)
To test the extraction of the BPR and IAF from the reconstructed beams by means of ptychography, we collected 15 ptychographic data sets in the spectral range from 709 nm to 842 nm for both USAF (Thorlabs R3L1S4P) and Siemens star (Thorlabs R1L1S3P) resolution test targets. The distance between the sample and the camera is 42.8 mm. Each data set consists of 200 diffraction patterns recorded in a Fermat's spiral scanning pattern [46], with an average overlap of 70%. This relatively high overlap parameter is chosen in order to guarantee a high-quality reconstruction of the beam. Reconstructions were carried out using an NVIDIA Tesla K40 GPU. The reconstructed probe and object for the ptychography scan of the USAF target at the central wavelength of 784 nm are shown in Figs. 2(a) and 2(b), respectively. Likewise, the reconstructed probe and object for the Siemens star at 784 nm are shown in Figs. 2(c) and 2(d), respectively. In the probe plots (Figs. 2(a) and 2(c)), hue depicts phase modulo 2π and brightness depicts the square root of the intensity of the illuminating beam. In the object plots (Figs. 2(b) and 2(d)), only the modulus of the object transmissivity is shown since the reconstructed phase is flat. The reconstruction pixel size for both the probe and the object is 5.5 µm. The half period spatial resolution of the USAF reconstruction at 784 nm is 7.8 µm (Element 1 in group 6 on the USAF target). In order to assess the reproducibility of both the probe and object estimates, we reconstructed two independent data sets measured with the Siemens star at 784 nm and calculated the Fourier ring correlation (FRC) [47]. This is shown in Fig. 2(e). The dashed line is the 1/2-bit resolution threshold. The intersection of the object and probe FRC curves and the threshold indicates the reconstruction resolution. It is seen that the two independent object reconstructions are consistent up to the Nyquist frequency, which in our experiment is limited by the detector numerical aperture. For the probe beam, the two reconstructions are consistent up to half of the Nyquist frequency. This is due to the fact that the beam does not contain higher spatial frequencies.
From each complex-valued probe reconstruction, we calculate the beam matrix at each wavelength, and the results show that all beams are SA beams. Following Eqs. x , M 2 y and M 2 eff measured between two different samples is 4%, 3% and 4% respectively, which confirms that the complex-valued beam reconstruction is sample-independent. The normalized IAF (a/M 4 eff ) in Fig. 3(d)

Characterization of aberrated wavefronts
In addition to characterizing beam profiles and wavefronts, the ptychographic reconstruction approach is equally suitable for analyzing the quality of optical components. We introduced astigmatism to the probe beam at 784 nm by manually rotating lens L5 in Fig. 1. Three ptychographic measurements were performed under the same experimental conditions as mentioned in Section 3.1 with a USAF resolution target at three different lens angles (θ = 0 • , 15 • , 30 • ). The reconstructed complex beams at the object plane are depicted in Figs. 4(a)-4(c). Here Fig. 4(a) shows the reconstructed beam in the default alignment (θ = 0 • ) before rotating the lens. Figures 4(b) and 4(c) show the reconstructed beam with increased lens rotation around the y-axis (θ = 15 • , 30 • ). The calculated beam radii (w = 2σ) in x-and y-direction as a function of propagation distance z upstream the object (the object is at z = 0 mm) are plotted in Figs. 4(d)-4(f). Increased lens rotation introduces astigmatism, which results in different focal lengths in x-and y-direction. We numerically propagated the three beams back to the lens plane (-52 cm) and calculated the first 25 Zernike coefficients (b j in Noll's convention) for each. The results are shown in Figs. 4(g)-4(i). The first three Zernike coefficients (piston and tilts) are excluded since they are non-unique in ptychographic reconstructions. Figure 4(g) shows that the default wavefront (θ = 0 • ) is dominated by defocus, plus small contributions of oblique and vertical astigmatism. At a lens orientation of θ = 15 • , the vertical astigmatism contribution increases to 1.1%. At a lens rotation of θ = 30 • , the contribution of vertical astigmatism increases further to 2.1%.

Aberration characterization of a microlens array
To illustrate the high spatial resolution that can be achieved, we describe the experimental characterization of a microlens array by means of ptychography. A microlens array (Suss MicroOptics, MLA no. 18-00082) was mounted on the scanning stage in the experimental setup in Fig. 1. A wavelength of 784 nm was selected by the AOTF. The distance from the lens L5 to the object was adjusted to produce a beam with an approximate full width at half maximum of 200 µm. A total of 1500 diffraction patterns were recorded in a Fermat's spiral scanning pattern, with an average overlap of 80%. The distance between the microlens array and the detector was 41.5 mm.
The reconstruction result of the microlens array is shown in Fig. 5. Figure 5(a) shows the complex transmission function of the object. The colormap in Fig. 5(b) shows the transmissivity, as would be observed under a bright field transmission microscope. Figure 5(c) depicts the reconstructed probe. A central microlens (black square in Fig. 5(a) was selected and phase unwrapped as shown in Fig. 5(d). The unwrapped wavefront was decomposed into Zernike polynomials. Figure 5(e) depicts the expansion coefficiencts b j (see Eq. (10)) in the Zernike decomposition on a semi-log-scale. We highlighted the relative magnitude of the three dominant contributions, namely the Zernike coefficients for defocus (red, 95.1%), primary spherical (green, 1.8%), and secondary spherical (blue, 1.5%) aberrations. As in the previous section, piston and tilt were excluded due to their non-uniqueness.

Discussion
We have shown that quantitative laser beam quality characterization can be readily performed via ptychography. Using ptychography for quantitative wavefront reconstructions raises the question which objects are suitable for wavefront analysis, and whether or not this analysis is reproducible across objects. While we have not answered this question in general or from a theoretical standpoint, we used simple binary objects with distinct spatial features to show that in practice the beam reconstruction is reproducible and largely independent of the selected object. In the beam characterization experiments, 200 scanning positions were used to cover an object field of view (FoV) of 4 mm in diameter (see Figs. 2(b) and 2(d)). In principle, less scanning positions can be chosen to speed up both the data acquisition and process time at the expense of object FoV.
Nonetheless, an important requirement in Fresnel and far-field ptychography is that the probe has a finite extent in the object plane in order to prevent undersampling in the detection plane. The upper limit of the beam diameter D is given by D λz/x p , where λ, z, and x p are the wavelength, object-detector distance, and detector pixel size, respectively. Variations of ptychography have been reported that allow to relax this restriction [48,49].
One of the difficulties we encountered in the beam characterization is that the second-order moment calculation is sensitive to noise as it depends quadratically on the probe coordinates. Thus in particular for small beams, residual noise contributions at edges of the numerical array can significantly affect the second-order moment estimation. This noise issue also affects traditional focus-scanning-based M 2 measurements, where an accurate determination of the second-order moments near the focus is critically dependent on the choice of noise corrections. ISO 11164 [35] provides suggestions on background and offset corrections in order to select out the illuminated pixels from direct intensity measurements, where it is assumed that the detected intensities are subject to Gaussian noise. However, a subtlety in our experiments is that the reconstruction plane is not equal to the detection plane, leading to a transformation of the underlying noise distribution. In particular, the noise in our beam reconstructions consists of complex-valued random phasor sums, leading to an intensity distribution often modelled by a Rician distribution [50]. Using our numerical approach we could bypass these subtleties by using symplectic beam matrix transformations that lead to expanded beams, where the second moment is much less sensitive to the underlying noise at large coordinates. We observed stable M 2 values when the beam width was at least 10% of the total array dimension. No masking or thresholding was applied to avoid underestimation of the beam width by cutting the tails of the beam. These features make ptychography into a robust approach for beam matrix determination and M 2 characterization, with clear advantages over conventional methods in terms of noise sensitivity. Further studies on noise propagation in ptychography have to be carried out to improve the accuracy of the second-order moment calculation and allow for automated M 2 and IAF extraction.
Zernike decomposition was used in the analysis of aberrated wavefronts induced by lens rotation. All beams were propagated back to the focusing lens plane where the Zernike decomposition takes place. Although Zernike polynomials have been widely applied in aberration analysis for various optical systems, one limitation is that they are not free-space propagation invariant. An alternative propagation invariant, orthogonal modal expansion has been proposed and could be used to avoid the back-propagation step (compare Section 3.2) into the lens plane plane [51].
We have shown an optical shop testing application, where a microlens array was reconstructed and decomposed into Zernike polynomials. We observed that using a beam size smaller than the spatial periodicity of the microlens array (250 µm) helps the algorithm converge to the solutions much faster than when using a larger beam. For larger beams, the periodicity of the microlens array results in diffraction patterns with increasingly pronounced Bragg peaks. Translating the object through a large beam only leads to a small variation in the signal between the Bragg peaks, which may cause the algorithm to struggle for convergence. To mitigate issue due to sample periodicity, a technique referred to as modulus enforced probe (MEP) may be used, which additionally constrains the detector wave in the absence of the sample [52]. Recent work by other researchers used a structured probe to analyse a microlens array, suggesting that the information content in the diffraction data can be increased by breaking the spatial periodicity of the sample by use of a non-smooth probe profile [27]. This allows the use of larger beams, which are preferred to reduce the total number of measurements to cover a large object field of view.

Conclusion
Ptychography allows to reconstruct both the intensity profile and wavefront of linearly polarized laser beams, which enables various ways of quantitative characterization of interest. We have shown that one ptychography setup can replace both an M 2 -measurement device and a wavefront sensor at the same time, while outperforming both in terms of spatial resolution and versatility of the experimental setup. For laser beam quality characterization, commercial M 2 -measurement devices based on axial detector translation are only suitable for stigmatic and simple astigmatic beams. We demonstrated that ptychography enables complex beam recovery from which the complete beam matrix and derived quantities such as M 2 x , M 2 y , M 2 eff and IAF can be computed. By decomposing the recovered beam and object into Zernike polynomials, ptychography can be used for quantitative characterization of beam misalignment and optical shop testing. We therefore believe that wavefront sensing via ptychography is superior to holography, Hartmann-Shack sensors, and propagation-based phase retrieval in applications where speed is not critical.