Experimental Description

The start of operations of Free electron laser both in the Extreme UV1,2 and in the hard X-ray regime3,4,5 has created sources of unmatched brilliance, that are advancing many scientific fields at a rapid pace (see6,7 and references therein). A complete focal characterization in both intensity and phase is of crucial importance in application such as coherent diffractive imaging8, non-linear x-ray optics and high field physics, and single molecule imaging where the highest X-ray intensities are sought.

A standard technique currently used involves evaluating the size of damage craters created by the focused X-ray beam in a target9. While this method has the advantage that it measure the whole intensity profile (i.e. both the coherent and incoherent part), it requires a time consuming post mortem analysis of many such imprints, is not an in-situ method, and has limited spatial resolution. Scanning coherent diffraction microscopy or ptychography has been successfully used to characterise a focused X-FEL beam10. However, ptychography requires a 2D motorized translation stage with approximately 10 nm resolution and a beam pointing stability of the same order, which is not always available. Alternatively, interferometric methods using shearing interferometry have been pursued both at Free electron laser facilities11 and at synchrotron facilities12,13. Here we present a method to fully determine the focus of an X-FEL using Ronchi shearing interferometry. Ronchi testing has a long history in characterizing the quality of focusing optics in optical wavelengths14. It has more recently been used to qualitatively evaluate the X-ray optics at both synchrotron facilities15 and at X-ray Free Electron Lasers16. In this paper we show a full characterization of the amplitude and phase of a nano-focused X-FEL beam using Ronchigrams.

The experiments were performed at the Coherent X-ray Imaging instrument (CXI)17,18 beamline at the Linac Coherent Light Source (LCLS). The CXI instrument has a pair of highly polished Kirkpatrick-Baez (KB) mirrors19 coated with Silicon Carbide20 to focus the beam to a theoretical minimal spot size of 90 nm by 150 nm17,21. In contrast to the beamlines that use Beryllium lenses to create a focus, it doesn’t suffer from chromatic abberation and its aperture is large enough to capture the full beam. Therefore, it routinely creates the highest peak X-ray intensities of the facility, estimated to be in the order of 1 × 1020 W/cm2. It has been used in many fluence dependent experiments such as the formation of hollow atoms22, anomalous nonlinear X-ray Compton scattering23, and radiation damage studies on protein microcrystals24. In the experiment presented here, the LCLS beam, with a photon energy of 7.2 keV was focused with the KB-mirror pair, which has focal lengths of 900 mm in the horizontal direction, and 500 mm in the vertical direction. A one dimensional diffraction grating, (i.e. the Ronchi target) is placed 9.3 mm downstream of the X-ray focal plane. An X-ray detector is placed 982 mm downstream of the Ronchi target. A conceptual sketch of the setup can be seen in Fig. 1.

Figure 1
figure 1

Conceptual sketch (not to scale) of the setup. The period of the Ronchi grating is chosen such that order +1 and −1 do not overlap, while maintaining as large an overlap between order 0 and the first orders. Only the 0 and +1 orders are shown for clarity.

Ronchi gratings were fabricated on 4 μm thick polished diamond membranes (Diamond Materials GmbH). An 8 nm layer of Ti was evaporated on the diamond, and 150 nm hydrogen silsesquioxane (HSQ) resist was spun on top of the Ti. Electron beam lithography was performed using a 100 keV beam with doses ranging from 2200–2600 μC/cm2. The gratings were then developed in 25% wt tetramethyl ammonium hydroxide (TMAH) for 100 seconds and rinsed with isopropyl alcohol and deionized water. Transfer of the HQ grating pattern into diamond was performed using reactive ion etching. A 15 second titanium etch using chlorine was used to remove the Ti layer. The diamond was then etched for 50 minutes using an O2/Ar plasma (33/17 sccm, 10 mTorr, RIE power = 100 W) until the etch depth reached 1.1 μm. Using atomic layer deposition (ALD), 78 nm platinum was deposited conformally to fill the diamond gratings.

The Ronchi target functions as a diffraction grating for the incoming, focused X-rays. The spatial frequency of the grating is chosen such that the first orders overlap with the fundamental, but do not overlap with each other. The best configuration is attained when the diffraction angle is half of the full-angle divergence of the focused X-ray beam. Indeed, for a larger diffraction angle the overlap is less, and there is a central part of the beam for which there is no interference data available, and therefore the phase will not be determined by the measurement in this area. On the other hand, if the diffraction angle is too small, the +1 and −1 orders will overlap, interfere with each other and not only with the zeroth order, and the phase recovery method will not work. When the spatial period of the grating equals 2f # λ, with f # the f-number of the optic and λ the wavelength of the X-rays, the ideal overlap between the first orders and the zeroth order is attained. The zeroth and first order interfere and cause a fringe pattern on the detector. Figure 1 shows that this pattern arises from the interference of two sources that emit spherical wavefronts: the focus of the zeroth order, and the (virtual) focus of the first order. The fringes are therefore analogous to those of Young’s double slit experiment, and it can easily be shown that the phase difference between the zeroth order and first order changes linearly with x according to

$${\rm{\Delta }}\phi =2\pi \frac{{z}_{1}}{D{z}_{2}}x+{C}_{x}$$
(1)

with z 2 the distance between the X-ray camera and the focus, z 1 the distance between the Ronchi grating and the focus, D the period of the grating, and C x a constant in x (see methods section for more details). The phase difference results in a linear fringe pattern on the detector, called Ronchigrams. Three Ronchigrams of the beam are seen in Fig. 2(a–c), where the analysis mask of the zeroth order is shown by the red rectangle, and the positions of the +1 and −1 orders by the blue and green rectangles respectively. The fringe density can be tuned to the resolution of the camera by translating the grating with respect to the focus, which effectively changes z 1 in Eq. (1).

Figure 2
figure 2

Top (ac): the three ronchigrams used to calculate the phase of the X-ray beam, with a magnified close-up of the fringes below. The images are taken with gratings with the different spatial periods (225 nm for (a,c), and 275 nm for (b)), at the same position with respect to the focus, but with an angle of the grating with respect to the vertical of −37.9° for (a), −15.4° for (b) and 29.6° for (c). The red rectangle is the analysis mask of the zeroth order, the green and blue rectangles are the position of the −1 and +1 orders respectively. There is no interference and hence no phase information in the white shade area in (a). Bottom (df): False-color image of the difference (i.e. errors) between the phase derived from the Ronchigrams, and the phase derived after re-shearing the recovered wavefront of the beam. RMS error of the images is λ/55 for (a) and λ/40 for (b,c).

As can be seen in Fig. 2 the X-ray beam on the camera looks very asymmetrical, and has two big vertical lobes. The two lobes are caused by the fact the beam overfills a steering mirror located approximately 330 m upstream of the CXI endstation, causing this feature in the far field image. The total beam size in the vertical direction is roughly 70% bigger than in the horizontal direction. This is caused by the fact that the vertical KB mirror has a smaller focal length and therefore sits closer to the focus (500 mm vs 900 mm), leading to a higher divergence and hence a larger vertical size on the detector.

Aberrations in the wavefront of the focused beam will result in a distortion of the fringe pattern. Standard Fourier transform and phase unwrapping methods25 are used to calculate the phase of the Ronchigrams. However, the retrieved phase is not the phase of the X-ray beam itself, but the phase difference between the beam and a shifted copy of itself. The Ronchi test is a shearing interferometer and quantitative analysis requires one to invert the shearing operator. Shearing interferometry is well described in the literature and many methods exist to analyse the interferograms26,27,28,29,30. The main difficulty stems from the fact that the shearing operator has a kernel, and therefore cannot be inverted mathematically. Indeed, if we define the shearing operator in the x-direction as:

$${\hat{S}}_{x}[f(x,y)]=f(x,y)-f(x-{s}_{x},y)$$
(2)

we see that any periodic function in x with a period s x gets mapped onto the null vector. Therefore, trying to determine the beam that gives rise to the Ronchigrams is a mathematically ill-posed problem31. The most common way to resolve this issue is by using standard regularization theory32. In this paper we will follow that road, and adapt an algorithm described in Servin et al.33, in which two orthogonal interferograms are used in combination with an a priori assumption of smoothness of the wavefront. However, an additional difficulty with the Ronchigrams is that the shear is half the beam-size which is large in comparison to typical shearograms. This can result in a large area of the beam where no shearing information is available. For example, in Fig. 2(a) we have no shearing information and therefore no information on the phase in the white shaded area, which is approximately a quarter of the total beam aperture. Furthermore, the area where we do see fringes only yields information on the phase differences in one direction: we do not have any information on phase changes in the beam parallel to the fringes. This problem can be overcome by using enough Ronchigrams to ensure that every area where there is appreciable beam intensity is sheared along at least two angles. In the results presented here, we use the three Ronchigrams shown in Fig. 2(a–c). We only use the interference between the fundamental and the +1 order (i.e. right side of the image) since the interference with the −1 yields exactly the same phase information. Together, the three Ronchigrams contain enough information to retrieve the phase of the whole beam since they ensure we have shearograms in at least two direction in almost the entire aperture. An added bonus is that the three shearograms effectively shear both the horizontal and vertical directions with two incommensurate shear values and since Jacobi has shown that a double periodic function with incommensurate periods is necessarily constant34, this removes nearly the whole kernel. Common to interferometric methods, the implicit assumption is made that the beam is spatially coherent, and hence only the coherent part of the beam will be measured. A full description of the inversion algorithm can be found in the methods section of this paper.

Results

To validate the inversion, we have sheared the recovered wavefront at angles −37.9°, −15.4° and 29.6° and compared them to the measured phase of the Ronchigrams. The result is shown in Fig. 2(d–f). We find an RMS error of less than \(\tfrac{1}{40}\) of a wavelength for each Ronchigram, ensuring that the inversion algorithm works accurately. We note that the use of three Ronchigrams over-constrains the optimization problem. Indeed, any two Ronchigrams with different shearing directions can always be used to invert the shearing operator with a vanishing error. However, this is not the case when three or more shearograms are used: only those derived from a physical field will result in an illumination phase that yields a small RMS error between the measured shearograms and the calculated ones. This is important since we use three shearograms from three different FEL pulses, and we make the implicit assumption that the phase of these pulses are the same. The fact that such a small RMS error is found validates this assumption and the method in general.

The recovered phase can be seen in Fig. 3(a), while Fig. 3(b) shows the measured intensity of the beam. Using this phase and measured intensity profile, we can calculate the X-ray profile at focus, which is shown in Fig. 3(c–e). The full width at half maximum of focal size of the central peak is 167 nm in the vertical and 123 nm in the horizontal. The uncertainty in the wavefront measurement of λ/40 mentioned above results in an uncertainty of approximately 2% in the peak intensity of the beam, applying the Strehl Ratio/Ruze formula35,36.

Figure 3
figure 3

(a) Wavefront of the x-ray beam, (b) Measured intensity of the beam. (c) Intensity of the focal spot at best focus. (d) Vertical lineout (red) and (e) horizontal lineout (blue) through focus, compared with the theoretical ideal focus (dashed) when no abberations would be present. The peak intensity is 3.9 1019 W/cm2 for the 3 mJ beam energy and 60 fs pulse length that was used in the experiment.

Discussion

In order to demonstrate the value of the information gained from the Ronchigram wavefront retrieval, a simulation of the aberrations due to misalignment of the KB mirror pair was performed. In the simulation, the vertical focusing mirror (VFM) was misaligned by 9 μrad and the horizontal focusing mirror (HFM) was misaligned by 7.5 μrad, resulting in a best focus 2 mm upstream of the nominal focus position. Horizontal and vertical lineouts are shown in Fig. 4, along with lineouts corresponding to operation of the system with the mirrors aligned to the design angle. From comparison with Fig. 3(d,e), it is clear that the majority of the observed vertical aberrations are captured in the simulated misalignment of the VFM. However, the horizontal direction is strongly affected by aberrations caused by two horizontal steering mirrors 330 m upstream of the KB pair. While an attempt was made to account for these aberrations in the simulation, the Ronchigram result suggests that there are additional aberrations that were not fully captured in the simulation. The analysis presented here underscores the importance of techniques which retrieve both the amplitude and phase of the focus. Other techniques, such as the use of imprints, rely on the assumption that the interaction plane has been chosen correctly. As can be seen in Fig. 4, a small error of 2 mm along the beam axis can result in a peak intensity that is a factor of two below what can be achieved with ideal alignment.

Figure 4
figure 4

(a) Simulation of the focus of the focal spots of a misaligned KB-pair. The vertical focusing mirror was misaligned by 9 μrad and the horizontal focusing mirror by 7.5 μrad. (b) Vertical lineout of the spot in (a), compared with the spot from a perfectly aligned mirror. (c) Horizontal lineout.

In conclusion, we have presented a method to determine the focus of Free electron laser using Ronchi shearing interferometry. The method is fast, in situ and does not require high beam pointing stability. The method has been applied to the nanofocus of the CXI beamline at LCLS, and is readily applicable to other X-ray beamlines and focal sizes.

Methods

Ronchigrams

A Ronchi grating with a duty cycle of 1 and with the orientation of the grating in the x direction can be described as:

(3)

where \(\bigstar \) denotes the convolution operator, T 1 and T 2 are the complex transmission functions the two parts of the grating, the Dirac comb is defined as

(4)

and the rectangle function defined as

$${{\rm{rect}}}_{L}(x)=\{\begin{array}{ll}1 & {\rm{if}}\,-L\mathrm{/2} < x < L\mathrm{/2}\,\\ 0 & {\rm{elsewhere}}\,\end{array}$$
(5)

Taking the two dimensional Fourier transform of the Ronchi grating we get:

$$ {\mathcal R} ({k}_{x},{k}_{y})=2\pi \,\sum _{l=-\infty }^{+\infty }\,{R}_{l}\delta ({k}_{x}-{k}_{l})\,\delta ({k}_{y})$$
(6)

with

$${k}_{l}=\frac{2\pi }{D}l\,{\rm{with}}\,l\in {\mathbb{Z}}$$
(7)
$${R}_{l}=\{\begin{array}{ll}({T}_{1}+{T}_{2})\pi & {\rm{if}}\,l=0\\ ({T}_{2}-{T}_{1})\pi \,\sin {\rm{c}}(\frac{l\pi }{2}) & {\rm{if}}\,l\in {{\mathbb{Z}}}_{0}\end{array}$$
(8)

with sinc(x) = sin (x)/x and using the the two-dimensional Fourier transform defined as:

$$F({k}_{x},{k}_{y})= {\mathcal F} [f(x,y)]={\int }_{-\infty }^{\infty }\,f(x,y){e}^{-i({k}_{x}x+{k}_{y}y)}dx$$
(9)

The Ronchi grating and its Fourier transform can be seen in Fig. 5. We now consider the X-ray beam with a focus located at z = 0, with electric field E 0(x, y, 0). Using the paraxial approximation, we can propagate the electric field to the camera position, z c , using the Fresnel intergral:

$${E}_{c0}(x,y)={P}_{{z}_{c}}(x,y)\,{E}_{c0}^{F}(x,y)$$
(10)

with

$${E}_{c0}^{F}(x,y)=-\frac{ik}{2\pi {z}_{c}}{e}^{ik{z}_{c}} {\mathcal F} \,{[{E}_{0}(x,y){P}_{{z}_{c}}(x,y)]}_{\begin{array}{c}{k}_{x}=\tfrac{k\cdot x}{{z}_{c}}\\ {k}_{y}=\tfrac{k\cdot y}{{z}_{c}}\end{array}}$$
(11)

with k the wavenumber of the electromagnetic field and the spherical phase factor \({P}_{{z}_{c}}\) defined as:

$${P}_{{z}_{c}}(x,y)=\exp \,(\frac{ik}{2{z}_{c}}({x}^{2}+{y}^{2}))$$
(12)

Basically, \({E}_{c0}^{F}\) is the electric field at the camera position without the spherical wavefront curvature due to the propagation distance z c . We now place the Ronchi grating at position z = z 1, and propagate the beam from focus to the grating using the Fresnel integral. We multiply the field with the transmission function of the Ronchi grating and then propagate the field back to the (now virtual) focus of the beam. We get the resulting (virtual) field E R0:

$${E}_{R0}=\frac{1}{2\pi }\,\sum _{l=-\infty }^{+\infty }\,{R}_{l}\,\exp \,(i\frac{{k}_{l}{X}_{l}}{2})\,{E}_{0}(x+{X}_{l},y,\mathrm{0)}\,\exp \,(i{k}_{l}x)$$
(13)

with

$${X}_{l}=\frac{2\pi {z}_{1}}{kD}l\,{\rm{with}}\,l\in {\mathbb{Z}}$$
(14)

We use the Fresnel integral to propagate this field to z = z c . Substituting equation (11) we get:

$${E}_{Rc}=\frac{1}{2\pi }{P}_{{z}_{c}}(x,y)\,\sum _{l=-\infty }^{+\infty }\,{R}_{l}{e}^{i{\phi }_{l}}\,{E}_{c0}^{F}(x-{X}_{D}^{l},y,{z}_{c})\,\exp \,(i{k}_{l}\frac{{z}_{1}}{{z}_{c}}x)$$
(15)

with

$${\phi }_{l}=\frac{{k}_{l}{X}_{l}}{2}\,(\frac{{z}_{1}}{{z}_{c}}-1)$$
(16)
$${X}_{D}^{l}=\frac{{k}_{l}}{k}({z}_{c}-{z}_{1})$$
(17)

When different orders (i.e. different values of l) overlap, they will interfere, and form predominant linear fringes due to the linear phase in x. For our ronchi test, we choose D to have the half-beam overlap as shown in Fig. 2. From equation (15) we can calculate the phase difference between the zeroth and first order:

$${\rm{\Delta }}\phi ={\phi }_{{R}_{0}}-{\phi }_{{R}_{1}}-\frac{2{\pi }^{2}{z}_{1}}{k{D}^{2}}\,(\frac{{z}_{1}}{{z}_{c}}-1)+{\hat{S}}_{{X}_{D}}[{\phi }_{c0}(x,y)]-\frac{2\pi {z}_{1}}{{z}_{c}D}x$$
(18)

with \({\phi }_{{R}_{0}}\) the phase of R 0, \({\phi }_{{R}_{1}}\) the phase of R 1, ϕ c0(x, y) the phase of \({E}_{c0}^{F}(x,y,{z}_{c})\), and \({\hat{S}}_{{X}_{D}}\) the shearing operator defined as:

$${\hat{S}}_{{X}_{D}}[f(x,y)]=f(x,y)-f(x-{X}_{D},y)$$
(19)

and \({X}_{D}\equiv {X}_{D}^{1}\). The first three terms give the constant phase difference between the orders (corresponding to the undetermined C x in equation (1). This constant phase is a priory unknown, since we cannot know the exact position of the beam with respect to the grating, and a shift of δx in this position will lead to a constant phase of \(2\pi \tfrac{\delta x}{D}\). The value of this constant phase is actually important during the shear-inversion, and will need to be optimized together with the rest of the wavefront. It could also be used to measure beam jitter, if it is not larger than the grating period. The last two terms show how the phase varies in x and y. The linear phase in x of the last term will result in linear fringes in the intensity of E RC , provided the spatial frequency \(\frac{2\pi {z}_{1}}{{z}_{c}D}\) is large enough. Using standard Fourier methods25 and phase unwrapping algorithms we can retrieve \({\hat{S}}_{{X}_{D}}[{\phi }_{c0}(x,y)]\) as long as the spatial frequency \(\frac{2\pi {z}_{1}}{{z}_{c}D}\) is at least twice the highest spatial frequency that is present in the intensity of E RC ; otherwise aliasing will occur. To retrieve the phase of the electric field at the camera location ϕ co (x, y), we will have to invert the shearing operator \({\hat{S}}_{{X}_{D}}\). Measuring the intensity of E c0 is trivially done without Ronchi grating. Therefore, we will have full information of both phase and amplitude of the electric field at the camera location, which allows us to propagate the beam to any z location, and therefore fully determine its focal characteristics.

Figure 5
figure 5

The Ronchi target (left) and its 2D Fourier transform. T 1 and T 2 are complex transmission functions. The dots in the Fourier transform plot signify delta-distributions.

Inverting the shearing operator

As shown above, the phase retrieved from the Ronchigrams is not the actual phase of the X-ray beam, but the sheared phase. In general we have:

$${\hat{S}}_{\bar{s}}[\phi (x,y)]=\phi (x,y)-\phi (x-{s}_{x},y-{s}_{y})$$
(20)

with the shear vector \(\bar{s}=({s}_{x},{s}_{y})\) orthogonal to the lines of the Ronchi grating. The measured data will be sampled in x and y, and defining ϕ i,j as the phase at the sample points (i.e., pixels), we have the corresponding discrete operator

$${\hat{S}}_{\bar{s}}[{\phi }_{i,j}]={\phi }_{i,j}-{\phi }_{i-{s}_{x},j-{s}_{y}}$$
(21)

with s x and s y expressed in number of pixels. We call \({\phi }_{i,j}^{\bar{s}}\) the measured sheared phase retrieved from the Ronchigram. We now search for a solution of ϕ i,j that minimizes the cost function of the mean-square error between the sheared phase and the measured one:

$${U}_{\bar{s}}^{2}=\sum _{i,j}\,{({\hat{S}}_{\bar{s}}[{\phi }_{i,j}]-{\phi }_{i,j}^{\bar{s}}+{\phi }_{c}^{\bar{s}})}^{2}\,{P}_{i,j}^{\bar{s}}$$
(22)

with \({\phi }_{c}^{\bar{s}}\) the constant phase that is jitter dependent mentioned above and \({P}_{i,j}^{\bar{s}}\) the masking function that is equal to 1 where good sheared data is available and 0 where there isn’t. As mentioned above, we need multiple Ronchigrams to recover the phase, due to the limited overlap between the beams after shearing. Therefore the total cost function will be the sum for different values of the sheared direction \(\bar{s}\):

$${U}^{2}=\sum _{\bar{s}}{U}_{\bar{s}}^{2}$$
(23)

In the reconstruction that is shown in the main body of this paper we use three values of \(\bar{s}\), corresponding to shears at −37.9°, −15.4° and 29.6°, but in principle we could use more shearograms and reduce the error. As in Servin et al.33 we will add a cost function that corresponds to our a priori assumption of smoothness in x and y:

$${R}_{x}^{2}=\sum _{i,j}\,{({\phi }_{i-\mathrm{1,}j}-2{\phi }_{i,j}+{\phi }_{i+\mathrm{1,}j})}^{2}\,{P}_{i-\mathrm{1,}j}\,{P}_{i+\mathrm{1,}j}$$
(24)
$${R}_{y}^{2}=\sum _{i,j}\,{({\phi }_{i,j-1}-2{\phi }_{i,j}+{\phi }_{i,j+1})}^{2}\,{P}_{i,j-1}\,{P}_{i,j+1}$$
(25)

where P i,j is masking function equal to 1 inside the aperture of the beam, and 0 outside it. Note that in principle we could use

$${P}_{i,j}^{\bar{s}}={P}_{i,j}\,{P}_{i-{s}_{x},j-{s}_{y}}$$
(26)

although in practise we may need to take the mask slightly smaller. Alternatively, we could allow values in the masking function between 0 and 1 to allow for a weighted average in in the cost function. With the regularization, the total cost function becomes:

$${U}^{2}=\sum _{\bar{s}}\,{U}_{\bar{s}}^{2}+\eta \,({R}_{x}^{2}+{R}_{y}^{2})$$
(27)

with η the regularization parameter. Efficient minimization of the cost function requires the partial derivatives toward ϕ i,j and \({\phi }_{c}^{\bar{s}}\):

$$\frac{\partial {U}^{2}}{\partial {\phi }_{k,l}}=\sum _{\bar{s}}\,\frac{\partial {U}_{\bar{s}}^{2}}{\partial {\phi }_{k,l}}+\eta \,(\frac{\partial {R}_{x}^{2}}{\partial {\phi }_{k,l}}+\frac{\partial {R}_{y}^{2}}{\partial {\phi }_{k,l}})$$
(28)
$$\frac{\partial {U}^{2}}{\partial {\phi }_{c}^{\bar{s}}}=\frac{\partial {U}_{\bar{s}}^{2}}{\partial {\phi }_{c}^{\bar{s}}}$$
(29)

with

$$\begin{array}{rcl}\frac{\partial {U}_{\bar{s}}^{2}}{\partial {\phi }_{k,l}} & = & 2{P}_{k,l}^{\bar{s}}({\hat{S}}_{\bar{s}}[{\phi }_{k,l}]-{\phi }_{k,l}^{\bar{s}}+{\phi }_{c}^{\bar{s}})\\ & & -2{P}_{k+{s}_{x},l+{s}_{y}}^{\bar{s}}({\hat{S}}_{\bar{s}}[{\phi }_{k+{s}_{x},l+{s}_{y}}]-{\phi }_{k+{s}_{x},l+{s}_{y}}^{\bar{s}}+{\phi }_{c}^{\bar{s}})\end{array}$$
(30)
$$\frac{\partial {U}_{\bar{s}}^{2}}{\partial {\phi }_{c}^{\bar{s}}}=2\,\sum _{k,l}\,{P}_{k,l}^{\bar{s}}({\hat{S}}_{\bar{s}}[{\phi }_{k,l}]-{\phi }_{k,l}^{\bar{s}}+{\phi }_{c}^{\bar{s}})$$
(31)
$$\begin{array}{rcl}\frac{\partial {R}_{x}^{2}}{\partial {\phi }_{k,l}} & = & 2({\phi }_{k,l}-2{\phi }_{k+\mathrm{1,}l}+{\phi }_{k+\mathrm{2,}l})\,{P}_{k,l}\,{P}_{k+\mathrm{2,}l}\\ & & -\,4({\phi }_{k-\mathrm{1,}l}-2{\phi }_{k,l}+{\phi }_{k+\mathrm{1,}l})\,{P}_{k-\mathrm{1,}l}\,{P}_{k+\mathrm{1,}l}\\ & & +\,2({\phi }_{k-\mathrm{2,}l}-2{\phi }_{k-\mathrm{1,}l}+{\phi }_{k,l})\,{P}_{k-\mathrm{2,}l}\,{P}_{k,l}\end{array}$$
(32)
$$\begin{array}{rcl}\frac{\partial {R}_{y}^{2}}{\partial {\phi }_{k,l}} & = & 2({\phi }_{k,l}-2{\phi }_{k,l+1}+{\phi }_{k,l+2})\,{P}_{k,l}\,{P}_{k,l+2}\\ & & -\,4({\phi }_{k,l-1}-2{\phi }_{k,l}+{\phi }_{k,l+1})\,{P}_{k,l-1}\,{P}_{k,l+1}\\ & & +\,2({\phi }_{k,l-2}-2{\phi }_{k,l-1}+{\phi }_{k,l})\,{P}_{k,l-2}\,{P}_{k,l}\end{array}$$
(33)

We can now minimize equation (27) using a conjugate gradient descent method; alternatively a limited memory Broyden-Fletcher-Goldfard-Shanno algorithm37,38,39,40,41 runs very fast.