## Abstract

In this paper, we propose the use of Gaussian radial basis functions (GRBFs) to model the generalized pupil function for phase retrieval. The selection of the GRBF hyper-parameters is analyzed to achieve an increased accuracy of approximation. The performance of the GRBF-based method is compared in a simulation study with another modal-based approach considering extended Nijboer–Zernike (ENZ) polynomials. The almost local character of the GRBFs makes them a much more flexible basis with respect to the pupil geometry. It has been shown that for aberrations containing higher spatial frequencies, the GRBFs outperform ENZ polynomials significantly, even on a circular pupil. Moreover, the flexibility has been demonstrated by considering the phase retrieval problem on an annular pupil.

© 2018 Optical Society of America under the terms of the OSA Open Access Publishing Agreement

## 1. INTRODUCTION

In the phase retrieval (PR) problem, the phase of a complex-valued function is recovered from measurements of the magnitude of its Fourier transform. This inverse problem has many different applications in optical imaging; see Ref. [1] for a contemporary overview. Algorithmic PR-based optical wavefront reconstruction offers an attractive means of estimating the complex generalized pupil function (GPF) from a set of measurements of the point-spread functions (PSF) in adaptive optics due to its experimental simplicity [1,2]. Moreover, other additional optical components, such as beam splitters and wavefront sensors, are not necessary, avoiding problems related to non-common-path errors and a loss in observed light intensity.

PR algorithms can be divided into two subcategories. The classical and still most implemented class of algorithms is the alternating projection (AP) methods, pioneered by Gerchberg and Saxton [3] and Fienup [4]. Recently, optimization-based algorithms representing PR as a matrix completion problem have been developed [5–7]. The solution requires solving a matrix rank minimization problem, which is non-deterministic polynomial-time (NP)-hard. A convex relaxation was proposed using the trace norm as a convex surrogate to the rank operator, approximating the problem with a semi-definite program. More recently, another optimization-based approach to solve the PR problem was presented in Ref. [8]. This algorithm is shown to be superior in terms of computational complexity, making it more suitable for larger-scale PR problems. Both classes of algorithms use multiple images at different defocus planes in order to resolve non-uniqueness issues. This technique improves the stability by incorporating extra information in the intensity measurements [2] and is one possible implementation of the more general concept of structured illumination (see, e.g., [5]). A superiority in terms of convergence toward a unique solution and stability for noisy measurements makes the convex optimization-based approaches an interesting alternative to the AP methods [5,9]. Moreover, these algorithms solve the PR problem by explicitly minimizing a cost function, making it easier to introduce structures such as sparsity.

The standard approach in both classes of algorithms is to aim for the recovery of the complete GPF in a pixel basis, such that the measured PSF is the magnitude of the two-dimensional (2D) Fourier transform of the signal to be recovered. Exploiting the computational efficiency of the fast Fourier transform (FFT), AP methods can be implemented very efficiently. However, the large number of variables corresponding to the pixel-wise representation are problematic for the optimization-based algorithms, making them only suitable for small-scale applications. In this paper, we reduce the number of variables by modeling the GPF as a linear combination of modes as an alternative to the zonal pixel-by-pixel model. This approach was shown to be promising for the adaptive optics application [10], allowing the use of optimization-based PR on a conventional computer. A trade-off between approximation accuracy of the modal basis and computational effort defines the required number of modes to be used.

The complex-valued Zernike polynomials introduced as a consequence of the extended Nijboer–Zernike (ENZ) theory [11,12] formed the chosen basis in Ref. [10]. The major limitation of the global ENZ polynomial representation is that each term extends its influence over a circular pupil, making it inflexible with respect to the pupil geometry. The Zernike theory can be adapted to other pupil geometries. However, this requires a complex reformulation of the basis for every different pupil. Moreover, they are subject to Runge’s phenomenon, leading to oscillations on the edges of the domain. Recently, GPF approximation based on Gaussian radial basis functions (GRBFs) was used for semi-analytic evaluation of the diffraction integral as an alternative to ENZ polynomials. An improvement in terms of complexity, accuracy, and execution time was achieved [13]. An important feature of the GRBF is the almost local character of each function. Since the width and location of the GRBF are free to choose for each basis function, it offers a more intuitive basis to represent the GPF that is easier to implement for any arbitrary aperture geometry. This creates an increased flexibility to the geometry of the pupil function and the possibility to model local details and sharp features compared to ENZ polynomials.

This paper is concerned with the application of GRBFs as a modal decomposition of the GPF as an alternative for ENZ polynomials. The choice of several hyper-parameters that define the shape and placement of the GRBF are investigated. The relation between the numerical conditioning and the accuracy of the solution to PR problems is important in practical implementations [2,14]. When the standard representation is ill-conditioned, algorithms such as RBF-QR [15] have been proposed to transform the GRBFs into a well-conditioned basis. Therefore, this aspect of conditioning is not evaluated in this paper. To test the performance of the new method, PR simulations are performed. Two types of aberrations are considered. First, aberration data is generated from a Zernike polynomial basis with its coefficients sampled from an assumed distribution based on empirically determined correction capabilities of a deformable mirror (DM) [10]. Second, aberrations corresponding to the correction capabilities of a higher-order DM are derived experimentally to create a phase disturbance with higher spatial frequencies. The PSF is simulated at multiple planes along the optical axis, introducing phase diversity in terms of defocus. The two different classes of basis functions, GRBFs and ENZ polynomials, are compared in terms of their theoretical fitting accuracy and performance in modal-based PR algorithms.

The structure of the paper is as follows. The formulation of the modal-based PR problem as an optimization problem is presented in Section 2. An overview of the different basis functions used to approximate the GPF is also contained in this section. The aberration data generation and simulation experiment design are discussed in Section 3. The theoretical GPF fitting accuracy for the GRBFs, including the tuning of the hyper-parameters, is explained in Section 4. The simulation results for aberration retrieval for a number of different cases are presented in Section 5. Finally, the conclusions are drawn in Section 6.

## 2. MODAL-BASED PHASE RETRIEVAL

A mathematical formulation of the PR problem is briefly presented in this section. The effects of aberrations on an optical system can be modeled using the GPF. The GPF is a complex function [2]:

where $A(\xb7)$ and $\mathrm{\varphi}(\xb7)$ are real-valued functions that denote the amplitude apodization function and phase aberration, respectively, and $(\rho ,\theta )$ are the normalized polar coordinates on the exit pupil plane. Under the assumption of purely phase aberrated systems with circular exit pupils, $A(\rho ,\theta )$ is modeled as a characteristic function of unity values inside the pupil and zero outside. The field in the focal plane is related to that in the exit pupil by the following integral:A more concrete formulation of the PR problem requires a convenient and systematic parameterization of the GPF. The most flexible parameterization is a pixilation of the pupil, as it can be used with any pupil geometry. However, the pixel basis requires a large number of parameters to be identified using PR. The large number of variables is problematic for the optimization-based algorithms, since they cannot exploit the computational efficiency of the FFT, as is done by AP algorithms. Parameterizations based on approximating the GPF as a linear superposition of a small number of basis functions reduces the size of the problem dramatically, since it requires estimation of just a complex scalar coefficient for each of the basis functions. The introduction of this modal decomposition allows the use of the computationally demanding optimization-based algorithms on a conventional computer [10]. Next, two different modal representations are presented.

#### A. Extended Nijboer–Zernike Polynomials

The representation of phase aberration $\mathrm{\varphi}$ in terms of Zernike polynomials was generalized to represent the GPF under the ENZ theory [11]. The GPF is approximated as a truncated series of ENZ polynomials [12],

#### B. Gaussian Radial Basis Functions

Alternatively, the pupil function can be approximated by a linear combination of GRBFs [13]. The complex GPF is approximated by a real-valued, radially symmetric GRBF,

#### C. Phase Retrieval as an Optimization Problem

Both modal representations in Eqs. (4) and (5) can be expressed in the following form:

Due to the linearity property of the diffraction integral in Eq. (2), the predicted PSF is a linear combination of transformed basis functions weighted by the same coefficients as the GPF. This transformation is performed using the 2D discrete Fourier transform (DFT) denoted by $\mathcal{F}\{\xb7\}$. A sampled representation of $U$ is represented on an ${N}_{u}\times {N}_{u}$ grid, where ${N}_{u}=D{N}_{p}$, $D\ge 1$ being a constant related to the diffraction limit of the optical system. The increase in dimensions ${N}_{u}-{N}_{p}$ is computationally realized by zero-padding of the GPF before taking the 2D-DFT. For an image at a position along the optical axis corresponding to a defocus parameter of ${f}_{d}$, the estimated complex image ${\widehat{U}}_{d}$ can be written as

where ${C}_{d,k}=\mathcal{F}\{{B}_{k}\odot {P}_{d}\}\in {\mathbb{C}}^{{N}_{u}\times {N}_{u}}$, $\odot $ represents the element-wise product, and ${P}_{d}$ is the defocus function $\mathrm{exp}(i{f}_{d}{\rho}^{2})$ sampled on the same ${N}_{p}\times {N}_{p}$ grid as the basis functions extended with the correct zero-padding. Also, the modal decomposition of the complex image ${U}_{d}$ can be represented as a matrix-vector multiplication, i.e., we define the vectorization of ${\widehat{U}}_{d}$ as ${\widehat{\mathbf{u}}}_{d}\in {\mathbb{C}}^{{N}_{u}^{2}}$, such that with the $k$th column of ${C}_{d}\in {\mathbb{C}}^{{N}_{u}^{2}\times {N}_{\alpha}}$ containing the vectorized representation of ${C}_{d,k}$. Finally, the estimated intensity measurement (PSF) is given byThe PR problem is formulated in this paper as the minimization of the error between the measurements ${\mathbf{y}}_{d}$ and the estimated PSF ${\widehat{\mathbf{y}}}_{d}$, leading to the following optimization problem:

## 3. SIMULATION DESIGN

This section discusses the simulations that will be performed to analyze the advantage of using GRBFs over ENZ polynomials. By considering their advantages and disadvantages, as outlined in the introduction, we expect to show an improvement of GRBFs over ENZ polynomials for several cases. First of all, GRBFs are per definition more flexible to different pupil geometries, since ENZ polynomials are defined over the unit disk only. Moreover, it is expected that the GRBF representation is more suitable to fit higher spatial frequencies in the GPF. To validate this, we will test the PR problem on both low-order and high-order aberrations. The generation of both phase types is discussed below. Finally, the implementation details for the performed simulation experiments are presented.

#### A. Generation of Low-Order Aberrations

For the generation of aberrations containing only lower spatial frequencies, the phase is represented in terms of Zernike polynomials:

where the Zernike polynomials ${\mathcal{Z}}_{n}^{m}$ are defined in Appendix A, and the coefficients ${\zeta}_{n}^{m}$ are drawn from an assumed distribution. The distribution is based on the experimentally derived correction capabilities of a low-order membrane DM [10], which followed approximately an exponential decrease in the values for ${\zeta}_{n}^{m}$ for increasing radial orders. The total number of Zernike terms considered is denoted by ${N}_{z}=({n}_{z}+1)({n}_{z}+2)/2$, where ${n}_{z}$ is the maximum radial order considered. In the following, ${N}_{z}=66$, i.e., we consider Zernike polynomials up to the tenth radial order. Moreover, ${\zeta}_{0}^{0},{\zeta}_{1}^{-1},{\zeta}_{1}^{1}=0$, i.e., the piston and tip–tilt modes are not included. The remaining 63 coefficients are vectorized after ordering them by increasing the radial order (Noll’s sequential index) into $\mathit{\zeta}$. The standard deviation of the normal distribution generating the $k$th index ${\zeta}_{k}$ is computed as ${c}_{l}\text{\hspace{0.17em}}\mathrm{exp}(k)$, where ${c}_{l}$ is a scaling factor to control the amplitude of the aberration. An example of such a generated wavefront is shown in Fig. 1(a).#### B. Generation of High-Order Aberrations

For the generation of aberrations with higher spatial frequencies, a similar experiment as in Ref. [10] is repeated for a high-order DM, having ${N}_{m}=952$ actuators (Boston Micromachines KiloDM [16]). The control signal to each of the actuators ${u}_{i}$ is collected into the vector $\mathbf{u}\in {\mathbb{R}}^{{N}_{m}}$. Because of the large number of actuators, an accurate Zernike representation of the wavefront would require too many parameters. Therefore, the DM influence matrix $H\in {\mathbb{R}}^{{N}_{s}\times {N}_{m}}$ is identified such that it satisfies the relation $\mathbf{s}=H\mathbf{u}$, where $\mathbf{s}\in {\mathbb{R}}^{{N}_{s}}$ contains all the local slopes in the wavefront measured with a high-resolution Shack–Hartmann wavefront sensor (${N}_{s}=42632$). For the identification of matrix $H$, a set of 2000 random vectors ${\tilde{\mathbf{u}}}_{1},\dots ,{\tilde{\mathbf{u}}}_{2000}$ are drawn from a normal distribution, and corresponding measurements ${\tilde{\mathbf{s}}}_{1},\dots ,{\tilde{\mathbf{s}}}_{2000}$ are collected. The matrix $H$ is identified, enforcing a sparsity pattern in the matrix, such that the number of non-zero elements is 14.01% of the total number of elements. The accuracy of the identification is very sensitive to the measurement noise of the sensor and optical misalignments in the experimental setup. After a careful calibration, the identification of $H$ resulted into an average variance accounted for (VAF) [17], defined as

#### C. Approximating the Generalized Pupil Function

To quantify the theoretical accuracy for each basis to fit the GPF, the least-squares error approximating a given GPF is considered. The aberration $\mathrm{\varphi}$ is generated as discussed in Sections 3.A and 3.B on an ${N}_{p}\times {N}_{p}$ grid. Similar to Eq. (9), a sampled representation of the true GPF can be defined as a vector $\mathbf{p}\in {\mathbb{C}}^{{N}_{p}^{2}}$. By solving the following complex least-squares problem,

Besides using this experiment to show the theoretical accuracy to fit the GPF, the method in this paragraph is used to tune the GRBF hyper-parameters in the next section. In principle, the RMS error of the PSF fit obtained by solving the PR problem can also be used. However, since this is much more computationally demanding than computing the least-squares fit of the GPF directly, it would be too time consuming and is therefore not considered in this paper.

#### D. Phase Retrieval Experiment

The PR problem defined in Eq. (13) is solved using the COPR algorithm [8]. First, the PSF data is simulated by taking the 2D-FFT of the GPF corresponding to the simulated aberration $\mathrm{\varphi}$ as discussed in Section 2 for $D=2$. Four diversity images at ${f}_{1}=0$, ${f}_{2}=-1$, ${f}_{3}=2$, and ${f}_{4}=-3\text{\hspace{0.17em}}\mathrm{rad}$ are computed and vectorized into ${\mathbf{y}}_{i},\phantom{\rule{0.265em}{0ex}}i=1,2,3,4$. A Monte Carlo experiment solving the PR problem for 25 different aberration realizations is performed for a certain combination of ${N}_{\alpha}$ and aberration type (low-/high-order).

From the solution of the PR problem, we obtain a solution $\widehat{\mathit{\alpha}}$. An estimate of the PSF and GPF is obtained via ${\widehat{\mathbf{y}}}_{i}={C}_{i}\widehat{\mathit{\alpha}}$ and $\widehat{\mathbf{p}}=B\widehat{\mathit{\alpha}}$, respectively. The normalized RMS error (RMSE) of the PSF and phase will be used as a scalar quantity to express the accuracy. One major difficulty in comparing the phase is caused by the fact that the PR solution provides an estimate up to a constant offset (piston), and each pixel is wrapped on the range $[-\pi ,\pi ]$. This is solved by extracting the phase of the estimated GPF, unwrapping it using a 2D phase unwrapping algorithm [19], and removing the piston. Similar to Eq. (18), the real-valued normalized RMSE of the phase is defined as

## 4. FITTING ACCURACY OF GRBFs

The increased flexibility of the GRBF follows directly from the introduced freedom in terms of its hyper-parameters. Each single GRBF has two parameters: its center location pair $({\varrho}_{k},{\theta}_{k})$ and shape parameter ${\lambda}_{k}$. Together they define the shape and location of the GRBF in the pupil plane. If they would be chosen independent from each other, they would introduce $2{N}_{\alpha}$ hyper-parameters to the PR problem. Estimating them is a highly non-linear problem usually solved by cross-validation [13]. In this section, by using their physical interpretation in the imaging application, we propose to reduce the number of parameters to one single shape parameter $\lambda $ and a predefined node distribution.

#### A. Node Distribution

Instead of choosing the center $({\varrho}_{k},{\vartheta}_{k})$ of each basis function separately, a number of fixed configurations are considered. In this way, the centers are no longer a hyper-parameter to be determined. Since we assume to have no specific *a priori* knowledge of the GPF, we are looking for a general distribution that is able to fit any generic GPF realization. There are many regular and quasi-random grids that can work as a suitable node distribution. Examples are a rectangular grid with equally spaced points, a Halton-points-based grid generated from quasi-random number sequence [20], and a planar Fibonacci grid defined using a spiral represented in polar coordinates, i.e., for the $k$th point [14],

The Fibonacci grid has been proved to be a competitive and robust choice when the shape parameter is optimally chosen [14]. For completeness, the simulations in this paper have been implemented for all three different grids in Fig. 2. This showed a performance that is similar for all grids, but slightly in favor of the Fibonacci configuration. Therefore, only the Fibonacci configuration is included in the results of this paper.

#### B. Shape Parameter

The choice of shape parameter is significant, as it affects numerical stability, accuracy of fit, and speed of convergence. The practical design of the shape parameter is data dependent, in that it depends on the variance of wavefront aberration and its spatial frequency content as well. As the data of the GPF is not available beforehand, it is desirable to find a systematic empirical approach of shape parameter selection. To reduce the number of hyper-parameters, a single constant $\lambda $ is assumed for each GRBF. Moreover, especially for the regular grids (rectangular and Fibonacci), a constant $\lambda $ is a reasonable assumption when there is no *a priori* knowledge of the GPF.

To determine the value of the parameter $\lambda $, we compare the RMS of the approximation error for different values of $\lambda $ with the method discussed in Section 3.C. First of all, since the selection of the hyper-parameter is dependent on the chosen node distribution and the total number of nodes, the influence of $\lambda $ is shown for different values of ${N}_{\alpha}$. Moreover, as it is shown to depend on the type of aberration, the test is repeated for both the low-order and high-order aberrations discussed in Sections 3.A and 3.B. Figure 3 shows ${\u03f5}_{p,LS}$, as defined in Eq. (17), for various combinations of $\lambda $ and ${N}_{\alpha}$ on the Fibonacci grid. It is clear that both for the low-order and high-order aberration, the trend is very similar. Both start with a steep increase in performance by increasing $\lambda $ up to a value that is dependent on ${N}_{\alpha}$. At a certain point, which we will denote by ${\lambda}^{*}$, the steep descend turns into a more constant and smoother curve. This point, indicated by the asterisks in Fig. 3, is the same for both the low-order and high-order aberrations and seems to be depending only on ${N}_{\alpha}$. However, where the low-order aberration ${\u03f5}_{p,LS}$ starts to increase immediately, it still slightly decreases for the high-order aberration. As can be seen in Fig. 3, the optimal value of $\lambda $, ${\lambda}_{\text{opt}}$, is in the range of 1 to 10 for the low-order and between 10 and 40 for the high-order aberrations.

In practice, the nature of the GPF is unknown, and one does not have a set of GPF with the same statistical properties as the one to be estimated. This makes the optimal value of $\lambda $ more difficult to find. However, ${\lambda}^{*}$ can be used as a lower bound to the selection of $\lambda $, and it can be derived from knowing only the GRBF center locations. It is shown that ${\u03f5}_{p,LS}$ is not very sensitive for choosing $\lambda $ larger than ${\lambda}^{*}$. Therefore, it is a safe choice to select $\lambda >{\lambda}^{*}$, depending on the desired smoothness of the reconstruction of the wavefront.

As pointed out in Section 2, the basis can become severely ill-conditioned when $\lambda \to 0$. This should be kept in mind when selecting the value of $\lambda $ when the number of the basis function is small. In this case, it is advised to choose $\lambda \gg {\lambda}^{*}$ to avoid problems while solving the PR problem. One can use the RBF-QR algorithm [15] to improve the conditioning and transform the obtained coefficients back into the original basis. As the focus of this paper is on the high-order aberrations with a relatively large amount of basis functions, this has not been implemented. The value of $\lambda $ during the PR simulations was increased manually when the found ${\lambda}_{\text{opt}}$ caused problems regarding ill-conditioning.

#### C. Comparison to ENZ Polynomials

After ${\lambda}_{\text{opt}}$ is selected for the chosen node distribution, the fitting accuracy can be compared to that of ENZ polynomials. The mean phase approximation errors ${\u03f5}_{\varphi ,LS}$ for both the low-order and high-order aberrations are summarized in Table 1. From Table 1, we can conclude that the mean values of ${\u03f5}_{\varphi ,LS}$ indicate a higher fitting accuracy of GRBF over ENZ polynomials on average. It should be mentioned that the variance over the Monte Carlo draws was found to be approximately within 10% of the mean values for high-order aberrations, but was much more significant for low-order aberrations with values of the same order of magnitude as its mean. A more comprehensive analysis discussing the importance of this large variance is included in Section 5. Moreover, the final value of ${\u03f5}_{\varphi ,LS}$ for the high-order aberration is still significant with a minimum of 0.11 for ${N}_{\alpha}=275$. This should be kept in mind when performing the PR simulations. The performance shown here gives a theoretical minimum of the error for each specific set of basis functions. Because the PR simulation will use the RMS of the phase error [${\u03f5}_{\varphi}$ in Eq. (19)] as a measure, we have only presented the theoretical minimal phase errors ${\u03f5}_{\varphi ,LS}$ is this section. The obtained errors from the PR simulation will be compared to the values in this table to validate if the algorithm has converged to the optimal solution. A similar table can be made for ${\u03f5}_{p,LS}$, but it is not included here since it shows an equivalent trend.

## 5. PHASE RETRIEVAL SIMULATION RESULTS

As discussed in Section 3, a simulation is performed to analyze the performance of the different basis functions to the PR problem. In this section, a number of cases will be considered that demonstrate the advantages of using GRBFs in modal-based PR. For each combination of ${N}_{\alpha}$ and aberration type, an experiment, as described in Section 3.D, is performed to find the value of $\lambda $ that gives the best fit in the least-squares sense. The scaling constants ${c}_{l}$ and ${c}_{h}$ introduced in Sections 3.A and 3.B are chosen, such that the average RMS value of $\mathrm{\varphi}$ in the Monte Carlo simulation $\mathrm{RMS}(\mathrm{\varphi})\approx 0.75$ is for both low- and high-order aberrations. The performance of the method for higher values of $\mathrm{RMS}(\mathrm{\varphi})$ will be briefly discussed in the following paragraph.

#### A. Low- and High-Order Aberrations

To show the performance of the GRBFs for aberrations containing different spatial frequencies, the PR problem is solved for both the low- and high-order aberrations. The simulation results when considering only low-order aberrations are visualized in Figs. 4(a) and 4(c). A clear decrease of the normalized RMSE is visible for both the PSF and phase, as the number of used basis functions increase. Both the ENZ polynomials and GRBFs obtain a very accurate fit, approaching the theoretical optimum of Table 1. The variance over the multiple draws in the Monte Carlo simulation is relatively large, such that both methods lead to a roughly equivalent performance.

The PR simulation results for the high-order aberrations are shown in Figs. 4(b) and 4(d). The GRBFs still approximate the theoretical value of Table 1 quite closely. On the other hand, the ENZ polynomials fit starts to deviate more from the theoretical minimum when more basis functions are considered. This phenomenon together with the much less significant variance than in the low-order aberration case make the differences appear much clearer. The decrease in performance from the theoretical minimum indicates that the PR algorithm is less able to converge to the optimal solution when ENZ polynomials are used.

To investigate the performance of the method for higher phase amplitudes, the PR simulations for both the low-order and high-order aberrations are repeated for a higher value of $\mathrm{RMS}(\mathrm{\varphi})$. Figure 5 shows the normalized RMS phase error ${\u03f5}_{\varphi}$ for $\mathrm{RMS}(\mathrm{\varphi})\approx 1.5\text{\hspace{0.17em}}\mathrm{rad}$. All other conditions are kept the same as in the experiment above, such that they can be compared to Figs 4(a) and 4(b), where $\mathrm{RMS}(\mathrm{\varphi})\approx 0.75$. Both errors increase when $\mathrm{RMS}(\mathrm{\varphi})$ increases. The same improving trend in the performance is visible when using more basis functions.

From this analysis, the GRBFs appear most beneficial when approximating aberrations containing high spatial frequencies with a relatively large amount of basis functions. An example of such an approximation is shown in Fig. 6 for ${N}_{p}=128$ and ${N}_{\alpha}=377$. One thing that stands out when comparing the estimations with GRBFs and ENZ polynomials are the ringing artifacts that appear when using ENZ polynomials. Since these rings are a consequence of the PR solution and do not appear in the least-squares approximation, they cause a gap between the theoretical value of Table 1 and the obtained PR solution when using ENZ polynomials.

#### B. Non-Circular Aperture

An important property of the GRBF is its independence on the pupil geometry. Since each basis function can be centered around an arbitrary location on the pupil, it is possible to concentrate the information on any specific shape. In contrast, ENZ polynomials are defined on only the unit circle. Although the Zernike theory can be adapted for other pupil geometries, it requires complex theoretical reformulation (see, e.g., [12]). The GRBFs provide a much more simpler implementation, in which the user can locate the basis functions. As a result, the basis can be easily adapted to any arbitrary shape without needing any complex theory.

To demonstrate the advantage of this locality, an extreme case is considered, in which an annular pupil is defined with a unity outer radius and an inner radius of 0.7. The centers of the GRBFs are located on a ring with an inner radius of 0.65 and an outer radius of 1.05 following the Fibonacci node distribution. Compared to the circular aperture, the number of non-zero pixels in the GPF has decreased. Therefore, it would be expected that when the same number of basis functions are considered, the normalized error should decrease. The PR results for this annular aperture are summarized in Fig. 7, showing that the difference in performance between GRBFs and ENZ polynomials is more significant than in the same situation with the circular aperture (recall Fig. 4). The normalized error for the GRBF has indeed decreased compared to the circular aperture. Because the ENZ polynomials have not been redefined on the new pupil, the error for the ENZ basis has increased significantly. This demonstrates the advantage that GRBFs have on non-circular apertures. An explanation for this decrease in performance when using ENZ polynomials becomes apparent when looking at an example of the retrieved phase in Fig. 8. Note how the estimate using GRBFs is more detailed, but the estimate corresponding to the ENZ polynomial basis shows that the oscillations around the edges have become more significant due to the thin aperture shape.

#### C. Gaussian Measurement Noise

Finally, zero-mean white Gaussian noise is added to the simulation measurements ${\mathbf{y}}_{i}$ to consider the robustness of the estimation with respect to noise. Since the intensity measurements are per definition positive, negative values in the simulated measurement are truncated to zero. For the conciseness of this paper, only a single case regarding a low-order aberration is considered on a circular aperture, and ${N}_{\alpha}=65$ basis functions are used. The results are shown in Fig. 9. The noise is sampled from a single zero-mean Gaussian distribution, and the signal-to-noise ratio (SNR) is defined with respect to the average power of the image ${\mathbf{y}}_{i}$. The noise affects the estimate for both the ENZ and GRBF basis similarly for higher SNR. For an SNR of 5–10 dB, the ENZ polynomials give a normalized error higher than one, implying a completely inaccurate estimate.

## 6. CONCLUSION

The problem of reconstructing phase aberrations using a modal approach for optimization-based PR algorithms has been considered in this paper. The otherwise too computationally demanding optimization-based algorithms [5,8] can be implemented on a standard desktop computer in this modal-based framework [10]. In this paper, the application of GRBFs to model the GPF has been explored as an alternative to the existing ENZ polynomials [10,11]. Because of its computational efficiency, the COPR algorithm [8] is used to solve the PR problem. One important advantage of GRBFs is the increased flexibility introduced by user-defined hyper-parameters determining the location and shape of each basis function. The number of hyper-parameters is reduced to a single parameter describing the size of a single GRBF by assuming a predefined distribution of the centers. Guidelines have been proposed to find the hyper-parameter that leads to the best fit. It was shown that the obtained basis using GRBFs is better able to approximate the GPF than ENZ polynomials. Moreover, the solution to the PR problem has been considered for both the GRBF and ENZ polynomial basis. Simulations have shown that GRBFs are significantly better to approximate aberrations that contain higher spatial frequencies. The increased flexibility of GRBFs has been demonstrated by solving the PR problem for an annular pupil. Finally, the robustness to Gaussian measurement noise was also in favor of GRBFs, showing a lower noise sensitivity.

## APPENDIX A: REAL AND COMPLEX-VALUED ZERNIKE POLYNOMIALS

The phase aberration $\mathrm{\varphi}$ can be analyzed by the orthogonal set of basis functions formed by the circle polynomials ${Z}_{n}^{m}$ introduced by Zernike,

where indices $n\in {\mathbb{N}}_{0}$ and $m\in \mathbb{Z}$, respectively, denote the radial order and the azimuthal frequency of the Zernike polynomial ${\mathcal{Z}}_{n}^{m}$, such that $n-|m|>0$ and even. The polynomials are given by the product of a radial polynomial ${R}_{n}^{|m|}(\rho )$ and a trigonometric function ${\mathrm{\Theta}}_{n}^{m}(\theta )$ with suitable normalization ${c}_{n}^{m}$,## Funding

Seventh Framework Programme (FP7) (2007-2013); H2020 European Research Council (ERC) (339681).

## REFERENCES

**1. **Y. Shechtman, Y. C. Eldar, O. Cohen, H. N. Chapman, J. Miao, and M. Segev, “Phase retrieval with application to optical imaging: a contemporary overview,” IEEE Signal Process. Mag. **32**(3), 87–109 (2015). [CrossRef]

**2. **D. R. Luke, J. V. Burke, and R. G. Lyon, “Optical wavefront reconstruction: theory and numerical methods,” SIAM Rev. **44**, 169–224 (2002). [CrossRef]

**3. **R. W. Gerchberg, “A practical algorithm for the determination of the phase from image and diffraction plane pictures,” Optik **35**, 237–246 (1972).

**4. **J. R. Fienup, “Reconstruction of an object from the modulus of its Fourier transform,” Opt. Lett. **3**, 27–29 (1978). [CrossRef]

**5. **E. J. Candes, Y. C. Eldar, T. Strohmer, and V. Voroninski, “Phase retrieval via matrix completion,” SIAM Rev. **57**, 225–251 (2015). [CrossRef]

**6. **Y. Chen and E. Candes, “Solving random quadratic systems of equations is nearly as easy as solving linear systems,” in *Advances in Neural Information Processing Systems* (2015), pp. 739–747.

**7. **I. Waldspurger, A. d’Aspremont, and S. Mallat, “Phase recovery, maxcut and complex semidefinite programming,” Math. Program. **149**, 47–81 (2015). [CrossRef]

**8. **R. Doelman, H. T. Nguyen, and M. Verhaegen, “Solving large-scale general phase retrieval problems via a sequence of convex relaxations,” arXiv:1803.02652 (2018).

**9. **H. H. Bauschke, P. L. Combettes, and D. R. Luke, “Phase retrieval, error reduction algorithm, and Fienup variants: a view from convex optimization,” J. Opt. Soc. Am. A **19**, 1334–1345 (2002). [CrossRef]

**10. **J. Antonello and M. Verhaegen, “Modal-based phase retrieval for adaptive optics,” J. Opt. Soc. Am. A **32**, 1160–1170 (2015). [CrossRef]

**11. **A. J. Janssen, “Extended Nijboer–Zernike approach for the computation of optical point-spread functions,” J. Opt. Soc. Am. A **19**, 849–857 (2002). [CrossRef]

**12. **S. Van Haver, “The extended Nijboer–Zernike diffraction theory and its applications,” Ph.D. thesis (Delft University of Technology, 2010).

**13. **A. Martinez-Finkelshtein, D. Ramos-Lopez, and D. Iskander, “Computation of 2D Fourier transforms and diffraction integrals using Gaussian radial basis functions,” Appl. Comput. Harmon. Anal. **43**, 424–448 (2017). [CrossRef]

**14. **M. Maksimovic, “Optical design and tolerancing of freeform surfaces using anisotropic radial basis functions,” Opt. Eng. **55**, 071203 (2016). [CrossRef]

**15. **B. Fornberg, E. Larsson, and N. Flyer, “Stable computations with Gaussian radial basis functions,” SIAM J. Sci. Comput. **33**, 869–892 (2011). [CrossRef]

**16. **Boston Micromachines Corporation, 2018, http://www.bmc.bostonmicromachines.com/pdf/Kilo-DM.pdf.

**17. **M. Verhaegen and V. Verdult, *Filtering and System Identification: A Least Squares Approach* (Cambridge University, 2007).

**18. **F. Roddier and C. Roddier, “Wavefront reconstruction using iterative Fourier transforms,” Appl. Opt. **30**, 1325–1327 (1991). [CrossRef]

**19. **M. A. Herráez, D. R. Burton, M. J. Lalor, and M. A. Gdeisat, “Fast two-dimensional phase-unwrapping algorithm based on sorting by reliability following a noncontinuous path,” Appl. Opt. **41**, 7437–7444 (2002). [CrossRef]

**20. **L. Kocis and W. J. Whiten, “Computational investigations of low-discrepancy sequences,” ACM Trans. Math. Softw. **23**, 266–294 (1997). [CrossRef]