## Abstract

We describe a method for characterizing focused x-ray beams using phase retrieval, with diversity achieved by transversely translating a phase-shifting or absorbing structure close to the beam focus. The required measurements can be taken with an experimental setup that is similar to that already used for fluorescent scan testing. The far-field intensity pattern is measured for each position of the translating structure, and the collected measurements are jointly used to estimate the beam profile by using a nonlinear optimization gradient search algorithm. The capability to reconstruct 1D and 2D beam foci is demonstrated through numerical simulations.

© 2009 Optical Society of America

## 1. Introduction

The high penetration depth of x-rays (particularly hard x-rays) makes them attractive for high-resolution imaging of internal structures of thick samples, with important applications in the fields of material science, biology and integrated circuit inspection. Focusing of x-ray beams into increasingly smaller spots is of fundamental importance for increasing the resolution of scanning (or conventional) imaging in this wavelength regime. A tighter focus is also important for holographic approaches that use a focused spot as a reference wave [1–3], where the final image resolution can be limited by the size of the focused spot and the signal-to-noise ratio (SNR) can be limited by the amount of energy passing through a small pinhole [4]. Ensuring that the wavefront is flat and the amplitude is uniform is also important when using non-iterative reconstruction methods that require an extended reference [5–8].

Characterization of x-ray focused beams is important to evaluating focusing elements needed to produce small spots and to ensure that small nano-objects are efficiently and uniformly illuminated for lensless image reconstruction by phase retrieval [9–19] (also known as coherent diffractive imaging). If the object lacks a sharp support constraint, then the illumination itself provides the support region [16,18], and having this illumination accurately characterized will enable a more accurate estimate for the support constraint. A tight support constraint (accurate knowledge of the illumination pattern) is especially important for imaging of specimens with complex-valued transmissivity, where a nonnegativity constraint cannot be used.

Introducing diversity to phase retrieval, by making a set of independent intensity measurements after a known modification of the experimental setup, has been shown to make reconstructions more robust to stagnation, ambiguities, and noise [20–23]. Transverse displacement of the sample with respect to a known illumination pattern (transverse-translation-diverse phase retrieval), is a practical form of diversity for the x-ray image reconstruction problem, and has shown a substantial success at optical and x-ray wavelengths. For this technique an accurate knowledge of the beam is important in order to obtain artifact-free reconstructions [24–26] and makes the convergence faster for algorithms that refine the initial estimate of the illumination pattern [27, 28].

Although there are methods that could be used to assess the quality of the focusing optics (for example by phase contrast imaging [29] or by obtaining a high resolution image of the lens outer structure by an atomic force microscope), alignment issues may also affect the quality of the focused x-ray beam. Furthermore, the push for tighter focus spots is currently driven by manufacturing cylindrical focusing optics, either by mirrors [30], multilayer lenses [31] or kinoforms [32]. For this case, alignment between the two cylindrical lenses that are required to obtain a 2D focus (a focusing spherical wavefront) is even more critical. It is then important to a have reliable method for beam characterization that can be implemented *in situ* to directly assess the quality of the focused beam.

By scanning a thin slab of fluorescent material and measuring the intensity of its fluorescence emission (for each transverse position) one can obtain a measurement of a projection of the transverse intensity profile of the beam [31, 32]. Alternatively the intensity profile can be obtained by scanning a phase-shifting microbridge structure [30] that does not need to be thin in the transverse dimension, and measuring the intensity that is diffracted from its edge. For these approaches only an integrated intensity over the transverse extent of the fluorescent structure is measured and the resolution of the measurement is limited by the slab thickness (or by the roughness of the microbridge structure [30]). The required width of the fluorescent structure decreases with the spot diameter (in order to obtain enough resolution), but its thickness along the direction of propagation must reduce with the square of the beam spot diameter due to the reduced depth of focus, which produces a significant decrease in the fluorescence signal, an increase in exposure times and increased stability requirements. Furthermore, the alignment of the fluorescent structure becomes increasingly difficult because a direct measurement of the beam focus intensity requires accurate positioning of the fluorescent structure within the depth of focus of the beam. Although a 2D intensity profile could be obtained by scanning a 2D fluorescent structure, manufacturing such a structure with a transverse size of a few nanometers is difficult and its alignment within the beam depth of focus could be very challenging.

Phase retrieval offers an alternative for measuring coherent x-ray beams, with the resolution fundamentally limited only by the detector angular extent and the wavelength, thus avoiding the need of fabricating structures with sizes on the order of the desired resolution. Quiney *et al*. reconstructed a 2D soft x-ray beam focus (obtained by a zone plate), using phase retrieval, from a measurement of its far-field diffraction pattern [33]. Mimura *et al*. measured the intensity profile of a hard x-ray 1D focus, and used phase retrieval to recover the beam phase profile [30]. Both approaches used a single intensity measurement and a support constraint at the plane of the focusing optic as constraints for the phase retrieval algorithm.

Despite the success of these experiments, it is well known that introducing diversity to phase retrieval yields more reliable, accurate and robust reconstructions. Hence finding ways of introducing diversity into this problem is of utmost importance for development of a reliable characterization technique. This is especially important for the 1D beam focus, since the 1D phase retrieval problem with a support constraint has been shown to be an ill-posed problem because of the lack of uniqueness of the solution [34].

In our approach, we provide diversity using a moveable structure (transverse translation diversity), similar to that first introduced by Faulkner *et al*. for the image reconstruction problem [24]. A well-characterized structure is placed in the beam path close to focus, and moved to different transverse positions, as illustrated in Fig. 1. Although the structure may have an arbitrary phase and amplitude distribution, *e.g*. a moveable aperture, substantial phase shifting is enough to provide the desired diversity, and can be more easily obtained than large amplitude variations for hard x-rays with a relatively thin sample, which allows the transmitted field to be better approximated by a product of the incident beam and the structure transmissivity. For each position of the structure, the far-field intensity pattern of the beam is measured. These measurements are then used, along with the knowledge of the structure transmissivity and the translations, to reconstruct the incident x-ray field. The experimental arrangement is very similar to the fluorescent scanning approach and the reconstruction can be carried out using the same phase retrieval algorithms used for the analogous image reconstruction problem [24–28]. We have found that this approach also disambiguates the 1D phase retrieval problem, thus allowing the reconstruction of 1D beam foci.

Phase retrieval is more robust if the measured intensity is Nyquist sampled, which means that the reconstruction should be confined to half of the computational window in each dimension. Because a focused beam has sidelobes that extend indefinitely, the intensity sampling requirement will not be strictly satisfied by using a phase-shifting structure. However, if in the reconstruction the energy is largely confined to the central portion of the computational window, the aliased sidelobe energy will be small and can be ignored. This condition is equivalent to that used for coherent diffractive imaging with an illumination pattern constraint [16, 18].

The output of the algorithm is the complex-valued field (*i.e*. both phase and amplitude) of the beam incident on the translating structure. Because the reconstructed field can be propagated numerically to any other plane, the translating structure need not be positioned within the beam depth-of-focus. This will greatly relax the longitudinal alignment requirements compared with the scanning approach. Furthermore, we will show that, after the beam is reconstructed, the distance from the structure to the beam focus can be easily estimated by maximizing a sharpness metric, so that this distance does not need to be known.

In this approach neither the width of the translating structure nor its translations need to be on the scale of the final resolution of the reconstruction, and only a modest number of translations are needed. For solving this phase retrieval problem, only the relative transverse displacements and not the absolute position of the structure need to be known [24–28]. This approach should be useful at optical wavelengths as well.

In Sections 2 and 3 we describe numerical simulations where we apply phase retrieval with transverse translation diversity to a set of far-field intensity measurements to obtain a phase and amplitude profile of the 2D and 1D beam foci, respectively.

## 2. 2D focused beam diagnostics example

A pair of crossed cylindrical lenses can be used to obtain a 2D focus spot, as shown in Fig. 1(a). The parameters in our simulations are consistent with kinoform focusing optics that are currently under development for focusing of hard x-rays [32]. We considered a pair of kinoform lenses, each with an aperture of 150×150 *μ*m. The first lens (*L*
_{1}) has a focal length of *f* = 10 cm and is oriented to focus in the *x*-direction, and the second lens (*L*
_{2}) is placed *z*
_{2} = 1 cm downstream and has a focal length of *f* - *z*
_{2} = 9 cm and focuses in the *y*-direction. The different focal lengths were chosen as to provide the best focus position at 10 cm downstream of *L*
_{1} for both the *x* and *y* directions.

Figure 2(a) shows the simulated amplitude transmission for *L*
_{1} and *L*
_{2}. The simulated aberrations (deviation from cylinder) of the two lenses are shown in Figs. 2(b) and 2(c). Aberrations for the kinoforms were introduced by dividing the lens into 40 sections along the focusing direction, each section having the same number of waves (peak to valley) of the quadratic phase that is responsible for the focusing. Each section was assigned a zero-mean random smooth phase error (independent from one section to the next) with a root-mean-squared (RMS) value of 0.05 waves (0.314 radians) and a random piston error with 0.1 waves (0.628 radians) RMS.

These aberrations could arise from surface figure error (or material inhomogeneity) and from not exactly obtaining an integer number of 2*π* phase steps upon transition from one kinoform section to the next.

Assuming the incident field is a plane wave, in the thin-lens approximation, the field transmitted by *L*
_{1}, *u*
_{1}(*x*
_{1},*y*
_{1}), is given by

where the amplitude and phase (wavefront deviation from a cylinder) of *t*
_{1}(*x*
_{1}, *y*
_{1}) are shown in Figs. 2(a) and 2(b), respectively.

The field incident on *L*
_{2} was computed, assuming scalar paraxial diffraction theory, by numerically propagating *u*
_{1}(*x*
_{1},*y*
_{1}) by a distance *z*
_{2}. Sampling requirements were minimized by first propagating *u*
_{1}(*x*
_{1},*y*
_{1}) to the lens nominal focus and then propagating back to the plane of *L*
_{2} using, for both propagations, the numerical propagation approach for cylindrical wavefronts described in Appendix A [Eq. (A5)].

We obtain *u*
_{2}(*x*
_{2},*y*
_{2}), the field immediately after *L*
_{2}, by multiplying by the transmissivity of the second lens. The amplitude and phase (deviation from sphere) of the field after *L*
_{2} are shown in Figs. 3(a) and 3(b), respectively. Notice that the phase aberrations in *L*
_{1} have caused amplitude variations on the field after *L*
_{2}.

For our simulations *λ* = 0.109 nm and the sampling at *L*
_{1} was (∆*x*
_{1}, ∆*y*
_{1}) ≃ (543,488) nm. A different sampling rate at *L*
_{1}, along the *x* and *y* directions, was chosen in order to get the same sampling rate for both directions at the plane of *L*
_{2} (and at the beam focus). The sampling at *L*
_{1} and *L*
_{2} are related by ∆*x*
_{2} = (*f*- *z*
_{2})∆*x*
_{1}/*f* and ∆*y*
_{2} = ∆*y*
_{1}. Thus, having ∆*y*
_{1} = (*f* - *z*
_{2})∆*x*
_{1}/*f* will ensure that ∆*x*
_{2} = ∆*y*
_{2}. The Fourier transforms (FT) in Eqs. (A5) and (A6) were computed using the fast FT algorithm (FFT) on a *N* × *N* = 1024 × 1024 computational window.

Because *u*
_{2}(*x*
_{2},*y*
_{2}) is a spherically converging beam, the beam at focus, *u*
_{3}(*x*
_{3},*y*
_{3}), was computed efficiently through a single 2D FFT Fresnel transform as given by Eq. (A1). The beam at focus, shown in Fig. 3(c), has a width of about 100 nm (peak to first null). Sampling at focus was ∆*x*
_{3} = ∆*y*
_{3} ≃ 19.6 nm.

Our goal is to determine the aberrated focused beam by phase retrieval from far-field intensity measurements. To provide diversity to the phase retrieval algorithm in a practical way, in order to make it more robust, in the simulation we introduced a structure that has unity transmissivity everywhere, and imparts a *π* radians phase shift to the beam inside a 392 nm (20 pixels) radius. The structure was placed in the path of the beam at ∆*z* = 1 mm downstream from the nominal focus position. The beam at this longitudinal position was significantly larger than the beam at focus. This allows for using a relatively large structure, which is easier to make lithographically. Additionally, the distance from focus does not need to be known for the algorithm to work, which relaxes the alignment requirements for the measurement approach. The beam amplitude at 1 mm downstream of focus, calculated from the beam at focus using angular spectrum [3], is shown in Fig. 4(a).

For this technique, best results are obtained using a structure with a transverse size that is comparable to the beam extent at that plane. Through numerical simulations we have also observed fast convergence using fewer diffraction patterns if a more complicated structure is used. However, a more complicated structure may be harder to manufacture and accurately characterize.

The structure was translated transversely in steps of 392 nm (20 pixels) to 16 positions along a 4×4 Cartesian grid, as shown in Fig. 4(b). This arrangement was chosen to have a substantial amount of overlap between the areas of the beam that undergo a phase shift. The algorithm, however, does not require the translations to be in a Cartesian or regular arrangement.

For imaging applications the known illumination pattern typically has a finite transverse extent, and having the illumination overlap for different translations of the object is crucial for reconstruction, otherwise there is no diversity added to the phase retrieval problem [24, 26]. In our case, the beam we reconstruct has an approximately finite extent (true sidelobes extend indefinitely) and the known structure is transmissive everywhere. For this case, having overlap of the structure is not absolutely necessary to impart diversity to the measurements. However, we have observed better reconstructions when there is overlap of the translating structure.

The intensity patterns at the detector plane were computed (by a single 2D FFT Fresnel transform) at 7.37 m downstream focus and sampled with a 1024 × 1024 detector having a pixel pitch of 40 μm. Two of these patterns, for the positions of the translating structure that are shown in red in Fig. 4(b), are shown in Fig. 5(a) and Fig. 5(b). Poisson-distributed noise was added after normalizing each intensity pattern to have a total of 2.25×10^{10} photons, which corresponds to an incident flux of 10^{6} photons/μm^{2}/s on the lens with 1 second exposures.

The 16 measured intensity patterns (along with the translations and the translating structure transmissivity) were fed to a nonlinear optimization algorithm for solving the problem of phase retrieval with transverse translation diversity [27]. For image reconstruction with this technique, the illuminating field is typically known and the transmissivity of an unknown object in the path of the beam is reconstructed [24–28]. However, the formalism only assumes that the object-space field can be expressed as a product of a known and an unknown complex-valued functions, so (as suggested in [28]) it can also reconstruct an unknown incident field by moving a known object in the path of the x-ray beam.

The starting guess for the algorithm was a perfect (aberration free) x-ray beam focused by a 150×150 *μ*m lens with 10 cm focal length. For obtaining the initial estimate we assumed that the translating structure was located at the beam focus, rather than at ∆*z* = 1 mm downstream from the focal plane, to prove that the longitudinal displacement of the translating structure from the focal plane need not be known. The reconstruction after 150 iterations is shown in Fig. 6(a), where we define an iteration as every time the gradient of the error metric is computed. The result matches the true beam, shown in Fig. 4(a), very well.

The reconstruction algorithm assumes a FT relation between the plane of the translating structure and the measurement plane [27], so the reconstructed field will have an extra quadratic phase (the quadratic phase inside the Fresnel diffraction integral). This extra quadratic phase is removed assuming we know the distance from the phase shifting structure to the detector array. An uncertainty of a few millimeters on this distance will not significantly affect the reconstruction.

Because a reconstruction that is translated and multiplied by *α*, an arbitrary complex-valued constant, is considered successful, we assess the quality of the reconstruction through *E*, a normalized translation-invariant RMS error between the true field and its estimate, *û*(*x,y*), given by [35]

Equation (2) can be computed by registering the true beam and the reconstruction to within a small fraction of a pixel by maximizing their cross-correlation [35]. For our reconstructed field *E* = 0.2484, computed by registering the beam and the reconstruction to within 1/100 of a pixel using an efficient subpixel registration algorithm [36]. This rather large error was found to mainly arise from areas outside of the composite support of the translating structure, as shown in Fig. 6(d), a cut at *y* = 3 *μ*m. Within the composite support of the translating structure shown in Fig. 4(b), *E* = 0.0423, which indicates that the field within this support was accurately recovered. Most of the error in the reconstruction comes from the inaccuracy of the low-amplitude sidelobes over a large area (20×20 *μ*m^{2}).

For our simulation parameters, the relation between the x-ray beam at focus and the plane of the measurement is very close to a FT. Placing a translating structure on any portion of the beam at focus has an important effect on every point of the measurement plane. However, placing the translating structure exactly at the nominal focus may be a difficult alignment task, and it requires the translating structure to be on the scale of the focused beam. Placing the translating structure downstream (or upstream) of the nominal focus, where the beam is larger, as was done for the simulation results above, allows the structure to be significantly larger than the focused spot and reduces the alignment requirements. However, as we move the translating structure away from the nominal focus, its effect becomes more local on the measured intensity pattern and affects a smaller area on the detector plane. This explains the limited capability of recovering the low amplitude sidelobes that lie beyond the composite support covered by the translating structure.

To improve the reconstruction we can increase the area covered by the translating structure. To illustrate this point, we performed an additional numerical simulation where we used a 981 nm radius (50 pixels) translating structure. The increased composite support for this larger structure is shown in Fig. 4(c). Notice that this support is still short of covering the entire 20 × 20 *μ*m computational window and we have used the same number of diversity images, with same (relative) overlap of the translating structure in an equivalent position grid.

Two of the intensity patterns at the detector plane are shown in Figs. 5(c) and 5(d). The reconstruction after 200 iterations of the nonlinear optimization algorithm is shown in Fig. 6(b). For this reconstruction *E* = 0.0874, computed over the entire computational window. The error is significantly reduced on account of a better agreement for the outer sidelobes of the reconstruction. Figures 6(c) and 6(d) show horizontal cuts through the amplitudes of the initial estimate (dashed curves), the true x-ray field (solid curves), the reconstructions using the 392 nm radius structure (circles) and the 981 nm structure (points). Notice that both reconstructions have an excellent agreement with the true x-ray beam for the cut through the origin, shown in Fig. 6(c). However, there is a significantly better agreement of the reconstruction using the larger translating structure (points) for the cut through *y* = 3 *μ*m, shown in Fig. 6(d). This improvement can also be obtained with the smaller structure by increasing the number of positions of the translating structure so as to cover an increased area of the beam.

Having reconstructed the complex-valued field in this plane, we can numerically propagate it back to the focus plane using angular spectrum. The distance to the best focus plane was estimated by finding the propagation distance that maximized the sharpness of the beam (the sum over the square of the intensity of the beam). Because this is an optimization problem with respect to only one parameter (the propagation distance) we can easily solve it with a simple one-parameter search.

The best focus position using this criteria was found to be at 0.717 *μ*m and 1.358 *μ*m upstream of the nominal focus for the reconstructions using the small and large translating structures, respectively. Recovering a distance different from the nominal focus is not due to an error in the reconstruction. For this beam, the aberrations introduced by the lenses have slightly shifted the best focus position. We confirmed this by also finding the best focus (maximum sharpness) of the true x-ray beam. This was found at 1.318 *μ*m upstream of the nominal focus, in very good agreement with the reconstruction from the 981 nm translating structure.

Figure 7 shows the numerically refocused reconstructions. We obtain an excellent agreement of the reconstructions with the true x-ray beam at the nominal focus, shown in Fig. 3(c), including the shape and location of the sidelobes.

## 3. 1D beam focus diagnostics example

A plane wave was assumed to be incident on a 150 × 150 *μ*m cylindrical lens with a *f* = 10 cm focal length, as shown in Fig. 1(b). The transmissivity and aberrations of the lens (deviation from cylinder) are shown in Figs. 2(a) and 2(b), respectively. The field after the lens was numerically propagated to the beam focus using Eqs. (A5) and (A6) with a *N* × *N* = 1024 × 1024 computational window. The sampling rate at the plane of the lens was ∆*x*
_{1} = ∆*y*
_{1} ≃ 543 nm. The sampling at the focal plane was (∆*x*
_{3}, ∆*y*
_{3}) ≃ (543,19.6) nm.

Figure 8(a) shows the amplitude of the simulated beam at the focal plane. Notice the very different spatial range of the beam for *x* and *y*. The focused beam has a width of approximately 100 nm (peak to first null). Notice that there is substantial variation of the beam along the *y* direction and that the beam extent in that direction is still close to the original 150 *μ*m.

For characterizing the 1D beam focus of a single cylindrical lens, we again introduce a translating structure, as shown in Fig. 1(b), to introduce diversity to the phase retrieval problem, which is even more important than in the 2D case on account of the increased ambiguity of 1D phase retrieval [34]. The beam at 1 mm downstream of the focal plane, where the structure is placed, was computed from the beam at focus using angular spectrum and is shown in Fig. 8(b). Figure 8(c) shows the phase of the 196 nm wide (10 pixels) phase structure. This structure was translated by 81.8 nm (4.67 pixel) to 25 positions along the x-axis. The intensity was measured by a 1024 × 1024 detector array with 40 *μ*m pixel pitch located at 7.37 m downstream the translating structure.

The field at the detector plane was computed, from the field shown in Fig. 8(b), using the numerical propagation approach for cylindrical wavefronts described in Appendix A. The intensity pattern at the detector plane, for one position of the translating structure, is shown in Fig. 9(a). Notice the very different range in the *x* and *y* directions and that the beam vertical extent is still close to the original 150 *μ*m. The simulated measurement, shown in Fig. 9(b), was obtained after integrating the beam intensity over 40 *μ*m square detector pixels. The field intensity along the vertical direction was severely undersampled and only covered about 5 pixels. Poisson-distributed noise was added to the intensity patterns after normalizing them to a total of 2.25×10^{10} photons. This corresponds to an incident flux on the cylindrical lens of 10^{6} photons/*μ*m^{2}/s with 1 second exposure per intensity pattern.

The fact that the intensity pattern is severely undersampled in the *y* direction will make difficult the retrieval of the 2D field. Instead we can integrate the measured intensity over the *y* direction and attempt retrieval of a projection of the field, which is a function of *x*. The integrated intensity along the *y* direction for the pattern shown in Fig. 9(b) is shown in Fig. 9(c).

Since propagation and projection are both integrals, we can show by changing the order of integration that

where 𝓟_{x,y}{․} is the 2D Fresnel diffraction propagation integral, given in Eq. (A1), and 𝓟_{x}{․} is its 1D counterpart. Equation (3) shows that the projection of an arbitrary beam along a Cartesian coordinate follows the paraxial propagation rule of a 1D beam.

Although this result seems promising for using phase retrieval to characterize 1D foci, there is a model mismatch problem. Because the beam projection follows paraxial propagation rules, when solving the 1D phase retrieval problem we implicitly assume we have a measurement of the intensity of the beam projection, *i.e*. |∬*u*(*x,y*)dy|^{2}, but the quantity we measure is the projection of the intensity, *i.e*. ∬ |*u*(*x,y*)|^{2}dy. However, if the fluctuations of the field along the *y* direction are not large compared to the mean, the projection of the intensity gives a reasonably good estimate of the intensity of the field projection. This mismatch makes the use of diverse measurements even more critical for the 1D focus measurement. The implicit assumption of a 1D field also restricts the translating structure to be a 1D function, hence the choice of a phase-shifting structure that is constant along the *y* direction.

The initial guess was assumed to be a 1D field focused by a perfect cylindrical lens with 150 *μ*m aperture and 10 cm focal length, shown in Fig. 10(a) (dashed curve). No defocusing was added to the initial estimate to account for the fact that the distance from the focal plane to the plane of the translating structure may not be known.

For reconstruction we used a 1D version of the nonlinear optimization algorithm used to solve the phase retrieval problem with transverse translation diversity [27]. The amplitude of the projection of the true x-ray beam (at the position of the translating structure) and the amplitude of the reconstruction, after 55 iterations of the nonlinear optimization algorithm, are plotted in Fig. 10(a) (solid curve and points, respectively), showing very good agreement. The error between the reconstruction and the projection of the true x-ray beam is *E* = 0.117.

Because we reconstructed the phase and amplitude of the beam projection and because projections follow 1D propagation rules, we are able to numerically refocus the 1D reconstruction. After removing the extra quadratic phase factor, we searched for the propagation distance that maximized the beam sharpness (sum of the intensity squared) using a single parameter search algorithm. The maximum sharpness for the reconstruction was found at 2 *μ*m downstream the nominal focus. Figure 10(b) shows the amplitude of the projection of the true beam (solid line) and the reconstructed beam (points) at this position. The recovered projected beam at focus is in very good agreement with the true beam projection.

## 4. Conclusions

We developed and demonstrated, through numerical simulations, a technique for accurate and reliable x-ray beam characterization using phase retrieval with transverse translation diversity, with an algorithm originally developed for coherent lensless imaging [27]. Diversity in this case is introduced by transversely displacing a known structure in the path of the beam and recording the intensity of the diffraction pattern in the far field. The structure may be an amplitude structure (*e.g*. a pinhole, as suggested in [28]), but a thinner phase structure is likely to be preferred if the finite beam extent provides a suitable intensity sampling at the plane of the detector. This form of diversity allows for robust reconstructions even for the more difficult problem of 1D phase retrieval. Furthermore, this approach allows us to circumvent the need of a support constraint, which is especially important for x-ray beam characterization where a sharp, well-defined support constraint might not be available.

Transverse translation diversity can also be used to increase the range of phase retrieval for optical wavefront measurement and avoid the need for focus diversity [37]. Introducing a moveable aperture close to the lens increases the effective f-number of the system and allows adequate sampling of the individual point-spread-functions. Focus diversity in this case is no longer needed since the diversity is introduced by overlap of the moveable aperture at different positions. Because the measurements are taken close to focus, the reconstruction algorithm requires a more general numerical propagation than the simple FT relation used in this paper. The gradients of an error metric for the more general propagation and under different field parameterizations are given in [37].

For x-ray beam characterization, using a phase, rather than an absorbing, structure allows the use of structures that are thinner along the propagation direction, which will permit the characterization of beams with smaller depth of focus. We found that reconstructions are accurate even beyond the transverse area overlapped by the translating structure.

Because for phase retrieval the resolution only depends on the largest scattering angle that we can collect with a moderately good signal-to-noise ratio, we can obtain significantly higher resolution than the transverse size of the translating structure and than the distance of the translations. This technique is advantageous, especially for measuring x-ray beams with spot sizes of a few nanometers, compared with current fluorescent scanning techniques, which are limited by the scanning precision and the size of the fluorescent structure. Furthermore, this approach promises to significantly reduce alignment requirements because the translating structure does not need to be placed at the beam focus, and we have shown that the longitudinal distance to the best focus position can be easily estimated. Allowing the structure to be positioned outside of the focal region allows for using a translating structure that is significantly larger than the beam focus spot and easier to manufacture.

We have also shown how this approach can be used to characterize 1D focus spots. Because for hard x-rays a 2D focus may be achieved with two crossed cylindrical lenses, being able to characterize the line focus of a single cylindrical lens is important for assessing the performance of the individual lenses. In our simulations we successfully retrieved a 1D projection of the beam at focus. Because for this reconstruction there is an implicit assumption of a 1D beam, best results are obtained for a structure that can be well approximated by a 1D function.

Transverse translation diversity, along with the nonlinear optimization reconstruction algorithm, were found to make phase retrieval robust, especially for the typically ill-posed 1D phase retrieval problem. For the reconstructions shown in this paper we did not use any assumption about the support or field distribution at the plane of the lens. Unlike the PIE and difference-map algorithms, the error metric for the nonlinear optimization algorithm can only decrease from one iteration to the next. The likelihood of stagnation of the algorithm is greatly reduced through the diverse measurements. Thus a stopping criterion (tolerance) can be straightforwardly implemented, and we avoid the need of averaging reconstructions from subsequent iterations [28].

In our simulations we assumed accurate knowledge of the translating structure and its displacements. However, any experimental scenario will have uncertainty in the characterization of these parameters. It has been shown that reconstruction artifacts can arise even for errors in the translation that are on the order of the final resolution of the reconstruction [27]. We expect that, as in [27], the nonlinear optimization algorithm can be used to refine the estimate of the structure transmissivity and its translations, while reconstructing the beam, thus further reducing the experimental requirements. Furthermore, a nonlinear optimization algorithm can account for further experiment details in the forward model. This allows inclusion of (and optimization over) different additive and multiplicative bias in the measurements, effects of pixel size, reduced transverse coherence, detector and sample drift, misalignments and jitter, without the need to preprocess the measured data [37, 38].

The techniques described in this paper are directly applicable for characterizing beams at other wavelengths, *e.g*., extreme ultraviolet or optical.

Portions of this research were presented at [39]. We are thankful to Kenneth Evans-Lutterodt (Brookhaven National Laboratory) for helpful discussions.

## Appendix A: Propagation of cylindrical wavefronts

In this section we outline a numerically efficient approach for simulating the paraxial propagation of scalar cylindrical wavefronts, which are important for focusing x-ray beams.

Within the paraxial approximation, a field after propagation by a distance *z* can be computed by the Fresnel diffraction integral [3],

$$\phantom{\rule{7.3em}{0ex}}\times \iint {u}_{\mathrm{in}}\left(x\prime ,y\prime \right)\mathrm{exp}\left[\frac{\mathrm{ik}}{2z}\left({x\prime}^{2}+{y\prime}^{2}\right)\right]\mathrm{exp}\left[-\frac{i2\pi}{\mathrm{\lambda z}}\left(\mathrm{xx}\prime +\mathrm{yy}\prime \right)\right]dx\prime \phantom{\rule{.2em}{0ex}}dy\prime $$

where we have dropped the exp(*ikz*) factor, *λ* is the illumination wavelength, *k* is the wavenum-ber, and uin and uout are the fields before and after propagation, respectively. Notice that Eq. (A1) is in the form of a 2D FT. To efficiently compute Eq. (A1) one must seek a representation that does not require sampling of a large quadratic phase, because this can greatly increase the number of points required to avoid aliasing. It is also convenient to carry the quadratic phase outside of the integral analytically.

If the phase of *u _{in}* can be sampled by a reasonable number of points (is not a strongly converging or diverging field) and we propagate a large distance

*z*, then the propagation can be computed by a single 2D FFT as expressed in Eq. (A1). When using the FFT, the output sampling will be

*x*=

*λz*/(

*N*∆

*x*′), where

*N*×

*N*is the size of the computational array, and ∆

*x*′ and ∆

*x*are the sample spacings at the input and output planes, respectively. However, if the propagation distance is small, sampling the quadratic phase kernel in Eq. (A1) may become an issue. In that case computing the propagation in Fourier domain by a two-step transfer function approach [3] (paraxial angular spectrum) is preferable,

where the 2D FT is given by

This approach preserves the input sampling.

If, on the other hand, *u _{in}* is a focusing field, we can avoid sampling of the large spherical wavefront component by using a single FT computation if

*u*needs to be computed close to the beam nominal focus. The quadratic factor on the field will then nearly cancel the quadratic kernel of the Fresnel integral, and the output sampling will be given by ∆

_{out}*x*=

*λ*

*z*|(

*N*∆

*x*′). For cases where the focusing field needs to be propagated far from the nominal focus (either close to the original field or on the opposite side of focus) a two step approach is more convenient, propagating the field to the nominal focus and then to the plane of interest. For this case the relation of output and input sampling is ∆

*x*= |

*zf*-

*z*|∆

*x*′|

*zf*, where

*zf*is the distance from

*u*to the nominal focus and

_{in}*z*is the distance from

*u*to

_{in}*u*.

_{out}The guidelines outlined above do not apply in general to strongly converging or diverging cylindrical wavefronts (as obtained after focusing by a cylindrical lens). For example if a cylindrical wavefront needs to be propagated to (or near) nominal focus, relaxing the sampling requirements for the quadratic phase along the focusing direction [using Eq. (A1)] requires sampling the quadratic phase of the integral kernel along the non-focusing direction.

A more efficient approach to compute *u _{out}* in this case can be sought by noting that paraxial propagation is separable in Cartesian coordinates. So that the integrals can be computed independently for the

*x*and

*y*directions following the guidelines given above.

For example, consider the case where *u _{in}* is the field transmitted by a cylindrical lens of focal length

*f*(focusing only along the

*x*direction), then

where *t*(*x,y*) is a complex-valued function. The amplitude of *t*(*x,y*) describes the field amplitude right after the lens and its phase describes the wavefront deviation from a cylinder.

Propagation of this field to (or near) the beam focus can be efficiently computed by using a single step propagation along the focusing direction and a paraxial angular spectrum approach along the non-focusing direction. One would then compute (applying 1D FFTs over 2D arrays)

where,

and ℱ_{y→fy}{․} is the 1D FT.

Notice that this approach leads to very different sampling in the horizontal and vertical directions at the focal plane, ∆*y* = ∆*y*′ and ∆*x* = *λf*/(*N*∆*x*′). This different sampling along the horizontal and vertical directions is appropriate for this problem because focusing occurs only along x and the beam at focus has a widely different extent along the *x* and *y* directions.

## References and links

**1. **I. McNulty, J. Kirz, C. Jacobsen, E. H. Anderson, M. R. Howells, and D. P. Kern, “High-Resolution Imaging by Fourier Transform X-ray Holography,” Science **256**, 1009–1012 (1992). [CrossRef] [PubMed]

**2. **W. Leitenberger, T. Weitkamp, M. Drakopoulos, I. Snigireva, and A. Snigirev, “Microscopic imaging and holography with hard X-rays using Fresnel zone-plates,” Opt. Commun . **180**, 233–238 (2000). [CrossRef]

**3. **J. W. Goodman, *Introduction to Fourier Optics, 3rd Ed*. (Roberts & Company, Englewood, 2005).

**4. **S. Eisebitt, J. Lüning, W. F. Schlotter, M. Lörgen, O. Hellwig, W. Eberhardt, and J. Stöhr, “Lensless imaging of magnetic nanostructures by x-ray spectro-holography,” Nature **432**, 885–888 (2004). [CrossRef] [PubMed]

**5. **S. G. Podorov, K. M. Pavlov, and D. M. Paganin, “A non-iterative reconstruction method for direct and unambiguous coherent diffractive imaging,” Opt. Express **15**, 9954–9962 (2007). [CrossRef] [PubMed]

**6. **M. Guizar-Sicairos and J. R. Fienup, “Holography with extended reference by autocorrelation linear differential operation,” Opt. Express **15**, 17592–17612 (2007). [CrossRef] [PubMed]

**7. **S. Marchesini, S. Boutet, A. E. Sakdinawat, M. J. Bogan, S. Bajt, A. Barty, H. N. Chapman, M. Frank, S. P. Hau-riege, A. Szöke, and C. Cui*et al*., “Massively parallel x-ray holography,” Nat. Photonics **2**, 560–563 (2008). [CrossRef]

**8. **M. Guizar-Sicairos and J. R. Fienup, “Direct image reconstruction from a Fourier intensity pattern using HERALDO,” Opt. Lett . **33**, 2668–2670 (2008). [CrossRef] [PubMed]

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

**10. **J. R. Fienup, “Phase retrieval algorithms: a comparison,” Appl. Opt . **21**, 2758–2769 (1982). [CrossRef] [PubMed]

**11. **J. R. Fienup, “Reconstruction of a complex-valued object from the modulus of its Fourier transform using a support constraint,” J. Opt. Soc. Am . A **4**, 118–123 (1987). [CrossRef]

**12. **J. N. Cederquist, J. R. Fienup, J. C. Marron, and R. G. Paxman, “Phase retrieval from experimental far-field speckle data,” Opt. Lett . **13**, 619–621 (1988). [CrossRef] [PubMed]

**13. **J. Miao, P. Charalambous, J. Kirz, and D. Sayre, “Extending the methodology of X-ray crystallography to allow imaging of micrometre-sized non-crystalline specimens,” Nature **400**, 342–344 (1999). [CrossRef]

**14. **S. Marchesini, H. He, H. N. Chapman, S. P. Hau-Riege, A. Noy, M. R. Howells, U. Weierstall, and J. C. H. Spence, “X-ray image reconstruction from a diffraction pattern alone,” Phys. Rev . B **68**, 140101 (2003). [CrossRef]

**15. **D. Shapiro, P. Thibault, T. Beetz, V. Elser, M. Howells, C. Jacobsen, J. Kirz, E. Lima, and H. Miao*et al*., “Biological imaging by soft x-ray diffraction microscopy,” Proc. Natl. Acad. Sci. U.S.A . **102**, 15343–15346 (2005). [CrossRef] [PubMed]

**16. **J. R. Fienup, “Lensless coherent imaging by phase retrieval with an illumination pattern constraint,” Opt. Express **14**, 498–508 (2006). [CrossRef] [PubMed]

**17. **H. N. Chapman, A. Barty, S. Marchesini, A. Noy, S. P. Hau-Riege, C. Cui, and M. R. Howells*et al*., “High-resolution ab initio three-dimensional x-ray diffraction microscopy,” J. Opt. Soc. Am . A **23**, 1179–1200 (2006). [CrossRef]

**18. **B. Abbey, K. A. Nugent, G. J. Williams, J. N. Clark, A. G. Peele, M. A. Pfeifer, M. de Jonge, and I. McNulty, “Keyhole coherent diffractive imaging,” Nat. Physics **4**, 394–398 (2008). [CrossRef]

**19. **M. Guizar-Sicairos and J. R. Fienup, “Phase retrieval with Fourier-weighted projections,” J. Opt. Soc. Am . A **25**, 701–709 (2008). [CrossRef]

**20. **R. A. Gonsalves and R. Childlaw, “Wavefront sensing by phase retrieval,” Proc. SPIE **207**, 32–39 (1979).

**21. **R. A. Gonsalves, “Phase retrieval and diversity in adaptive optics,” Opt. Eng . **21**, 829–832 (1982).

**22. **R. G. Paxman, “Diversity imaging,” in *Signal Recovery and Synthesis*, 2001 OSA Technical Digest Series (Optical Society of America, 2001), paper SWA1.

**23. **G. R. Brady and J. R. Fienup, “Nonlinear optimization algorithm for retrieving the full complex pupil function,” Opt. Express **14**, 474–486 (2006). [CrossRef] [PubMed]

**24. **H. M. L. Faulkner and J. M. Rodenburg, “Movable aperture lensless transmission microscopy: a novel phase retrieval algorithm,” Phys. Rev. Lett . **93**, 023903 (2004). [CrossRef] [PubMed]

**25. **J. M. Rodenburg and H. M. L. Faulkner, “A phase retrieval algorithm for shifting illumination,” Appl. Phys. Lett . **85**, 4795–4797 (2004). [CrossRef]

**26. **O. Bunk, M. Dierolf, S. Kynde, I. Johnson, O. Marti, and F. Pfeiffer, “Influence of the overlap parameter on the convergence of the ptychographical iterative engine,” Ultramicroscopy **108**, 481–487 (2008). [CrossRef]

**27. **M. Guizar-Sicairos and J. R. Fienup, “Phase retrieval with transverse translation diversity: a nonlinear optimization approach,” Opt. Express **16**, 7264–7278 (2008). [CrossRef] [PubMed]

**28. **P. Thibault, M. Dierolf, A. Menzel, O. Bunk, C. David, and F. Pfeiffer, “High-resolution scanning x-ray diffraction microscopy,” Science **321**, 379–382 (2008). [CrossRef] [PubMed]

**29. **M. Engelhardt, J. Baumann, M. Schuster, C. Kottler, F. Pfeiffer, O. Bunk, and C. David, “Inspection of refractive x-ray lenses using high-resolution differential phase contrast imaging with a microfocus x-ray source,” Rev. Sci. Instrum . **78**, 093707 (2007). [CrossRef] [PubMed]

**30. **H. Mimura, H. Yumoto, S. Matsuyama, S. Handa, T. Kimura, Y. Sano, M. Yabashi, Y. Nishino, K. Tamasaku, and T. Ishikawa*et al*., “Direct determination of the wave field of an x-ray nanobeam,” Phys. Rev . A **77**, 015812 (2008).

**31. **H. C. Kang, J. Maser, G. B. Stephenson, C. Liu, R. Conley, A. T. Macrander, and S. Vogt, “Nanometer linear focusing of hard x rays by a multilayer Laue lens,” Phys. Rev. Lett . **96**, 127401 (2006). [CrossRef] [PubMed]

**32. **A. Stein, K. Evans-Lutterodt, N. Bozovic, and A. Taylor, “Fabrication of silicon kinoform lenses for hard x-ray focusing by electron beam lithography and deep reactive ion etching,” J. Vac. Sci. Technol . B **26**, 122–127 (2008). [CrossRef]

**33. **H. M. Quiney, A. G. Peele, Z. Cai, D. Paterson, and K. A. Nugent, “Diffractive imaging of highly focused x-ray fields,” Nat. Physics **2**, 101–104 (2006). [CrossRef]

**34. **Y. M. Bruck and L. G. Sodin, “On the ambiguity of the image reconstruction problem,” Opt. Commun . **30**, 304–308 (1979). [CrossRef]

**35. **J. R. Fienup, “Invariant error metrics for image reconstruction,” Appl. Opt . **36**, 8352–8357 (1997). [CrossRef]

**36. **M. Guizar-Sicairos, S. T. Thurman, and J. R. Fienup, “Efficient subpixel image registration algorithms,” Opt. Lett . **33**, 156–158 (2008). [CrossRef] [PubMed]

**37. **G. R. Brady, M. Guizar-Sicairos, and J. R. Fienup, “Optical wavefront measurement using phase retrieval with transverse translation diversity,” Opt. Express **17**, 624–639 (2009). [CrossRef] [PubMed]

**38. **S. T. Thurman, R. T. DeRosa, and J. R. Fienup, “Amplitude metrics for field retrieval with hard-edge and uniformly-illuminated apertures,” J. Opt. Soc. Am . A , doc. ID 101701 (posted 26 January 2009, in press). [CrossRef]

**39. **M. Guizar-Sicairos and J. R. Fienup, “Focused x-ray beam characterization by phase retrieval with a move-able phase-shifting structure,” in *Frontiers in Optics*, OSA Technical Digest Series (Optical Society of America, 2008), paper FWN3.