We applied the method of ptychography to the characterization of a nanofocused XFEL beam at the Linac Coherent Light Source (LCLS)32. The experiment was carried out at the Matter in Extreme Conditions (MEC) instrument located in the far hall of the LCLS, 464 m from the XFEL undulator. Fig. 1 (a) is a schematic of the experimental setup. A set of parabolic refractive X-ray lenses made of beryllium33,34 was used to focus the XFEL pulses to a nominal full width at half maximum (FWHM) spot size of 115 nm about 250 mm behind the optic (see nanofocusing by beryllium CRL optics in the Methods). In order to avoid chromatic aberration and to stabilize the focus position along the optical axis, we fixed the photon energy of the XFEL beam to E = 8.2 keV by a four bounce (Bartels type) monochromator positioned at a distance of 376.4 m upstream the sample.

Figure 1 Description of setup and sample. (a) Schematic outline of the experimental setup. Optical axis is not to scale. (b) Scanning electron microscope (SEM) image of a high-resolution test chart made of a 40 by 40 array of starlike structures, patterned into a tungsten layer (thickness 1 μm) on a diamond substrate (thickness 100 μm). Its smallest features have a size of about 50 nm. (c) Single-pulse far-field diffraction pattern recorded as part of the ptychographic dataset (logarithmic scale). Full size image

A resolution test chart [cf. Fig. 1 (b)] was positioned at a distance of 0.5 mm behind the focus and was scanned through the focused beam in a two-dimensional grid perpendicular to the optical axis. At each scan position two far-field diffraction patterns [cf. Fig. 1 (c)] were recorded by a two-dimensional detector located 4.14 m behind the focus (see experimental details in the Methods). The XFEL beam was attenuated using polished single crystal silicon absorbers to the level that the diffraction patterns do not exceed the dynamic range of the detector. As a result, the beam intensity on the sample was well below its damage threshold. Based on this set of diffraction patterns the object and average illumination were reconstructed using the algorithm by Maiden and Rodenburg23 combined with a refinement of the scan positions (see position refinement in the Methods). The result of the reconstruction is depicted in Fig. 2, showing both the phase of the object [cf. Fig. 2 (a)] and the complex wave field in the plane of the object [cf. Fig. 2 (b)].

Figure 2 Numerically retrieved illumination and object function. (a) Ptychographic reconstruction of the test object (phase shift in radian). All scan points lie within the black rectangle. Two specific diffraction patterns obtained from areas marked with numbers 1 and 2 are used to investigate pulse-to-pulse fluctuations of the nanofocused X-ray beam. (b) Reconstructed average illumination function is shown on the same length scale. The amplitude is encoded by brightness and the phase by hue. (c) Measured far-field image of the focused beam without any sample in the beam. (d) Far-field image calculated from the reconstructed wave field. Full size image

For the reconstruction, we assumed that the wave field in the focus was constant over the whole ptychographic scan, ignoring the pulse-to-pulse fluctuations of the XFEL beam. It was a priori not clear if this is a well justified assumption. However, the results show that the fluctuations in the wave field of the focused XFEL beam are small enough to allow for a meaningful average reconstruction. This is supported by the fact that the ptychographic reconstruction converged well, giving a detailed image of the object free of aberrations even far outside of the scanned area [cf. Fig. 2 (a)]. This is only possible if even the weak amplitudes of the illumination well away from the central focus are consistent and reconstructed faithfully. The maximum phase shift of approximately −1.8 rad is in good agreement with the theoretical value of −1.9 rad for a 1 μm thick tungsten layer.

Furthermore, one can check the consistency of the reconstructed wave field by numerically propagating it to the detector plane and comparing the resulting intensity distribution with that measured directly without sample and independently of the ptychogram. Fig. 2 (c) and (d) show the measured intensity and the corresponding one determined numerically from the reconstructed wave field, respectively. The reconstructed far-field intensity varies slightly more than the measured one. However, it contains all the characteristic features of the measured far-field intensity.

The reconstructed average wave field can now be used to fully characterize the nanobeam and understand the aberrations of the optic. Fig. 3 shows the complex wave field propagated along the optical axis using the Fresnel-Kirchhoff integral35. From Fig. 3 it is apparent, that paraxial rays are focused to a shorter focal length (arrow 1 in Fig. 3) than rays coming from larger angles (arrow 2 in Fig. 3). This spherical aberration is caused by deviations of the lens shape from a perfect rotational paraboloid and can occur, for example, when during fabrication of the lens the center of rotation is not perfectly aligned to the apex of the parabola. Therefore, the radius of curvature in the central area of the lens is typically increased as compared to the nominal parabolic shape. As a result, not all the intensity is focused to the central spot, giving rise to the side maxima [cf. Fig. 2 (b)]. Fig. 4 (d) shows a line profile through the focus that has a lateral extension of 125 nm FWHM, slightly larger than the expected size of 115 nm.

Figure 3 Complex wave field propagated ±15 mm along the optical axis. The colors indicate the local phase as illustrated in the inset. Amplitude is encoded by brightness. Full size image

Figure 4 Comparison of illumination functions retrieved from a single diffraction pattern (single pulse) and multiple diffraction patterns (average). (a) Reconstructed average wave field in the sample plane. (b), (c) Wave fields obtained from a single diffraction pattern measured at position 1 and 2 as indicated in Fig. 2 (a). (d) Intensity profiles through the focus for the average and individual wave fields presented above, showing both the individuality of single pulses and the similarity to the reconstructed average wave field. The phase is coded according to the color wheel. Full size image

Finally, we can use the ptychographic data to reconstruct single pulse illumination functions for each pulse in the ptychographic data set and compare them to the average illumination. We do this by introducing an individual illumination to each ptychographic scan point and by refining them all with the ptychographic algorithm while keeping the (previously reconstructed) object function unchanged (see reconstruction of single-pulse illumination in the Methods). Fig. 4(b) and (c) show two single pulse reconstructions. They appear quantitatively similar to the average wave field [cf. Fig. 4 (a)] in the highest intensity part around the focus. The weaker amplitudes are slightly noisier, since there is only one diffraction pattern determining the single pulse illumination instead of several hundreds for the average illumination. Thus, the signal-to-noise ratio is reduced in these local reconstructions. The main features of the nanofocus, however, remain unchanged from pulse to pulse, despite pulse-to-pulse fluctuations of the XFEL beam. This in itself is an important result, showing that a focused XFEL beam is quite stable and reproducible in its spatial distribution.