Optics and Lasers in Engineering Lens aberration compensation in interference microscopy

Emergence of products that feature functional surfaces with complex geometries, such as freeform optics in con- sumer electronics and augmented reality and virtual reality, requires high-accuracy non-contact surface measurement. However, large discrepancies are often observed between the measurement results of optical methods and contact stylus methods, especially for complex surfaces. For interference microscopy, such as coherence scanning interferometry, the three-dimensional surface transfer function provides information about the instrument spa- tial frequency passband and about lens aberrations that can result in measurement errors. Characterisation and phase inversion of the instrument’s three-dimensional surface transfer function yields an inverse ﬁlter that can be applied directly to the three-dimensional fringe data. The inverse ﬁltering is shown to reduce measurement errors without using any data processing or requiring any a priori knowledge of the surface. We present an experimental veriﬁcation of the characterisation and correction process for measurements of several freeform surfaces and an additive manufactured surface. Corrected coherence scanning interferometry measurements agree with traceable contact stylus measurements to the order of 10 nm.


Introduction
Interference microscopy offers non-contact, high-speed and highresolution measurement of three-dimensional (3D) surface topography for advanced manufacturing research and industrial applications [ 1 , 2 ]. Interference microscopy combines an interferometric objective lens with a wide-field microscope to realise high-resolution holographic reconstruction of the scattered electromagnetic field within the region of an object [ 1 , 3 ]. Surface topography can then be derived from the reconstructed field [ 1 , 2 ]. The major modalities of interference microscopy include coherence scanning interferometry (CSI) and phase-shifting interferometry [ 1 , 2 ], and the closely-related techniques, digital holography microscopy and optical coherence tomography [3] . In this paper, we focus on the CSI technique which is of particular interest as it offers wide-field imaging with an optical sectioning capability afforded by a spectrally broadband source. In CSI, the instrument scans along the optical axis of the system, and interference takes place only within a window of a few micrometres of the zero optical path difference of the interferometer, determined by the coherence length. Commercial CSI instruments achieve measurement noise levels below a nanometre [4] . These features allow CSI to measure a variety of surface types, from op-Current error correction methods are based on post-processing or filtering of the surface height or phase data that is calculated from the fringe data. For example, the correction can be achieved by filtering the coherence profile and unwrapping or connecting the phase gap between the phase and coherence profiles [ 18 , 26 , 27 ]. Alternatively, a look-up table that is generated by measuring a reference artefact with varying slopes at different locations of the field of view can be used to correct the surface height errors pixelwise. As a linear system, however, it is possible to compensate for lens aberration in CSI by correcting the raw fringe data without using either digital post-processing or introducing any physical upgrade to the instrument. To do so, information about the instrument response or transfer function is required. Several different transfer functions have been discussed with reference to the performance of CSI. From a user perspective, the instrument transfer function (ITF) is most important as it relates the spatial frequencies that characterise the instrument response (i.e. the surface measurement) to those that characterise the surface height [28] . For the case of a near planar object (surface height discontinuities < /10 and surface slopes well within the acceptance range of the objective numerical aperture [NA]), it is straightforward to show that CSI behaves linearly and that the ITF may be estimated from the two-dimensional optical transfer function (OTF) that relates the spatial frequencies in the optical field scattered by the object to those in the optical field recorded by the instrument [29] . However, CSI is more widely applicable to three-dimensional (3D) surfaces with significantly greater height deviation, motivating a more comprehensive analysis of 3D imaging.
The characterisation of 3D imaging systems as linear filtering operations has been considered by many researchers [ 3 , 30-35 ]. In general, 3D imaging requires the combination of two or more interferometric measurements of the optical field scattered from an object with different illumination conditions or equivalently, by measuring the interference observed as the object is scanned through focus. In this way, the spatial frequencies that define the interference signal recorded by CSI can be related to those of a 3D object either defined volumetrically by refractive index contrast [ 3 , 31 , 36 ] or as a surface defined by the position at the interface between two homogenous media that we refer to as "foil model " of the surface [37] .
Noting that the same instrument can be characterised by different transfer functions applied to different mathematical representations of the object, to avoid confusion, we henceforth refer to 3D volume and surface transfer functions as 3D VTF and 3D STF, respectively (we have previously referred to the 3D STF as simply the 3D transfer function [ 19 , 22 , 37 ]). The subtle difference between the two is the weighting function before the integrand in Eq. (32) of reference [37] , originating from the definition of the foil function, where the surface is defined by a Dirac delta function in the z -direction. Sheppard reports the same weighting function for the surface scattering process under the Kirchhoff approximation [38] (also known as the Kirchhoff theory of scattering [39] ). The foil model, which is derived based on the Kirchhoff approximation, is valid when the radius of curvature of the surface is much larger than the wavelength, and the slope angle is sufficiently small, so that shadowing effects or multiple scattering are negligible [ 38 , 39 ]. These criteria are conceptually equivalent to a "smooth " surface, as opposed to a "rough " surface that generates random speckle patterns in the pupil of the objective lens.
In a previous paper, measurement and correction of the 3D STF for a CSI instrument was proposed and some proof-of-principle experiments demonstrated that it is possible to characterise the 3D STF of a CSI instrument by measuring a precision microsphere, which has a diameter much larger than a wavelength [40] . Although the potential of the method has been demonstrated, the feasibility and validity of the foilmodel based characterisation method has not been verified with "realworld " surfaces.
In this paper, we demonstrate and evaluate a method that is based on the fundamental theory of 3D imaging, to measure and compensate the effective lens aberration in CSI by correcting the 3D fringe data, to enhance the accuracy for CSI measurements of complex surfaces with varying slopes and spatial frequencies.

Theory
Within the validity regime of the foil model, the imaged light field of CSI in the 3D spatial frequency domain ( k -space) is written as where Δ ( ) is the Fourier transform of the foil function of the surface which is defined in the 3D spatial domain by [37] Δ ( ) = 4 ( ) where = √ −1 , and W ( r ) is a window function associated with the space-limited surface area that is effectively illuminated by the optical system. The Dirac delta function ( •) is used to define the geometry of the foil along the optical axis, ̂ , depending on the surface height function, s ( x,y ). ̃ ( ) is the 3D STF given by Eq. (32) in [37] .
The inverse filter is calculated through a simple phase inversion of the 3D STF, The CSI fringe data of a surface is then modified by multiplying the inverse filter with the 3D Fourier transform of the original fringe data in the spatial frequency domain, followed by an inverse Fourier transform to return the modified fringe data in the spatial domain, i.e.

Precision microspheres
To characterise the 3D STF, we have investigated the use of four silica spheres that were manufactured by two different methods, are of varying size and are repeatedly measured at different rotational angles. The specifications of the spheres are given in Table 1 .
The A-type spheres were produced using femtosecond laser structuring combined with a subsequent step of CO 2 laser melting. This method is known as 'laser morphing' and is further described in references [ 41 , 42 ]. The radius of the A-type sphere was determined using an interferometric radius measurement procedure on an interferometer (a Twymann-Green interferometer). The spheres are coated with silver to enhance reflectivity. The radius is measured as the distance between the so-called cat's eye position, where the focus of the interferometric objective coincides with the vertex of the sphere, and the null test position of the sphere, where the focus of the interferometer objective coincides with the centre of curvature of the sphere. The radius is the displacement between the two positions, measured with a displacement measuring interferometer that uses a frequency stabilised helium-neon laser at 633 nm.
The B-type spheres are commercially available and produced by melting non-spherical SiO 2 particles in plasma to form spherical droplets, and then cooled to obtain solid spheres. As the B-type spheres directly sit on top of an optical flat, the diameters were measured as the distance between the top of the sphere and the surface of the optical flat. The standard deviation of the ten repeated diameter measurements is smaller than 10 nm. The influence of the accuracy of the diameter and sphericity on the 3D STF has been demonstrated elsewhere [19] .

Surface measurement
In this work, we characterised and corrected a commercial CSI instrument with a Mirau objective lens (0.55 NA), 0.174 μm lateral sampling distance, 1000 × 1000 lateral sampling points, 0.56 m central wavelength and bandwidth of approximately 100 nm (full width at half maximum). The field-dependent lateral distortion of the instrument was measured and corrected using a previously reported self-calibration technique [23] . In principle, our proposed technique can be applied to any CSI instrument.
Three reference surface samples (material measures manufactured by Rubert & Co Ltd, see Table 2 for specifications) and an AM surface were used for validating the error correction method of surface measurement. Surfaces R521 and R527 have similar slope distributions but different spatial frequencies. R525 has a similar pitch as R527 but its maximum slope is close to the acceptance angle of the NA of the instrument. As shown in Fig. 1 , the sinusoidal surfaces not only feature varying slopes but also varying spatial frequencies and microscale machining marks. The AM surface of a Ti-6Al-4V sample was made using the electron beam powder bed fusion (EBPBF) technique (see [43] for more details). The roughness of this type of surface is usually of the order of several micrometres or higher. These surfaces are well-known challenges for optical instruments and are good representatives of surfaces in real-world applications.
A stylus instrument (Talysurf Intra 50) was used to provide reference measurements of these surfaces. The tip radius of the stylus is 2 μm. The measurement noise (root-mean-square [RMS] value) is 12 nm, which was evaluated using an optical flat by following the standard calibration procedure [44] . The primary profile length of the stylus measurement was 5 mm for the three sinusoidal surfaces. Each of the profiles was split into ten segments from which the mean profile and the standard deviation were calculated. The mean profiles of the stylus measurements were used for comparison, such that the impact of topographic outliers of the surface, e.g. dust particles, can be minimised. The reproducibility of the stylus measurements, calculated as the root sum of squares of the standard deviation value and the noise, are 30 nm, 30 nm and 24 nm for R521, R525 and R527, respectively. The response of the stylus instrument to these surfaces is not expected to be affected by the slope-dependent errors experienced by the optical instrument thanks to the large pitch of the surface structure relative to the tip radius of the stylus.
To quantitatively compare the surface measurement results obtained by the optical and stylus instruments, surface profiles are extracted from different positions of the CSI areal topography maps and compared with the stylus-measured profiles. A registration algorithm that can specify any degrees-of-freedom [45] is used to match and register the profiles for direct comparison.

Characterisation of 3D STF
The 3D STF can be calculated by dividing the 3D fringe data of a spherical cap by the corresponding foil function in the spatial frequency domain [see Eq. (1) ]. In implementing the numerical calculation, the window function in Eq. (2) , W ( r ), is defined using a 3D Gaussian function with appropriate widths in the spatial domain to limit the foil function to the spherical cap of interest, and the Dirac delta function is approximated by a one-dimensional (1D) Gaussian function along the surface height direction ( z -direction) and has a sufficiently small width.
The experimentally determined 3D STFs of the CSI instrument obtained by measuring the four spheres are shown in Fig. 2 . To minimise the characterisation error that may be caused by the size uncertainty, asphericity of the sphere [19] or other statistical error sources, we measured the spheres three times at four rotation angles (twelve measure- (1) original CSI measurement, (2-4) CSI measurements modified based on the field-dependent 3D STFs, (5) final result of the inverse-filtered CSI measurement, (6) bandwidth matched and inverse-filtered CSI measurement, (7) mean value of the stylus-measured profiles. (D) Surface height differences (offset by 0.5 m) between CSI-and stylus-measured profiles (8,9,10) and the standard deviation of stylus-measured profiles (11), where the dashed line indicates the 30-nm reproducibility of the stylus measurement. Note that all CSI profiles are calculated using both coherence profile and phase information, referred to as "high-precision CSI profile ". ments for each sphere). The measured 3D fringe data were processed using three different window sizes (see Table 1 ). Subsequently, seventytwo 3D STFs were obtained from the measurements of the A-and B-type spheres, respectively.
The 3D STF is a complex-valued quantity. Its magnitude determines the spatial frequency passband of the CSI, and the peak modulation of the magnitude is located at approximately the spatial frequency 2/ 0 on the k z axis, where 0 is the central wavelength of the light source in air. The 3D STF of an ideal instrument (diffraction-limited) should in principle be rotationally symmetric about the k z axis.
To make it easier to visualise and compare the measured 3D STFs, we evaluate the mean and standard deviation of the in-pupil STF which is calculated by integrating the 3D STF over the axial spatial frequency k z for each lateral spatial frequency k x and k y [ 30 , 35 ]. In this way, the in-pupil STF is similar to the in-pupil (2D) OTF that can be found at the back focal plane of the objective lens [29] .
The magnitude of the experimental 3D STF [ Fig. 2   optical aberrations. The departure and variation of the phase become relatively larger at the edges of the passband but its impact on the measurement result is limited as the corresponding magnitude is small.
The asymmetry in both magnitude and phase is probably caused by the tilt and decentration of the optical components and other asymmetric aberrations in the optical system, and indicates that the optical system would perform differently along different directions in terms of resolution and measurement accuracy.
The standard deviation of the seventy-two 3D STFs obtained using spheres B39 and B44 is plotted in Fig. 2 (M) and (R). The mean values of the standard deviations for the normalised magnitudes and phases of the corresponding in-pupil STFs are 0.004 (normalised value) and 0.06 rad, respectively. That these values are very small provides evidence that the characterisation result is stable and insensitive to the changes of the window function, is independent of the spheres, and the sphere form error is sufficiently small. The main cause of the residual variations in Fig. 2 (M) and (R) may be the result of the linearity of the axial scanning stage and the environmental mechanical vibration.
The 3D STFs that were obtained using spheres A2 and A5 using the same instrument working conditions has a magnitude almost identical to that obtained using the B-type spheres [ Fig. 2 Fig. 2 (T)], much higher than that shown in Fig. 2 (R).
The systematic phase variation in Fig. 2 (T) is mainly caused by an orthogonal anisotropy of the spherical form in the A-type spheres, i.e. the radius of the sphere slightly varies along two orthogonal horizontal directions. This hypothesis was further verified by measuring sphere A2 at four additional rotation angles, and the phase variation pattern in Fig. 2 (U) rotates with the sphere by 45°relative to Fig. 2 (T). This problem is not surprising as the laser-morphing process started with intrinsically asymmetric conditions, such as thermal gradient, asymmetric material geometry and possible asymmetry in the heating profile. From this point, the rest of the experiments were carried out using B-type spheres.

Inverse filtering of 3D PSF
The experimentally characterised 3D STF is used to calculate the inverse filter through phase inversion [see Eq. (3) ]. The 3D impulse response of the instrument to the surface, i.e. 3D point spread function (PSF), can be calculated through the inverse Fourier transform of the 3D STF ( Fig. 3 ). It can be seen that the asymmetry and skewness of the original 3D PSF in both axial and horizontal directions were corrected after applying the inverse filtering. The effects of the aberration compensation on real surface measurement will be shown in Section 4.3 .

Improved surface measurement
The CSI-measured areal surface topography of R521, R527 and R525 are shown in Fig. 4 (A), Fig. 5 (A) and Fig. 6 (A), respectively. The topography is calculated pixelwise using the frequency-domain analysis method [ 1 , 27 ] without any filtering processes that connect phases of neighbouring pixels. The original and inverse-filtered measurement results are compared with the stylus measurements after alignment. We use the profiles at y = 0 for demonstrating the comparisons, as shown in Fig. 4 (C), Fig. 5 (C) and Fig. 6 (C). The CSI-measured profiles extracted from different y positions were also compared. Similar results were obtained and, therefore, are not shown.
Considering that a real optical instrument is never precisely shiftinvariant, the B-type spheres were also placed at two other locations in the field of view, x = ± 60 m (at y = 0), to characterise the 3D STFs locally. We find that three locations (i.e. west, central and east) are sufficient for our purpose of demonstrating the effectiveness of the inverse filtering in this paper. Based on Eqs. (3) and (4) , three corresponding field-dependent inverse filters were calculated and applied to the original CSI fringe data separately to generate three filtered surface measurements, as shown in profiles (2 to 4) of Fig. 4 (C). Compared to the original CSI-measured profile, the measurement errors were effectively removed in the west, central and east regions of the filtered profiles, respectively. Then, the filtered profiles were merged to generate profile (5) by simply joining the corrected regions of profiles (2 to 4), where the boundaries of the three sub-regions were selected at x = ± 30 m, corresponding to approximately 1/3 and 2/3 of the field of view. To make appropriate comparison with the stylus measurement and match the spatial bandwidths of the different instruments [46] , the corrected CSI profile is low-pass filtered with a 2 m cut-off spatial wavelength [see profile (6) of Fig. 4 (C)]. Note that all CSI profiles in Fig. 4 are calculated using coherence profile to determine the fringe order and phase information to refine the surface height measurement [ 1 , 27 ], here referred to as "high-precision CSI profile ". Fig. 4 (D) shows the differences between the CSI and stylus measurements and the standard deviation of the stylus measurements. Profile (8) clearly shows the presence of slope-dependent and 2 errors (due to an incorrect estimation of the fringe order by approximately half the mean wavelength [17] ) in the original CSI measurements. The errors mostly occur at the upward slopes. Small bumps that periodically appears in profile (11) imply that the surface contains irregularities and high roughness in the regions of upward slopes. 2 errors are often removed using post-processing methods, such as phase unwrapping, if the surface is known to be smooth and continuous. However, the performance of such techniques is significantly limited for our surfaces that contain irregular features and roughness on high slopes. Profiles (9) and (10) shows the effective reduction of the errors after inverse filtering. The mean height deviation of profile (10) is 18 nm. As the comparison is made using the mean stylus profile, the deviation is mainly caused by the topographic reproducibility of the manufactured surface, which is of the order of 30 nm.
The slope distribution also shows that the upward slopes are steeper than the downward slopes. In the context of 3D imaging theory, high slopes may correspond to the high lateral spatial frequencies of the 3D STF. Based on an approximation, a 20°slope corresponds to a lateral spatial frequency of 1.22 m − 1 , calculated as (2/ 0 ) × sin(20°), where the magnitude of the in-pupil STF is slightly above 0.2 and the phase deviates from zero by 0.25 rad, as shown in Fig. 2 (V) and(X). Therefore, the fringe contrast is reduced in the high slope region and the fringe pattern is distorted due to optical aberrations.
The same inverse filtering process was used for the case of R527 as shown in Fig. 5 . This surface has a similar maximum slope angle as the R521 case but a pitch of 100 m, corresponding to a spatial frequency of 0.010 m − 1 . Profiles (1) and (2) are the coherence profiles and (3) and (4) show the high-precision CSI profiles. By the nature of the surface reconstruction method in CSI, coherence profiles do not have 2 errors but are sensitive to noise, as the coherence envelope is slowly varying and its width correlates with the coherence length of the light source. It is more precise to determine the surface height using the phase information as the fringe that carries the height information has approximately ten peaks under that coherence envelope.
The coherence profile can be significantly influenced by retrace error, dispersion error [ 20 , 24-27 ] and errors that are induced by other aberrations [see profiles (7) in Fig. 5 (D)], which causes the incorrect estimation of the fringe order and, therefore, cause 2 errors in the highprecision CSI profile [see profiles (9)]. It is evident from Fig. 5 (D) that the inversion of the 3D STF successfully compensates the optical aberrations and corrects the fringe order analysis. Consequently, agreement between the CSI and stylus measurements is improved. The mean height deviation of profile (11) is down to 11 nm. Fig. 6 shows the result for surface R525 which has a maximum slope angle close to the limit of the acceptance angle of the lens determined by the NA. 2 errors appearing in the high slope region are removed, leaving the mean height deviation of profile (5) in Fig. 6 (D) to 13 nm. Fig. 7 shows the CSI measurement of the Ti-6Al-4 V AM surface and the comparison before and after the inverse filtering. Based on the findings obtained from the measurements of sinusoidal surfaces, the difference in the coherence topography [ Fig. 7 (B)] is highly likely to arise from the correction of the slope-and spatial frequency-dependent errors in the original measurement that suffers from optical aberrations. The difference in the high-precision topography is mainly due to the removal of 2 phase jumps through the fringe order correction. Although there is no reference measurement for the AM surface, the observed phenomenon agrees with that concluded from the sinusoidal surface measurements.

Conclusion
The 3D STF is an informative metric for quantitatively evaluating and comparing the performance of an optical surface measuring instrument in the linear regime, including the instrument's response to various slope angles and spatial frequencies. A real optical 3D imaging instrument is never ideal and always exhibits some degree of aberration. Optical aberrations cause retrace errors, dispersion errors, 2 errors and other slope-and spatial frequency-dependent errors in a CSI instrument. Although these errors are well-known and have been corrected to some degree in the past, most of the correction methods are applied to the measured surface height data as post-processing approaches.
We demonstrate here the experimental verification of the foil-model based characterisation of the 3D STF of a CSI instrument, and a practical method for compensating lens aberrations in CSI through phase inversion of the characterised 3D STF. The error correction is carried out at a fundamental level by modifying the raw 3D fringe data prior to surface reconstruction and any post-processing.
Three freeform surfaces with varying slopes and spatial frequencies and an AM surface have been used as case studies to further validate the characterisation and error correction methods. Phase jumps have been largely removed, and the discrepancy between CSI and contact stylus measurement is reduced from a few tens of nanometres to 10 nm across a 170 μm field of view, which is commensurate with the noise floor of the stylus instrument.
Finally, this method may be applied to other 3D imaging modalities, e.g. imaging confocal microscopy and focus variation microscopy, which can also be treated as linear systems and are known to exhibit similar errors when presented with high surface slopes [ 3 , 47 ].

Declaration of Competing Interest
The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.