1 Introduction

High-resolution imaging at the nanoscale is one of the most efficient methods to reveal the fine structure of matter, such as functional materials [1, 2], biological cells [3,4,5,6], and organelles [7]. Owing to the high penetration depth and short wavelength intrinsic properties of X-ray, X-ray-based microscopes are widely applied for high-resolution imaging of bulk samples in two and three dimensions [8]. In the past two decades, with the rapid development of coherent X-ray light sources and tremendous effort in novel X-ray imaging methods, a novel lensless imaging method called coherent diffraction imaging (CDI) [9] has been developed and applied to reveal fine structures at the nanoscale. By illuminating the isolated sample with coherent X-ray sources, the weak but continuous diffraction intensities of the samples could be recorded by X-ray detectors positioned downstream of the samples [10]. As the far-field coherent diffraction patterns are the Fourier transform of the sample intensity, the structural images of the samples can be obtained using phase-retrieval algorithms [11]. The physical principle of CDI is simple, but its key factors are coherence and the high brightness of the light sources.

X-ray free-electron lasers (XFELs) are powerful X-ray sources that generate unprecedented ultra-bright and highly coherent femtosecond pulses [12, 13]. FLASH was the first soft XFEL to work on the self-amplified spontaneous emission (SASE) principle [14], operated in 2006. The first hard X-ray free-electron laser, LCLS, was commissioned and operated in 2010 [15]. To date, there are another five XFEL user facilities: FERMI in Italy [16], SACLA in Japan [17], PAL-XFEL in South Korea [18], Swiss-XFEL in Switzerland [19] and European-XFEL in Germany [20]. Two more XFEL facilities, named LCLS-II in the USA [21] and SHINE [22] in China, based on superconducting accelerators with a continuous wave mode, are under construction. The development and construction of XFELs worldwide opens up new frontiers in the imaging of matter with atomic resolution and investigation of the dynamic process at femtosecond time scales. As a photon-hungry method [23], CDI greatly benefits from the unparalleled advantages of XFELs [24], such as spatial and temporal coherence, femtosecond pulse duration, and gigawatt peak power.

The Shanghai soft X-ray free-electron laser facility (SXFEL) is the first X-ray FEL facility in China with an X-ray energy range of 100–620 eV, located on the campus of the Shanghai Synchrotron Radiation Facility (SSRF) [25]. It is composed of two projects: the SXFEL, a user facility upgraded from the previous test facility [26], and the Shanghai-XFEL beamline projection (SBP). The SXFEL consists of a 1.5 GeV linear accelerator, two undulator lines, two beamlines, and five endstations. Two XFEL modes are supplied to users depending on the design of the undulator lines. One is based on the SASE process, and the other is upgraded from the SXFEL test facility and is operated with a two stage high-gain harmonic generation (HGHG) cascade, or cascaded echo-enabled harmonic generation (EEHG) and HGHG mode [25]. The two beamlines were designed to deliver SASE and externally seeded XFEL pulses to the endstations. In Phase I, five endstations were proposed according to the scientific scope, focusing on dynamic scattering and high spatial and temporal imaging, ultrafast physical phenomena, surface and ultrafast chemical processes and atomic and molecular physics. The coherent scattering and imaging (CSI) endstation is primarily designed for high temporal and spatial resolution using CDI and Fourier transform holography (FTH). Furthermore, other methods based on forward scattering geometry can be used, such as time-resolved small-angle X-ray scattering (Tr-SAXS).

In the spring of 2021, the linear accelerator and the SASE undulator line of the SXFEL were commissioned. At the end of May 2021, XFEL pulses were delivered to the CSI endstation after the preliminary commissioning of the SASE beamline. The focusing performance and single-shot imaging methods were subsequently commissioned at the CSI endstation, for which we report the first results here.

2 Overview of the CSI endstation at SXFEL

The CSI endstation was located downstream of the SASE beamline. During commissioning, the main tasks were to deliver highly focused coherent SASE pulses to the endstation and achieve single-shot imaging based on the concept of “diffraction before destruction”. The main parameters of the SASE beamline and CSI endstation are summarized in Table 1. The X-ray energy ranged from 100 to 620 eV, with a typical pulse energy of approximately 200 μJ at 520 eV and a pulse duration of < 100 fs [ 27]. The designed repetition rate is 50 Hz.

Table 1 The light source parameters and capabilities of the CSI endstation

Figure 1 presents an overview of the CSI endstation. The main components of the SASE beamline were offset mirrors, a Kirkpatrick–Baez (KB) mirror system, and related diagnostic instruments. To transfer the XFEL pulses to the CSI endstation, a pair of horizontal deflection offset mirrors was used, as shown in Fig. 1a, to separate the FEL from high-energy spontaneous and bremsstrahlung radiation. The first offset mirror was placed 59 m downstream from the source point, and the second was placed 6 m downstream from the first. They generated a 312 mm beam offset to easily block bremsstrahlung and high-energy radiation. In front of the offset mirrors, there were various diagnostic tools and beamline instruments, including gas attenuation to adjust the pulse energy to the endstation and two gas intensity monitors to measure the pulse energy shot by shot. Several imagers were installed downstream of the components to determine the beam position and profile.

Fig. 1
figure 1

(Color online) Diagram of the SASE beamline and CSI endstation at SXFEL: a side view of the SASE beamline layout for the CSI endstation; b main components of the CSI endstation

A KB mirror system was installed in front of the sample chamber to increase photon density at the sample position. The XFEL spots could be focused down to approximately 3 μm. As shown in Fig. 1a, the KB mirror system includes three mirrors, one flat and two elliptical, to focus the XFEL pulses vertically and horizontally. The flat mirror was parallel to the vertical focusing mirror to maintain an outgoing beam in the horizontal plane. All three mirrors were installed in the same chamber and supported to reduce vibration. The vertical focusing mirror was located 118 m downstream from the source point. The horizontal focusing mirror was 0.5 m downstream of the vertical focusing mirror with a 1.5 m focus length. Owing to the long distance from the source point to the KB mirror system, the mirror length was 480 mm with a 400 mm clean aperture to have a 6σ acceptance for energy higher than 300 eV. All three mirrors were coated with boron carbide (B4C) with a 26 mrad grazing angle [28].

The CSI endstation was installed downstream of the KB mirror chamber. It included a sample chamber, detection chamber, and related control and vacuum pumping units, as shown in Fig. 1b. The sample chamber was flexibly and adaptably designed for multiple purposes using different types of sample delivery systems and sample environments. The large-volume design and multiple ports of various sizes in the sample chamber allow for different types of experiments. Depending on the experimental requirements, different sample delivery systems and environments can be installed in the sample chamber, including a fixed target sample scanning stage [29], aerosol sample injector [30], and cryogenic sample stages. By introducing the optical pumping laser through the chamber port to the sample position and spatially and temporally coupling with the XFEL, time-resolved experiments are also possible. The parameters of the optical-pump laser are listed in Table 1. To eliminate air absorption and scattering, the sample chamber was operated in a high vacuum of approximately 5 × 10−8 mbar. To preserve the XFEL wavefront, a windowless connection between the sample chamber and the KB mirror system is necessary. A compact differential pumping system (DPS) was installed between the KB mirror chamber and sample chamber to provide a gradient vacuum transition.

A detection chamber was installed downstream of the sample chamber. The main components of the detection chamber were a water-cooling charge-coupled device (CCD) in-vacuum detector (PI-MTE3:2048B, Teledyne Princeton Instrument, PI-MTE3:4096B is optional) and three-dimensional moving stages to mount and align the in-vacuum detector. The distance between the sample and detector was adjustable between 50 and 350 mm. A gate valve with a DN250CF flange was installed between the sample and the detection chambers. By closing the gate valve, the detection chamber maintained a high vacuum to avoid frequent warming and cooling of the in-vacuum detector during sample chamber venting. By extending the detector to the sample chamber through the gate valve, a minimum distance of 50 mm was achieved for high-resolution imaging and scattering experiments.

3 The commissioning experiments

Single-shot imaging experiments were conducted to evaluate the performance of the CSI endstation. The X-ray energy was fixed at 520 eV, just before the oxygen K-absorption edge. The pulse duration was estimated to be less than 100 fs by measuring the energy loss of the electron bunch and reconstructing the phase space of the X-ray pulse [31,32,33]. A maximum pulse energy greater than 200 μJ was achieved at the source point. Owing to the reflectivity and clean aperture limitation of the optical mirrors in the SASE beamline, the maximum pulse energy at the sample position was estimated to be approximately 100 μJ. The pulse repetition rate was set at 2 Hz. Before delivering the XFEL pulses to the KB mirror system, more than four invasive Ce-YAG imagers upstream of the KB mirror system were used to check the beam profile. In the DPS, another invasive Ce-YAG screen was installed to image the beam profile outcome of the KB mirrors. These imagers ensured that the entire beam was delivered to the sample chamber. During data collection, all imagers moved out of the beam path. To remove parasitic scattering from the imperfect surface and the edge of the offset mirrors, precise four-way slits were placed upstream of the KB mirrors.

The XFEL pulses were focused by the KB mirror system. During commissioning, a fixed target sample delivery system was used, including XYZ piezo motor scanning stages, as shown in Fig. 2a, and sample holders to mount multiple Si3N4 membranes, as shown in Fig. 2b. Four Si3N4 membranes and a Ce-YAG screen were mounted on a flag-type sample holder. Upstream of the sample stages, two four-jaw slits and one fixed clean aperture were installed to block parasitic scattering from the upstream optics, as shown in Fig. 2a. A magnification adjustable microscope was mounted on top of the sample chamber (Fig. 1b) with a working distance of 400 mm to observe the sample and the XFEL spot position through a vacuum viewport and reflection mirror (Fig. 2a)). The maximum resolution of the microscope was better than 10 μm. Using a microscope, the preliminary focus size could be measured. To obtain a focus spot as small as possible, edge scanning with a silicon frame mounted on the sample holder was performed by attenuating the X-ray intensity to the radiation threshold of Si. An X-ray photodiode was placed behind the silicon frame to measure the beam intensity. By precisely aligning the reflection angle and position of the KB mirrors, the spot size at the sample position was found to be smaller than 5 μm.

Fig. 2
figure 2

(Color online) Fixed target sample delivery system for the CSI endstation: a piezo-driven XYZ fixed target sample scanning stages; b flag-type sample holder with silicon nitride membranes; c single Si3N4 window with deposited gold nanoparticles before the single-shot experiment; d membranes with holes after the single-shot experiment

The maximum flux density at the sample position was estimated to be approximately 6.3 × 1010 photons/μm2, which is above the Si3N4 radiation damage threshold. Various samples were tested during commissioning experiments to verify the imaging performance of the CSI endstation. AuNPs and purified mitochondria were selected as test samples for CDI. The samples were dispersed on Si3N4 membranes with thicknesses of 30 nm. For each membrane, there were 25 independent windows with a single window size of 0.5 × 0.5 mm2, as shown in Fig. 2c. By controlling the concentration of the sample solutions, the samples on the membrane could be uniformly dispersed for single-shot imaging. The zoomed-in image in Fig. 2c shows a gold nanocube with a length of 170 nm (Nanocube-170, NanoSeedz Limited). The XFEL beam position was aligned on the Si3N4 membranes, and a raster scan was applied to the membranes at an interval of 40–70 μm, depending on the focused beam size. Because of the ultrahigh peak intensity at the focus spot, which far exceeded the radiation threshold of both the Si3N4 membrane and samples, the samples and membrane were ionized, and a hole was drilled on the membrane for each XFEL pulse shot. The Si3N4 membrane window after the single-shot experiment is shown in Fig. 2d. A scanning interval of 50 μm was used. For each membrane, more than 2025 diffraction patterns were recorded. Four membranes were mounted on the sample holder, and two sample holders, as shown in Fig. 2a, can be mounted on the sample scanning stage at the same time. Therefore, in total, approximately 16,200 diffraction patterns can be recorded for one sample loading. To ensure that only one XFEL pulse shot the membrane at a scanning position, a fast X-ray shutter was installed in the beamline. The minimum open/closed cycle time was less than 20 ms, corresponding to a repetition rate of 50 Hz, which is the maximum fundamental repetition rate of the SXFEL. The trigger signal of the X-ray shutter was synchronized to the in-vacuum X-ray detector and the sample stage. Therefore, a single-shot diffraction pattern can be recorded using a CCD detector. During the first commissioning experiment, the distance between the sample and detector was set to 250 mm. When PI-MTE3:4096 was used, the maximum diffraction angle was approximately 7° at the midpoint of the detector edges, and 9.9° at the detector corner. The diffraction-limited resolution can be calculated as \({d}_{\mathrm{lr}}=\frac{\lambda }{2\mathrm{sin}(\alpha )}\) [34]. Here, \(\lambda\) is the X-ray wavelength and \(\mathrm{\alpha }\) is the diffraction angle. At this experimental geometry, the \({d}_{\mathrm{lr}}\) at the midpoint of detector edges is 9.8 nm for half-period resolution, corresponding to 19.7 nm for full-period resolution. The \({d}_{\mathrm{lr}}\) at the detector corner was calculated to be approximately 7 and 14 nm for half-period and full-period resolution, respectively. By moving the detector close to the sample, finer diffraction-limited resolution can be achieved. At the CSI endstation, the minimum distance from the sample to the detector was 50 mm. The finest diffraction-limited resolution at 2.4 nm wavelength was 2.3 nm at the detector edge and 1.7 nm at the detector corner.

4 The commissioning results

4.1 Single-shot coherent diffraction imaging

Diffraction patterns were recorded using an in-vacuum detector by scanning the membranes deposited with the test samples. Owing to the random distribution of the samples and raster scanning, only the diffraction signals could be recorded when the XFEL pulse hit the sample by chance. Therefore, these patterns may be from a single particle, multiple particles, or nonparticles. By optimizing the sample density according to the focal spot size, an optimal single-particle hit rate can be achieved. By taking a fast data classification depending on the signal intensity, the diffraction patterns of hit sample were selected.

The gold nanocubes were first tested at the CSI endstation. Thousands of diffraction patterns were recorded during the commissioning. Figure 3a shows a typical single-particle diffraction pattern from an Au nanocube. The high contrast and visibility of the diffraction speckle indicate an almost full transverse coherence. Benefiting from the ultrahigh peak brilliance of the SXFEL, the diffraction signals extended to the edge of the CCD detector. The purple arrow in Fig. 3a refers to the missing central area owing to the beam stop, which is used to protect the CCD detector from the direct beam. The beam stop was mounted on XZ-motorized stages. By manipulating the position of the beam stop and clean slits upstream of the samples, the missing central area was reduced to less than the central speckle, as shown in Fig. 3a. Most of the central speckles can be recorded, which is important for obtaining unique reconstruction results [35]. The diffraction signals indicated by the white arrow were removed as missing data owing to the nonlinearity of the partial CCD chip. The perpendicular diffraction fringes were approximated well by the diffraction of the square aperture.

Fig. 3
figure 3

(Color online) Single-shot imaging of a single gold nanocube: a diffraction pattern of a single gold nanocube; b reconstructed image from (a); c line scan along the black dashed line as shown in (a); d power spectrum calculated from (a)

Phase retrieval was applied to the diffraction pattern to obtain a real-space image of the sample. Two thousand hybrid in–out (HIO) iterations following 200 error reduction (ER) iterations were used during one reconstruction cycle, and 1000 independent reconstructions were conducted. Figure 3b shows the reconstructed image with an average of 100 selected reconstructions, depending on the reconstruction errors; it exhibited a square shape with a slightly uniform density distribution. The inset in Fig. 3b shows a transmission electron microscope (TEM) image of similar nanocubes, and the reconstructed image shows good consistency with the TEM image. The edge length of the cubic particles can be estimated from the following equation: \(d=\frac{1}{\Delta q}\), where ∆q is the full width of the speckles, as shown in the inset of Fig. 3a [36]. By drawing the intensity profile along the black dashed line in Fig. 3a, ∆q can be calculated, as shown in Fig. 3c. Here, ∆q was determined to be 6.05 μm−1, corresponding to an edge length of 165.3 nm. From the reconstructed image, the edge length of the nanocube was measured to be 164.5 nm. The edge length difference was smaller than one pixel, that is, 9.5 nm. To estimate the diffraction signal intensity, the power spectrum density (PSD) of the diffraction pattern was calculated, as shown in Fig. 3d. From the PSD curve, the signal extended to a spatial frequency of ~ 80 μm−1. As the spatial frequency increased, the signal intensity decreased exponentially. Even a spatial frequency of 50 μm−1 corresponded well to the theoretical value, as shown by the dashed red line, indicating a good signal-to-noise ratio.

Gold nanospheres with a diameter of approximately 200 nm (NS-200-50, NanoSeedz Limited) were imaged at the CSI endstation as another test sample. Figure 4a shows the diffraction patterns of the gold nanospheres. The clear interference speckles indicate the presence of more than one nanosphere. The signals filled the full chip of the in-vacuum detector, and diffraction speckles with high contrast were recognized. Using the same process, a reconstruction process was applied to the diffraction pattern. The reconstructed image is shown in Fig. 4b. The inset is the TEM image from similar gold nanospheres. The PSD curve was calculated from Fig. 4a, as indicated by the black line in Fig. 4c. Compared to the theoretical value, the corresponding spatial frequency extends to approximately 60 μm−1, indicating a very high signal-to-noise ratio. The resolution of the reconstructed image was estimated by calculating the phase-retrieval transfer function (PRTF) [37, 38]. One hundred independent reconstructions from random initial phases were averaged to calculate the amplitude in Fourier space. The PRTF curve was obtained by calculating the ratio of the calculated amplitude to the amplitude of the measured diffraction pattern, as shown in Fig. 4d. With a citation of the PRTF curve dropping below 1/e [37], the spatial frequency cutoff was determined to be 57 μm−1, corresponding to a full period resolution of 17.5 nm (8.8 nm half-period resolution). The achieved resolution fell between the detector edge and the detector corner diffraction-limited resolutions for this experimental geometry. To increase the diffraction-limited resolution, the distance between the sample and the detector can be shortened. However, owing to phase retrieval errors, the achieved resolution could be worse than the diffraction-limited resolution.

Fig. 4
figure 4

(Color online) Single-shot imaging of gold nanospheres. a The diffraction pattern of dimer gold nanospheres, where clear interference could be recognized. b The image of two nanospheres reconstructed from Figure (a) with a single XFEL pulse. c The PSD curve calculated from (a). d The PRTF curve with a citation of dropping below 1/e as the blue dashed line shows

During the first commissioning, the “diffraction before destruction” experiments of the biomaterials were also conducted. Mitochondria, as the energy factory of cells, play a very important role in apoptotic cell death [39]. To understand their detailed structures and functions, high-resolution structural imaging of live cells or fresh organelles in their native environment is necessary. However, due to radiation damage, an excessive X-ray dose kills the cells and causes mass loss and structural deformation of the cells and organelles [40]. According to the “diffraction before destruction” concept [34, 41], XFEL single-shot imaging with femtosecond pulse duration can be used to image live cells and fresh organelles at nanoscale resolution by outrunning radiation damage [42,43,44]. Mitochondria of approximately one micrometer in size were deposited on the Si3N4 membranes, and several diffraction patterns were recorded by scanning the membranes. Figure 5a, b shows a typical diffraction pattern and a reconstructed image of the mitochondria, respectively. Benefiting from the penetration depth and unique imaging opportunities for high contrast in the “water window” energy range [45, 46], whole mitochondria structures with remarkably high contrast could be obtained without sectioning. The inset shows a scanning electron microscope (SEM) image of the mitochondria on the same membrane. Owing to the low interaction coefficient of biomaterials with X-rays, the diffraction signals were weaker than those of the gold nanospheres and nanocubes, resulting in a low signal-to-noise ratio at high spatial frequencies. Figure 5c shows the PSD curve calculated from Fig. 5a. Theoretically, the signal declines with log/log representation in the spatial frequency range from − 4 to − 3[47]. In this experiment, the signal decay was − 3.2 with a spatial frequency of less than 15.6 μm−1, corresponding to a half-period resolution of 32.1 nm. With increasing spatial frequency, the diffraction signal extends to approximately 45 μm−1. However, owing to its low scattering ability, its signal-to-noise ratio is poor.

Fig. 5
figure 5

(Color online) Single-shot imaging of mitochondria based on the “diffraction before destruction” concept. a Single-shot diffraction pattern of mitochondria. b The reconstruction image from (a). c The power spectrum density curve from (a)

4.2 Fourier transform holography

Similar to CDI, FTH is also a coherent lensless imaging method [48, 49]. By recording the interference patterns between the object exiting wave and reference wave, the hologram can be recorded in the far field. Compared with CDI, by applying a simple single Fourier transform of the holograms instead of an iterative phase retrieval process, fast image reconstruction can be achieved with FTH. However, the imaging resolution of FTH is limited by the size of the reference hole. A smaller reference hole theoretically improved the image resolution. However, for small reference holes, reference signals are weaker, which reduces the reconstructed image contrast and requires more coherent photons. With the sharp increase in the XFEL coherent flux, FTH has become an important method in XFEL for high-resolution and time-resolved imaging, such as magnetic nanostructures [50]. To improve the image quality, more than one reference can be introduced using spatial multiplexing [51]. During the CSI commissioning, an FTH experiment was conducted. The test sample shown in Fig. 6a was fabricated using a focused ion beam on a 1 micro-thick gold film sputtered on a Si3N4 membrane. The gold film was opaque for 520 eV X-rays. The size of the test object was 3 μm, and the reference hole size was 100 nm.

Fig. 6
figure 6

(Color online) Fourier transform holography imaging of the tested sample. a The object fabricated by focused ion beam on a 1 micro-thick gold film. b The hologram recorded by the in-vacuum detector in the far field. c The reconstructed image using the fast Fourier transform from the hologram in (b). d The reconstructed image using phase retrieval in (b)

The test sample was aligned with the XFEL beam path using an inline microscope. During commissioning, the focused beam size was adjusted to approximately 20 μm, covering the object and reference hole. By illuminating the test samples with a single XFEL pulse, the hologram shown in Fig. 6b was recorded by the CCD detectors in the far field. The inset hologram shows clear interference between the object and the reference hole, encoding the relative phase between the object and reference waves. Therefore, a single fast Fourier transform process can be applied directly to the hologram. Figure 6c shows the image obtained by performing a fast Fourier transform of the hologram. The object image and its conjugate can be easily separated. As the hologram recorded in the far field is the Fourier transform of the sample, phase-retrieval techniques can be used for image reconstruction. Using the same procedure as for CDI, both the object and reference hole can be reconstructed simultaneously. Both the FTH image and the reconstructed image with phase retrieval techniques were consistent with the SEM results of the test sample.

5 Conclusion and perspective

The first commissioning results of the CSI endstation at SXFEL were presented. The CSI endstation was located downstream of the SASE beamline. The basic optics design of the SASE beamline and an overview of the CSI endstation were described, including the basic parameters of the KB focusing mirror and layout of the key components at the CSI endstation. CSI was mainly focused on high-resolution imaging and dynamic structure studies based on forward scattering methods such as CDI, FTH, and Tr-SAXS. During commissioning, CDI and FTH in single-shot mode were performed with fixed-target sample delivery scanning stages. By raster scanning the Si3N4 membranes with deposited gold nanocubes and nanospheres, single-shot diffraction patterns were recorded using an in-vacuum detector. By phasing the diffraction patterns with an iterative algorithm, reconstructed images with high resolution and contrast were obtained. A full period resolution of 17.5 nm was estimated by the PRTF for the gold nanospheres. As an X-ray range of 100–620 eV was available at SXFEL, covering the full “water window,” the high resolution and dynamic imaging of soft materials and biomaterials at their native state could be conducted. During the commissioning experiment, a single-shot imaging experiment of mitochondria was carried out at 520 eV, just before the oxygen K-edges.

More endstations at the SXFEL will be commissioned in 2022, and more instruments will be continuously commissioned for in situ and time-resolved experiments at the CSI endstation, including the cryogenic sample environment, aerosol sample injector, high-performance detector with a large dynamic range, and optical pump lasers. After commissioning the optical pump lasers, time-resolved experiments will soon become optional. Furthermore, by generating double X-ray pulses with tunable delay times and different wavelengths [52], dynamic experiments with the X-ray pump/probe mode will be possible in the future. With the upgrade of the light source, such as the self-seeding mode to improve the temporal coherence, and installation of more undulators to provide polarized X-rays, resonant CDI and FTH will be available [53,54,55].