## research papers

## A phenomenological model of the X-ray pulse statistics of a high-repetition-rate X-ray free-electron laser

**Trey W. Guest,**

^{a,}^{b,}^{c}^{*}Richard Bean,^{c}Raimund Kammering,^{d}Grant van Riessen,^{a,}^{b}Adrian P. Mancuso^{a,}^{c,}^{e}and Brian Abbey^{a,}^{b}^{*}^{a}La Trobe Institute for Molecular Science, La Trobe University, Bundoora, VIC 3086, Australia, ^{b}Department of Mathematical and Physical Sciences, School of Engineering, Computing and Mathematical Sciences, La Trobe University, Bundoora, VIC 3086, Australia, ^{c}European XFEL, Holzkoppel 4, 22869 Schenefeld, Germany, ^{d}Deutsches Elektronen-Synchrotron, Notkestraße 85, 22607 Hamburg, Germany, and ^{e}Diamond Light Source, Harwell Science and Innovation Campus, Didcot, OX11 0DE, UK^{*}Correspondence e-mail: twguest@students.latrobe.edu.au, b.abbey@latrobe.edu.au

Many coherent imaging applications that utilize ultrafast X-ray free-electron laser (XFEL) radiation pulses are highly sensitive to fluctuations in the shot-to-shot statistical properties of the source. Understanding and modelling these fluctuations are key to successful experiment planning and necessary to maximize the potential of XFEL facilities. Current models of XFEL radiation and their shot-to-shot statistics are based on theoretical descriptions of the source and are limited in their ability to capture the shot-to-shot intensity fluctuations observed experimentally. The lack of accurate temporal statistics in simulations that utilize these models is a significant barrier to optimizing and interpreting data from XFEL coherent diffraction experiments. Presented here is a phenomenological model of XFEL radiation that is capable of capturing the shot-to-shot statistics observed experimentally using a simple time-dependent approximation of the pulse wavefront. The model is applied to reproduce non-stationary shot-to-shot intensity fluctuations observed at the European XFEL, whilst accurately representing the single-shot properties predicted by FEL theory. Compared with previous models, this approach provides a simple, robust and computationally inexpensive method of generating statistical representations of XFEL radiation.

Keywords: X-ray free-electron lasers; XFELs; correlated fluctuations; time-resolved studies; computational modelling; dynamic simulations; MHz XFELs; wavefront propagation; temporal coherence.

### 1. Introduction

X-ray free-electron lasers (XFELs) produce femtosecond duration X-ray wavelength pulses with high spatial coherence and spectral *et al.*, 2006). These properties are ideally suited for coherent X-ray diffraction applications and have enabled the observation of nanoscale features and processes relevant to a broad range of scientific applications (Martin *et al.*, 2020; Lehmkühler *et al.*, 2021; Vassholz *et al.*, 2021). For many of these applications, high spatial and temporal resolution can only be achieved by merging a large number of individual diffraction or scattering measurements (Chapman *et al.*, 2006; Lehmkühler *et al.*, 2020; Bielecki *et al.*, 2020). In serial XFEL experiments, diffraction patterns are integrated over many single-shot exposures of a reproducible sample or process (Chapman *et al.*, 2011; Loh & Elser, 2009). This mode of experiment can enable the study of samples that would otherwise produce diffraction patterns too photon-sparse to extract useful information at high resolution and is essential to the study of ultrafast processes and soft matter (Coe & Fromme, 2016).

The quality of the diffraction patterns obtained when merging multiple exposures of a sample is sensitive to the shot-to-shot statistics of the irradiating wavefields (Nugent, 2011). Understanding the characteristics of these wavefields and their shot-to-shot temporal statistics is a persistent challenge in successfully performing and optimizing serial XFEL experiments (Vartanyants *et al.*, 2011; Seaberg *et al.*, 2019; Lee *et al.*, 2020). Poor shot-to-shot correlation in the phase and intensity of the irradiating pulses leads to exposure conditions that fluctuate in time and subsequently reduce the contrast of time-integrated diffraction measurements (Williams *et al.*, 2007; Latychevskaia *et al.*, 2015). These correlations can evolve on timescales far exceeding the duration of a single pulse and are in many cases not fully captured by current descriptions of the FEL process alone.

The lack of available tools to observe and model fluctuations in XFEL wavefield statistics has been identified as a limiting factor across a broad range of coherent X-ray imaging applications (Nagaya *et al.*, 2016; Reddy *et al.*, 2017; Nakano *et al.*, 2018; Cao *et al.*, 2020). The interpretation of experimental outcomes in these applications requires an understanding of the sensitivity of key experimental parameters to shot-to-shot fluctuations in the irradiating wavefield (Dallari *et al.*, 2021). Estimates of these parameters and their sensitivity to fluctuations in pulse characteristics can typically only be evaluated in simulations (E *et al.*, 2021). The accuracy of these simulations requires that descriptions of the X-ray pulse statistics in the plane of incidence with the sample accurately depict the shot-to-shot pulse statistics that are observed experimentally.

Current methods of determining the statistical properties of XFEL radiation rely on representations of the XFEL source obtained from simulations based on fundamental FEL theory (Reiche, 1999; Saldin *et al.*, 1999). These methods provide a route to simulating the characteristics of XFEL radiation by solving the equations of motion for large numbers of electrons (Tran & Wurtele, 1989) and require a diverse range of physical phenomena to be represented (Agapov & Geloni, 2013). While these simulations can provide accurate descriptions of the properties of XFEL radiation, such as the self-amplified (SASE) characteristics of the undulator (Agapov *et al.*, 2014), they are limited in their capacity to describe fluctuations in pulse characteristics that arise due to non-fundamental effects. These fluctuations can be the result of operational factors and lead to instability of the electron-bunch phase space (Kongtawong *et al.*, 2022). They are often difficult to characterize (Hellert *et al.*, 2017*a*) and can vary dramatically over the time frame of an experiment (Hellert *et al.*, 2017*b*). In order to predict and interpret the outcome of experiments at FEL facilities, new models of the temporal characteristics of their radiation must be developed that are capable of describing the practical effects of these instabilities on the shot-to-shot properties of the XFEL pulse wavefront.

In this paper, we present a phenomenological model of XFEL radiation that describes shot-to-shot fluctuations of the XFEL wavefront. Unlike current models based on fundamental FEL theory, our description of the shot-to-shot wavefront characteristics captures fluctuations in pulse statistics observed experimentally. In contrast to earlier models, the approach described and demonstrated here does not require a detailed understanding of the operational conditions of the electron beam or undulator. Our phenomenological model instead takes as its inputs the pulse statistics which can be determined from intensity measurements made during an experiment. Using fluctuations in the size and centre of mass of intensity distributions recorded at megahertz (MHz) repetition rates, we apply this model to simulate the shot-to-shot wavefront characteristics of the SPB/SFX instrument at the European XFEL. The results from our model demonstrate the ease and effectiveness of our approach in replicating the temporal characteristics of the XFEL wavefield over a range of key experimental timescales.

### 2. Shot-to-shot intensity statistics at the European XFEL

The European XFEL is the world's first high-repetition-rate XFEL facility (Decking *et al.*, 2020). By delivering pulses at sub-microsecond intervals, it has dramatically increased rates of data collection in experiments using XFEL radiation. The advantages of this new mode of operation have already been exploited for coherent imaging applications and have led to the development of time-resolved imaging techniques for the study of dynamically evolving nanoscale systems (Vagovič *et al.*, 2019; Sobolev *et al.*, 2020; de Wijn *et al.*, 2022; Koliyadu *et al.*, 2022; Holmes *et al.*, 2022). Pulses at the European XFEL are delivered to beamlines at a megahertz repetition rate in a burst mode of operation (Fröhlich *et al.*, 2019), where pulse trains containing up to 352 pulses separated by sub-microsecond time delays (minimum 220 ns) are repeated at 10 Hz.

Intensity distributions with time-dependent shot-to-shot statistics have previously been recorded during operation on the SPB/SFX instrument (Mancuso *et al.*, 2019) at the European XFEL. An example of the typical time-varying shot-to-shot variations in the wavefront intensity that are observed is shown in Fig. 1. These statistical fluctuations are in part due to processes specific to the operation of megahertz XFEL facilities, *e.g.* pulse distribution and parallel beamline operation, which are not well described by conventional models of XFEL radiation (Guest *et al.*, 2022). Time-dependent fluctuations in radiation intensity that occur within a pulse train can be described by the normalized two-time (auto-)correlation function *g*^{(2)} (Goodman, 2000),

where the angle brackets denote the ensemble average over the 10 Hz pulse-train repetition rate. The pulse intensities *I* are mean centred with respect to the average intensity observed within their respective pulse train. This shot-to-shot correlation function is a measure of the stability in intensity between a pair of pulses observed at times *t*_{1} and *t*_{2}, with *g*^{(2)} = 1 denoting fluctuations in pulse intensity that are perfectly correlated, *g*^{(2)} = 0 denoting no correlation and *g*^{(2)} = −1 denoting anti-correlation. The shot-to-shot correlation of the pulse trains whose intensities are presented in Fig. 1 is provided in Fig. 2, demonstrating intensity statistics that are highly sensitive to the time of the recorded pulse.

These shot-to-shot correlations are emblematic of a dynamically evolving system (Madsen *et al.*, 2010) and illustrate that the shot-to-shot intensity statistics observed in an experiment are non-stationary. In this circumstance, the repeating checker-board pattern is representative of step-like changes in pulse intensity as a function of time (Bikondoa, 2017). In experiments where multiple diffraction patterns are integrated, the achievable spatial resolution (Gureyev *et al.*, 2008) is subsequently sensitive to the time at which the integrated pulses were recorded. These factors may play a significant role in determining the success of imaging experiments at the European XFEL, particularly in experiments making use of the high repetition rate to improve photon statistics or image microsecond dynamics.

### 3. A phenomenological model of XFEL wavefields

In this section, we present a method of replicating the photon statistics observed at the European XFEL. Using measurements of the pulse intensity recorded experimentally, we develop a model of the properties of the XFEL source wavefront. We map the statistics of fluctuations in the measured intensities to time-dependent stochastic variables of an analytical representation of the FEL source. In doing so, we are able to model arbitrary photon statistics without needing to take into account the underlying physical processes relating to their origins.

We construct a numerical representation of the source wavefield that is the product of two components: (i) a stationary Gaussian approximation of the fluctuations in the SASE pulse spectra (Saldin *et al.*, 2010) and (ii) a shot-to-shot fluctuating spatial envelope. The pulse wavefield at a distance *z* from the XFEL source, which we assume to be effectively fixed such that it has little impact on the properties of a pulse, is described by the complex scalar wavefield ψ(**r**, *t*), where **r** is the transverse position vector: **r** = (*x*, *y*). We write this wavefield as the superposition of two functions describing the transverse and longitudinal properties of the pulse wavefield, ψ_{⊥}(**r**, *t*) and *f*(*t*). We assume the transverse properties to be a slowly varying function of time (microseconds) in comparison to the longitudinal components (femtoseconds), and subsequently treat each function independently. The pulse wavefield at a time *t* within a pulse train can be written as the Fourier integral

where and are the Fourier inverses of the transverse and longitudinal components of the pulse wavefield, respectively, and is the harmonic time factor.

Many coherent imaging applications are insensitive to changes in the pulse ), and in many cases it is sufficient to approximate the linear SASE FEL process, such that the statistics of individual spectra are Gaussian (Saldin *et al.*, 2006). This enables us to make use of a computationally efficient representation of the pulse spectrum, which can be defined by Gaussian-filtered white noise (Pfeiffer, 2018). Following this approximate approach, here we define the SASE spectrum of each pulse using the procedure outlined in Appendix *A*.

#### 3.1. Phenomenological description of pulse phase

Our model of the source wavefield is predicated on experimental observation. The pulse intensities observed at the European XFEL (Fig. 1) demonstrate time-dependent fluctuations in the measured wavefront intensity distribution. The source plane pulse wavefront is subsequently modelled using phase perturbations that are proportional to the fluctuations in the transverse centre of mass and beam width of intensities within a pulse train.

In modelling the transverse characteristics of the pulse wavefront, we make the assumption that shot-to-shot fluctuations in the source phase are the primary origin of fluctuations in the observed pulse intensities. This assumption implies both a constant pulse amplitude and a time-dependent beam phase. The evolution of the XFEL source intensity along the axis of propagation is determined by the gradient and curvature of the source wavefront phase (Teague, 1983). The phase gradient leads to shifts in the source intensity in the transverse plane, and the phase curvature leads to the convergence or divergence of the source intensity. We write the time-dependent transverse wavefield as a pulsed Gaussian beam with a time-dependent phase comprised of a linear prism term and a quadratic lens term (Saleh & Teich, 2019),

where *k* = 2π/λ_{0} for a central radiation wavelength λ_{0}, and *R* and **k**_{⊥} = (*k*_{x}, *k*_{y}) are the radius of curvature and spatial wavevector in the transverse plane, respectively, which both vary with time. We define the time-constant amplitude factor with respect to the peak intensity of the pulse, *I*_{0},

where σ_{0} and σ_{z} are, respectively, the beam widths at the waist and in a transverse plane located a distance *z* downstream of the waist.

#### 3.2. Geometric approximation of fluctuations in the pulse phase

XFEL wavefields are highly paraxial. Estimates of statistics of the time-dependent components of the pulse wavefield *R* and **k**_{⊥} can therefore be obtained using geometric approximations of photon transport along the optical axis. The shot-to-shot fluctuations in the measured intensity profile at a distance Δ*z* downstream of a source emitting pulses of the form described in equation (3) are described by fluctuations in the tilt in curvature of the source.

Shot-to-shot phase tilts of the source plane wavefield lead to displacements in the time-dependent centre of mass (Δ*x*, Δ*y*) relative to the mean centre of mass calculated over all pulses within a pulse train. These displacements correspond to horizontal and vertical deflections of the pulse intensity,

which are embedded in the pulse phase via its transverse wavevector,

Similarly, fluctuations in the size of the beam by a factor Δσ can be used to infer fluctuations in the radius of curvature of the pulse wavefield around the train average ,

This geometric approximation of the spatial components of the source phase in our phenomenological model provides a route to extracting source-plane phase statistics from downstream measurements of the pulse intensity in the limit that pulses propagate along ray paths originating at the source.

### 4. Simulations and results

In order to replicate the shot-to-shot intensity correlations observed experimentally at the European XFEL (Fig. 2) we simulate stochastic pulse trains and their photon transport through the SPB/SFX instrument (Fig. 3).

Here we compare the output of wavefront propagation simulations using a phenomenological representation of the XFEL source with those obtained using wavefields from the FAST X-ray Pulse Database (Manetti *et al.*, 2019). Our goal is to demonstrate the effectiveness of our model by accurately reproducing the radiation statistics observed at the European XFEL, both on single-shot and on shot-to-shot timescales.

Pulse trains were simulated using a Python implementation of the phenomenological model outlined in Section 3. This implementation is PyPi installable and has been made available on Github: (https://github.com/twguest/phenom). The single-shot properties of each pulse were assumed to be Gaussian and of the form given in equation (3). Estimates of pulse width, divergence and energy were obtained using empirical models obtained from Sinn *et al.* (2011) as detailed in Appendix *B*.

#### 4.1. Single-shot radiation properties

We simulated an individual XFEL pulse representative of the single-shot properties of the source by assuming no fluctuation in the beam pointing angle or curvature. The time-independent properties of the source were obtained from the empirical models provided in Appendix *B* and were used to simulate pulses with a photon energy of 9.32 keV. These pulses were compared with pulses of the same energy obtained from the FAST Pulse Database after propagation through a numerical representation of the SPB/SFX instrument. The pulse width and divergence in the source plane were set to be 40.18 µm and 2.67 µrad, respectively, with a pulse energy of 0.52 mJ. We assumed a full width at half-maximum (FWHM) of 25 fs and a spectral bandwidth Δω/ω = 1 × 10^{−4}.

Propagation through the numerical representation of the SPB/SFX beamline (Yoon *et al.*, 2016) was implemented in *WavePropaGator* (*WPG*) (Samoylova *et al.*, 2016; Chubar *et al.*, 2013). A comparison of the simulated intensities of the time-independent pulse wavefield with the integrated pulse intensity of an ensemble of 100 FAST pulse wavefields is presented in Fig. 4.

The spatial intensity distributions of the mean pulse intensity predicted by our model accurately describe the mean pulse intensities calculated using the FAST XFEL source model. We observe an average Pearson correlation = 0.998 between intensity distributions obtained by propagating source wavefronts generated by our model and those generated by simulations based on fundamental FEL theory. The spatial structure of these intensity distributions is primarily determined by the surfaces and apertures of the photon transport optics (Pardini *et al.*, 2015). We expect that this time-independent Gaussian representation of the source wavefront provides accurate estimates of the characteristics of the irradiating wavefront in applications where the pulse intensity is observed after photon transport.

#### 4.2. Shot-to-shot radiation statistics

The shot-to-shot fluctuations in the beam phase were simulated using the geometric approach described in Section 3.2. We simulated 100, 90 µs pulse trains at a photon energy of 6.0 keV, matching those in the experiment. The and spectral bandwidth were again assumed to be 25 fs and Δω/ω = 1 × 10^{−4}, respectively, while the pulse width, divergence and energy were set to 42.7 µm, 3.68 µrad and 0.79 mJ, respectively.

The phase of each pulse was determined using time-evolving probabilistic models describing the beam divergence and transverse pointing angles. Mean-centred fluctuations in the beam size and pointing angle were obtained from the recorded intensity distributions by calculating the beam width and centre of mass of each image individually. We determined the beam width to be the radius of the circle, with its origin at the beam centre of mass, enclosing 50% of the integrated pulse intensity. These measured quantities served as input data for our model, and the tilt and curvature of the phase of each pulse were defined under the geometric approximation described in Section 3.2 using probability distributions describing the magnitude of fluctuations in beam size and position as a function of time.

Probability distributions were obtained by fitting a covariance ellipse enclosing 95% of the recorded data in the state space of each pulse property at sequential time points *t* and *t* + 1 [Fig. 5(*a*)] (Schelp, 2018). These ellipses were used to define the mean and standard deviation of Gaussian probability distributions [Fig. 5(*b*)]. Using these probability distributions, the temporal properties of the beam phase were determined iteratively. Fig. 6 demonstrates the convergence of the stochastically generated parameters of the phenomenological model with experimental measurements.

Each pulse within a pulse train was propagated independently through the SPB/SFX beamline model to a detection plane 3.644 m downstream of the instrument focus, matching the parameters of the intensity measurements described in Section 2. A subset of the shot-to-shot intensities and intensity covariances of the simulated pulse trains after propagation through the SPB/SFX instrument are presented and compared with experimental measurements in Fig. 7.

We observe that the time-dependent characteristics of the experimental intensities are well described by the statistics of the simulated pulse trains after photon transport. Hence, by mapping the statistics of fluctuations in the width and centre of mass of experimental measurements of intensity to the analytical expression of the pulse phase in equation (3), we are able to produce numerical representations of the experimental pulse wavefront with fluctuations in intensity that are highly correlated with our observations. The autocorrelation function of the ensemble of pulse trains relative to the first pulse, *i.e.* *g*^{(2)}(*t*_{1} = 0, *t*_{2}), is a linear function of the mean pulse intensity and thus shares the same highly correlated statistics. Such an autocorrelation function depicts the decay in the correlation between the first pulse in a pulse train and sequential pulses, which is of primary interest for time-resolved imaging experiments (Sun *et al.*, 2021). The full two-time autocorrelation function of the simulated pulse trains is presented in Fig. 8 and it is a reasonable description of the time-dependent intensity statistics observed experimentally (Fig. 2).

The intensity statistics of the experimental and simulated pulse trains are highly correlated, yielding an average Pearson

= 0.831. This high correlation suggests that the shot-to-shot fluctuations in pulse intensity observed experimentally can primarily be attributed to fluctuations in the phase of the XFEL pulse at the source. By expressing these phase fluctuations as geometric tilt and curvature terms, our phenomenological model enables accurate approximation of the experimental pulse train intensity statistics using intensity data as its input.The Pearson correlation between the experimental and simulated intensity statistics is time dependent and provides an indication of the conditions under which the geometric phase approximation of our model is suitable. Fig. 9 demonstrates that the magnitudes of the pulse pointing provided to the model for simulation are accurate when the beam makes a small deflection angle with the optical axis. We suggest that the primary limitation of this model is therefore the validity of the geometric phase approximation to the given input data.

Failure of the geometric phase approximation can occur when photon intensities are recorded downstream of the beamline optics. This occurs because a significant fraction of the pulse intensity falls outside the upstream mirror apertures. Fig. 9(*b*) illustrates that poorly correlated pulses are, on average, more truncated by the mirror aperture than highly correlated pulses. For a Gaussian beam truncated along one dimension, the true (prior to truncation) and recorded centres of mass deviate by a percentage beam width approximately equal to the percentage of intensity outside the mirror aperture. Consequently, the error in the calculated pointing angle increases linearly with pulse intensity losses (Appendix *C*), notwithstanding redistribution of the incident intensity due to diffraction from the mirror edge. For the input experimental data used in our simulations, the maximum Pearson correlation ρ = 0.96 is reduced to ρ = 0.25 when approximately 16% of the lies outside the effective numerical aperture of the detector.

The overlap between the centres of mass of highly correlated and uncorrelated pulses in Fig. 9(*a*) provides an indication of beamline instabilities that are not currently captured by the SPB/SFX model. These instabilities, such as thermal deformation of mirror surfaces and positional jitter of photon transport optics, may result in a nonlinear relationship between the beam pointing angle and the observed centre of mass. While our results suggest that these phenomena are not the primary contribution to wavefront fluctuations on the megahertz timescale, these effects, which can arise over long-duration operations, may be significant contributors to the intensity statistics between pulse trains (Petrov *et al.*, 2022).

### 5. Discussion and outlook

Our phenomenological model of radiation at the European XFEL describes shot-to-shot fluctuations that are time dependent, and it requires no prior knowledge of the properties and operation of the accelerator and undulator. The mean intensity profile of our model is consistent with predictions based on FEL theory and, when paired with probabilistic models derived from experimental measurements, can be perturbed to replicate shot-to-shot wavefront statistics that these previous models do not describe. This model is a highly generalized approach to simulating XFEL radiation that can provide descriptions of the statistics of large ensembles of pulse wavefields under a broad range of operational conditions. The accuracy of these measurements is limited only by suitable estimates of the expected values of pulse width and divergence, and the quality of intensity data recorded. Our model provides a method of generating statistically accurate descriptions of the experimental pulse wavefield, in a manner that is robust to instrument operation and is suitable for users of XFEL facilities who may wish to carry out simulations of wavefront properties during an experiment.

When paired with efficient wavefront propagation simulations (Chubar & Celestre, 2019) our model provides a computationally efficient method for exploring the sensitivity of XFEL experiments to changes in the statistics of the shot-to-shot wavefield. Simulated pulses obtained from our model could play a critical role in estimates of the achievable resolution in serial XFEL experiments (Poudyal *et al.*, 2020; E *et al.*, 2022), which are inherently sensitive to the shot-to-shot temporal evolution of the pulse wavefield. Simulations of non-stationary pulse wavefields may provide new methods for interpreting common intensity artefacts that arise due to shot-to-shot fluctuations in the XFEL beam (Buakor *et al.*, 2022) and could improve the accuracy of simulations of key physical processes, such as X-ray-induced dynamics in samples and optics (Grünbein *et al.*, 2021; Kukk *et al.*, 2017; Zhang *et al.*, 2015; Abbey *et al.*, 2016). Under conditions in which the observed radiation statistics vary greatly from theoretical predictions, our model provides an opportunity to improve the technical design and commissioning of beamlines and optics (Williams *et al.*, 2017; Gaudin *et al.*, 2011).

Alongside the capacity to reproduce intensity distributions observed experimentally, our model provides new information on the shot-to-shot statistical properties of radiation at the European XFEL. In circumstances where the observed fluctuations in beam size and position are time dependent, our model predicts that the shot-to-shot coherence of the European XFEL is non-stationary. This implication of non-stationary spatial coherence between XFEL pulses has significant consequences in both imaging and wavefront characterization experiments, and is not captured in current descriptions of radiation at the facility (Geloni *et al.*, 2010). For large fluctuations in pulse properties, our model predicts that the quality of time-integrated diffraction data merged from large ensembles of pulses will be dependent on the index of the recorded pulses within their respective pulse trains. Consequently, improved reconstructions of the three-dimensional scattered intensity may be obtained by evaluating diffraction patterns obtained from coherent subsets of the source radiation, for example the subset of diffraction patterns produced by all *t*th pulses. In the case where pulse intensity or wavefront information can be recorded simultaneously during diffraction experiments, the development of filtering and classification algorithms (Rose *et al.*, 2018) that consider the non-stationary correlation between pulses may provide a route to improved outcomes in coherent diffractive imaging experiments.

Regarding the characterization and remediation of the pulse wavefront, non-stationary shot-to-shot coherence has significant implications in a broad range of applications. Measurements of coherence from intensity correlations, for example via the Siegert relation (Ferreira *et al.*, 2020), are not valid in this domain and single-shot methods such as grating interferometry should be applied instead (Makita *et al.*, 2020). Similarly, since fluctuations in the pulse wavefront can no longer be considered stationary ergodic, measurements of the XFEL wavefront obtained by integrating over multiple pulses, such as in ptychography (Daurer *et al.*, 2021), should be replaced in favour of single-shot methods (Sala *et al.*, 2019). We suggest that these predictions of the model be explored further using frameworks for separating stationary and non-stationary components of the shot-to-shot pulse wavefield (Manea, 2009), and they may benefit from the large volume of literature on pulsed correlation functions that have been developed to describe the coherence function of laboratory light sources (Dutta *et al.*, 2014, 2015).

Applications of our simplified representation of the XFEL source could prove highly beneficial as a photon diagnostic for the accelerator by providing a simple relationship between the stability of the observed intensities and the wavefront phase. This `top down' approach may provide a route to optimizing operational parameters and could take advantage of machine-learning techniques in some cases to extract key factors of operation that determine FEL performance (Patel *et al.*, 2022). Following observations at the European XFEL and the Free-Electron Laser in Hamburg (FLASH) (Hellert & Schmidt, 2018), emphasis should be placed on the impact of electron-bunch orbit on the stability of the radiation properties. The origin of and sensitivity to non-stationary radiation statistics should be explored, and these factors are particularly relevant for future and developing high-repetition-rate facilities and upgrades (Raubenheimer, 2018; Hara *et al.*, 2021)

Finally, we expect that the residual disparity between the simulated and experimental shot-to-shot intensity fluctuations can be addressed in future applications by improving the experimental conditions under which fluctuations in the beam size and position are recorded. Specifically, it should be possible to achieve this by recording the shot-to-shot intensity distributions prior to photon transport. By further modifying the experimental setup used on the SPB/SFX beamline, our phenomenological model can be readily extended to represent shot-to-shot statistics of other pulse properties, including pulse energy, duration and spectra. This could be achieved using currently available photon diagnostics (Grünert *et al.*, 2022; Kujala *et al.*, 2020) and may provide the opportunity to describe pulse characteristics in more complex modes of operation. This includes circumstances where the transverse and longitudinal components of the pulse wavefield cannot be considered independent.

We note that our model is intended to complement solutions based on theoretical descriptions of the SASE radiation process. For applications that are highly sensitive to pulse spectra, this model should be used in conjunction with these methods to describe highly nonlinear modes of operation.

### 6. Conclusions

We have presented a phenomenological model of shot-to-shot wavefront statistics at the European XFEL. Our model maps the shot-to-shot statistics of intensity fluctuations observed experimentally to a geometric representation of the source phase. Unlike alternative models of XFEL radiation, our approach is robust with respect to non-fundamental practical effects caused by instrument operation, while requiring no prior knowledge of their physical origins. Using wavefront propagation simulations, we have demonstrated the capacity of our model to represent pulse wavefronts that reflect the time-dependent intensity statistics observed at the European XFEL.

### APPENDIX A

### SASE spectrum model

We obtain the complex SASE spectrum by first defining an electric field spectrum ,

where *g*(ω) is the complex spectral envelope of the XFEL beam modulated by a stochastic phase term ϕ_{0}(ω) of frequency ω. We define the spectral envelope to be Gaussian and real-valued,

The characteristic stochastic SASE FEL temporal pulse profile is a complex scalar wavefield which we approximate as the product of the scalar Fourier inverse *f*_{0}(*t*) of equation (8) and a real-valued temporal envelope *h*(*t*),

where the temporal envelope of the pulse is centred at time τ, with a width equivalent to the FWHM duration of the radiation pulse, *t*_{0} = 25 fs,

Using the inverse Fourier transform, we may write *f*(*t*) as

which forms a Fourier pair with the fast-timescale complex spectral envelope in equation (2),

### APPENDIX B

### Empirical model parameters

Estimates of pulse divergence, width and energy were obtained using empirical models formulated in terms of photon energy *E*_{0} (in electronvolts) and electron beam charge (Sinn *et al.*, 2011). These expressions are:

The pulse energy *U* is included in the model via the peak radiation intensity *I*_{0} in equation (4). For a Gaussian beam, these properties are related thus:

where *t*_{0} is the pulse duration.

### APPENDIX C

### Centre of mass of a Gaussian beam at an aperture

Our phenomenological model makes the assumption that fluctuations in the centre of mass of recorded intensity distributions between pulses are due to plane-wave pointing angle tilts at the source. This method enables the beam phase to be extracted from intensity measurements, under the requirement that the pulse centre of mass follows a ray path. This is largely true for paraxial optics, but the approach is limited in its description of beams that are significantly obstructed or deformed by optics prior to measurement.

Fig. 10 indicates that the percentage loss in beam intensity at a one-dimensional aperture is approximately equal to the error in the calculated beam centre of mass as a percentage of beam width. Applying this to the study of pulse parameters relevant to the SPB/SFX instrument of the European XFEL, we note that the beam pointing angle error scales linearly with the intensity loss due to truncation of the beam.

### Acknowledgements

We acknowledge the European XFEL in Schenefeld, Germany, for the provision of X-ray free-electron laser beam time on the scientific instrument SPB/SFX (Single Particles, Clusters and Biomolecules, and Serial Femtosecond Crystallography) and would like to thank the staff for their assistance. We thank Gianluca Geloni and David Paganin for their support of this project.

### Funding information

Trey Guest acknowledges support from the Commonwealth Scientific and Industrial Research Organization (CSIRO) Alumni. Brian Abbey acknowledges support from the La Trobe Biomedical and Environmental Sensor Technology (BEST) Research Centre. This work has been enabled by megahertz imaging technology developed within internal RD MHz Microscopy and EIC-Pathfinder MHz Tomoscopy (GA 101046448) projects.

### References

Abbey, B., Dilanian, R. A., Darmanin, C., Ryan, R. A., Putkunz, C. T., Martin, A. V., Wood, D., Streltsov, V., Jones, M. W. M., Gaffney, N., Hofmann, F., Williams, G. J., Boutet, S., Messerschmidt, M., Seibert, M. M., Williams, S., Curwood, E., Balaur, E., Peele, A. G., Nugent, K. A. & Quiney, H. M. (2016). *Sci. Adv.* **2**, e1601186. Web of Science CrossRef PubMed Google Scholar

Agapov, I. & Geloni, G. A. (2013). *Proceedings of IPAC2013*, 12–17 Mar 2013, Shanghai, China, pp. 1173–1175. Google Scholar

Agapov, I., Geloni, G., Feng, G., Kocharyan, V., Saldin, E., Serkez, S. & Zagorodnov, I. (2014). arXiv:1404.1177. Google Scholar

Bean, R. J., Aquila, A., Samoylova, L. & Mancuso, A. P. (2016). *J. Opt.* **18**, 074011. Web of Science CrossRef Google Scholar

Bielecki, J., Maia, F. R. N. C. & Mancuso, A. P. (2020). *Struct. Dyn.* **7**, 040901. Web of Science CrossRef PubMed Google Scholar

Bikondoa, O. (2017). *J. Appl. Cryst.* **50**, 357–368. Web of Science CrossRef CAS IUCr Journals Google Scholar

Buakor, K., Zhang, Y., Birnšteinová, Š., Bellucci, V., Sato, T., Kirkwood, H., Mancuso, A. P., Vagovic, P. & Villanueva-Perez, P. (2022). *Opt. Express*, **30**, 10633–10644. Web of Science CrossRef PubMed Google Scholar

Buts, V., Lebedev, A. & Kurilko, V. (2006). *The Theory of Coherent Radiation by Intense Electron Beams.* Heidelberg: Springer. Google Scholar

Cao, Y., Sheyfer, D., Jiang, Z., Maddali, S., You, H., Wang, B.-X., Ye, Z.-G., Dufresne, E. M., Zhou, H., Stephenson, G. B. & Hruszkewycz, S. O. (2020). *Crystals*, **10**, 1109. Web of Science CrossRef Google Scholar

Chapman, H. N., Barty, A., Bogan, M. J., Boutet, S., Frank, M., Hau-Riege, S. P., Marchesini, S., Woods, B. W., Bajt, S., Benner, W. H., London, R. A., Plönjes, E., Kuhlmann, M., Treusch, R., Düsterer, S., Tschentscher, T., Schneider, J. R., Spiller, E., Möller, T., Bostedt, C., Hoener, M., Shapiro, D. A., Hodgson, K. O., van der Spoel, D., Burmeister, F., Bergh, M., Caleman, C., Huldt, G., Seibert, M. M., Maia, F. R. N. C., Lee, R. W., Szöke, A., Timneanu, N. & Hajdu, J. (2006). *Nat. Phys.* **2**, 839–843. Web of Science CrossRef CAS Google Scholar

Chapman, H. N., Fromme, P., Barty, A., White, T. A., Kirian, R. A., Aquila, A., Hunter, M. S., Schulz, J., DePonte, D. P., Weierstall, U., Doak, R. B., Maia, F. R. N. C., Martin, A. V., Schlichting, I., Lomb, L., Coppola, N., Shoeman, R. L., Epp, S. W., Hartmann, R., Rolles, D., Rudenko, A., Foucar, L., Kimmel, N., Weidenspointner, G., Holl, P., Liang, M., Barthelmess, M., Caleman, C., Boutet, S., Bogan, M. J., Krzywinski, J., Bostedt, C., Bajt, S., Gumprecht, L., Rudek, B., Erk, B., Schmidt, C., Hömke, A., Reich, C., Pietschner, D., Strüder, L., Hauser, G., Gorke, H., Ullrich, J., Herrmann, S., Schaller, G., Schopper, F., Soltau, H., Kühnel, K.-U., Messerschmidt, M., Bozek, J. D., Hau-Riege, S. P., Frank, M., Hampton, C. Y., Sierra, R. G., Starodub, D., Williams, G. J., Hajdu, J., Timneanu, N., Seibert, M. M., Andreasson, J., Rocker, A., Jönsson, O., Svenda, M., Stern, S., Nass, K., Andritschke, R., Schröter, C.-D., Krasniqi, F., Bott, M., Schmidt, K. E., Wang, X., Grotjohann, I., Holton, J. M., Barends, T. R. M., Neutze, R., Marchesini, S., Fromme, R., Schorb, S., Rupp, D., Adolph, M., Gorkhover, T., Andersson, I., Hirsemann, H., Potdevin, G., Graafsma, H., Nilsson, B. & Spence, J. C. H. (2011). *Nature*, **470**, 73–77. Web of Science CrossRef CAS PubMed Google Scholar

Chubar, O. & Celestre, R. (2019). *Opt. Express*, **27**, 28750–28759. Web of Science CrossRef PubMed Google Scholar

Chubar, O., Fluerasu, A., Berman, L., Kaznatcheev, K. & Wiegart, L. (2013). *J. Phys. Conf. Ser.* **425**, 162001. CrossRef Google Scholar

Coe, J. & Fromme, P. (2016). *Protein Pept. Lett.* **23**, 255–272. Web of Science CrossRef CAS PubMed Google Scholar

Dallari, F., Reiser, M., Lokteva, I., Jain, A., Möller, J., Scholz, M., Madsen, A., Grübel, G., Perakis, F. & Lehmkühler, F. (2021). *Appl. Sci.* **11**, 8037. Web of Science CrossRef Google Scholar

Daurer, B. J., Daurer, B. J., Daurer, B. J., Sala, S., Sala, S., Sala, S., Hantke, M. F., Reddy, H. K. N., Bielecki, J., Bielecki, J., Shen, Z., Shen, Z., Nettelblad, C., Nettelblad, C., Svenda, M., Svenda, M., Ekeberg, T., Carini, G. A., Carini, G. A., Hart, P., Osipov, T., Aquila, A., Loh, N. D., Loh, N. D., Maia, F. R. N. C., Maia, F. R. N. C., Thibault, P., Thibault, P. & Thibault, P. (2021). *Optica*, **8**, 551–562. Web of Science CrossRef Google Scholar

Decking, W., Abeghyan, S., Abramian, P., Abramsky, A., Aguirre, A., Albrecht, C., Alou, P., Altarelli, M., Altmann, P., Amyan, K., Anashin, V., Apostolov, E., Appel, K., Auguste, D., Ayvazyan, V., Baark, S., Babies, F., Baboi, N., Bak, P., Balandin, V., Baldinger, R., Baranasic, B., Barbanotti, S., Belikov, O., Belokurov, V., Belova, L., Belyakov, V., Berry, S., Bertucci, M., Beutner, B., Block, A., Blöcher, M., Böckmann, T., Bohm, C., Böhnert, M., Bondar, V., Bondarchuk, E., Bonezzi, M., Borowiec, P., Bösch, C., Bösenberg, U., Bosotti, A., Böspflug, R., Bousonville, M., Boyd, E., Bozhko, Y., Brand, A., Branlard, J., Briechle, S., Brinker, F., Brinker, S., Brinkmann, R., Brockhauser, S., Brovko, O., Brück, H., Brüdgam, A., Butkowski, L., Büttner, T., Calero, J., Castro-Carballo, E., Cattalanotto, G., Charrier, J., Chen, J., Cherepenko, A., Cheskidov, V., Chiodini, M., Chong, A., Choroba, S., Chorowski, M., Churanov, D., Cichalewski, W., Clausen, M., Clement, W., Cloué, C., Cobos, J. A., Coppola, N., Cunis, S., Czuba, K., Czwalinna, M., D'Almagne, B., Dammann, J., Danared, H., de Zubiaurre Wagner, A., Delfs, A., Delfs, T., Dietrich, F., Dietrich, T., Dohlus, M., Dommach, M., Donat, A., Dong, X., Doynikov, N., Dressel, M., Duda, M., Duda, P., Eckoldt, H., Ehsan, W., Eidam, J., Eints, F., Engling, C., Englisch, U., Ermakov, A., Escherich, K., Eschke, J., Saldin, E., Faesing, M., Fallou, A., Felber, M., Fenner, M., Fernandes, B., Fernández, J. M., Feuker, S., Filippakopoulos, K., Floettmann, K., Fogel, V., Fontaine, M., Francés, A., Martin, I. F., Freund, W., Freyermuth, T., Friedland, M., Fröhlich, L., Fusetti, M., Fydrych, J., Gallas, A., García, O., Garcia-Tabares, L., Geloni, G., Gerasimova, N., Gerth, C., Geßler, P., Gharibyan, V., Gloor, M., Głowinkowski, J., Goessel, A., Gołębiewski, Z., Golubeva, N., Grabowski, W., Graeff, W., Grebentsov, A., Grecki, M., Grevsmuehl, T., Gross, M., Grosse-Wortmann, U., Grünert, J., Grunewald, S., Grzegory, P., Feng, G., Guler, H., Gusev, G., Gutierrez, J. L., Hagge, L., Hamberg, M., Hanneken, R., Harms, E., Hartl, I., Hauberg, A., Hauf, S., Hauschildt, J., Hauser, J., Havlicek, J., Hedqvist, A., Heidbrook, N., Hellberg, F., Henning, D., Hensler, O., Hermann, T., Hidvégi, A., Hierholzer, M., Hintz, H., Hoffmann, F., Hoffmann, M., Hoffmann, M., Holler, Y., Hüning, M., Ignatenko, A., Ilchen, M., Iluk, A., Iversen, J., Iversen, J., Izquierdo, M., Jachmann, L., Jardon, N., Jastrow, U., Jensch, K., Jensen, J., Jeżabek, M., Jidda, M., Jin, H., Johansson, N., Jonas, R., Kaabi, W., Kaefer, D., Kammering, R., Kapitza, H., Karabekyan, S., Karstensen, S., Kasprzak, K., Katalev, V., Keese, D., Keil, B., Kholopov, M., Killenberger, M., Kitaev, B., Klimchenko, Y., Klos, R., Knebel, L., Koch, A., Koepke, M., Köhler, S., Köhler, W., Kohlstrunk, N., Konopkova, Z., Konstantinov, A., Kook, W., Koprek, W., Körfer, M., Korth, O., Kosarev, A., Kosiński, K., Kostin, D., Kot, Y., Kotarba, A., Kozak, T., Kozak, V., Kramert, R., Krasilnikov, M., Krasnov, A., Krause, B., Kravchuk, L., Krebs, O., Kretschmer, R., Kreutzkamp, J., Kröplin, O., Krzysik, K., Kube, G., Kuehn, H., Kujala, N., Kulikov, V., Kuzminych, V., La Civita, D., Lacroix, M., Lamb, T., Lancetov, A., Larsson, M., Le Pinvidic, D., Lederer, S., Lensch, T., Lenz, D., Leuschner, A., Levenhagen, F., Li, Y., Liebing, J., Lilje, L., Limberg, T., Lipka, D., List, B., Liu, J., Liu, S., Lorbeer, B., Lorkiewicz, J., Lu, H. H., Ludwig, F., Machau, K., Maciocha, W., Madec, C., Magueur, C., Maiano, C., Maksimova, I., Malcher, K., Maltezopoulos, T., Mamoshkina, E., Manschwetus, B., Marcellini, F., Marinkovic, G., Martinez, T., Martirosyan, H., Maschmann, W., Maslov, M., Matheisen, A., Mavric, U., Meißner, J., Meissner, K., Messerschmidt, M., Meyners, N., Michalski, G., Michelato, P., Mildner, N., Moe, M., Moglia, F., Mohr, C., Mohr, S., Möller, W., Mommerz, M., Monaco, L., Montiel, C., Moretti, M., Morozov, I., Morozov, P., Mross, D., Mueller, J., Müller, C., Müller, J., Müller, K., Munilla, J., Münnich, A., Muratov, V., Napoly, O., Näser, B., Nefedov, N., Neumann, R., Neumann, R., Ngada, N., Noelle, D., Obier, F., Okunev, I., Oliver, J. A., Omet, M., Oppelt, A., Ottmar, A., Oublaid, M., Pagani, C., Paparella, R., Paramonov, V., Peitzmann, C., Penning, J., Perus, A., Peters, F., Petersen, B., Petrov, A., Petrov, I., Pfeiffer, S., Pflüger, J., Philipp, S., Pienaud, Y., Pierini, P., Pivovarov, S., Planas, M., Pławski, E., Pohl, M., Polinski, J., Popov, V., Prat, S., Prenting, J., Priebe, G., Pryschelski, H., Przygoda, K., Pyata, E., Racky, B., Rathjen, A., Ratuschni, W., Regnaud-Campderros, S., Rehlich, K., Reschke, D., Robson, C., Roever, J., Roggli, M., Rothenburg, J., Rusiński, E., Rybaniec, R., Sahling, H., Salmani, M., Samoylova, L., Sanzone, D., Saretzki, F., Sawlanski, O., Schaffran, J., Schlarb, H., Schlösser, M., Schlott, V., Schmidt, C., Schmidt-Foehre, F., Schmitz, M., Schmökel, M., Schnautz, T., Schneidmiller, E., Scholz, M., Schöneburg, B., Schultze, J., Schulz, C., Schwarz, A., Sekutowicz, J., Sellmann, D., Semenov, E., Serkez, S., Sertore, D., Shehzad, N., Shemarykin, P., Shi, L., Sienkiewicz, M., Sikora, D., Sikorski, M., Silenzi, A., Simon, C., Singer, W., Singer, X., Sinn, H., Sinram, K., Skvorodnev, N., Smirnow, P., Sommer, T., Sorokin, A., Stadler, M., Steckel, M., Steffen, B., Steinhau-Kühl, N., Stephan, F., Stodulski, M., Stolper, M., Sulimov, A., Susen, R., Świerblewski, J., Sydlo, C., Syresin, E., Sytchev, V., Szuba, J., Tesch, N., Thie, J., Thiebault, A., Tiedtke, K., Tischhauser, D., Tolkiehn, J., Tomin, S., Tonisch, F., Toral, F., Torbin, I., Trapp, A., Treyer, D., Trowitzsch, G., Trublet, T., Tschentscher, T., Ullrich, F., Vannoni, M., Varela, P., Varghese, G., Vashchenko, G., Vasic, M., Vazquez-Velez, C., Verguet, A., Vilcins-Czvitkovits, S., Villanueva, R., Visentin, B., Viti, M., Vogel, E., Volobuev, E., Wagner, R., Walker, N., Wamsat, T., Weddig, H., Weichert, G., Weise, H., Wenndorf, R., Werner, M., Wichmann, R., Wiebers, C., Wiencek, M., Wilksen, T., Will, I., Winkelmann, L., Winkowski, M., Wittenburg, K., Witzig, A., Wlk, P., Wohlenberg, T., Wojciechowski, M., Wolff-Fabris, F., Wrochna, G., Wrona, K., Yakopov, M., Yang, B., Yang, F., Yurkov, M., Zagorodnov, I., Zalden, P., Zavadtsev, A., Zavadtsev, D., Zhirnov, A., Zhukov, A., Ziemann, V., Zolotov, A., Zolotukhina, N., Zummack, F. & Zybin, D. (2020). *Nat. Photon.* **14**, 391–397. Web of Science CrossRef CAS Google Scholar

Dutta, R., Friberg, A. T., Genty, G. & Turunen, J. (2015). *J. Opt. Soc. Am. A*, **32**, 1631. Web of Science CrossRef Google Scholar

Dutta, R., Korhonen, M., Friberg, A. T., Genty, G. & Turunen, J. (2014). *J. Opt. Soc. Am. A*, **31**, 637. Web of Science CrossRef Google Scholar

Ferreira, D., Bachelard, R., Guerin, W., Kaiser, R. & Fouché, M. (2020). arXiv:2002.05425v1. Google Scholar

Fröhlich, L., Aghababyan, A., Balandin, V., Beutner, B., Brinker, F., Decking, W., Golubeva, N., Hensler, O., Janik, Y., Kammering, R., Kay, H., Limberg, T., Liu, S., Nölle, D., Obier, F., Omet, M., Scholz, M., Wamsat, T., Wilksen, T. & Wortmann, J. (2019). *Proceedings of the 39th Free Electron Laser Conference*, 26–30 August 2019, Hamburg, Germany, pp. 335–338. Geneva: JACoW Publishing. Google Scholar

Gaudin, J., Sinn, H. & Tschentscher, T. (2011). *UVX 2010 – 10e Colloque sur les Sources Cohérentes et Incohérentes UV, VUV et X; Applications et Développements Récents*, 21–24 September 2010, Ile de Porquerolles, France, pp. 63–67. Les Ulis, France: EDP Sciences. Google Scholar

Geloni, G., Saldin, E., Samoylova, L., Schneidmiller, E., Sinn, H., Tschentscher, T. & Yurkov, M. (2010). *New J. Phys.* **12**, 035021. Web of Science CrossRef Google Scholar

Goodman, J. W. (2000). *Statistical Optics.* New York: John Wiley and Sons Inc. Google Scholar

Grünbein, M. L., Gorel, A., Foucar, L., Carbajo, S., Colocho, W., Gilevich, S., Hartmann, E., Hilpert, M., Hunter, M., Kloos, M., Koglin, J. E., Lane, T. J., Lewandowski, J., Lutman, A., Nass, K., Nass Kovacs, G., Roome, C. M., Sheppard, J., Shoeman, R. L., Stricker, M., van Driel, T., Vetter, S., Doak, R. B., Boutet, S., Aquila, A., Decker, F. J., Barends, T. R. M., Stan, C. A. & Schlichting, I. (2021). *Nat. Commun.* **12**, 1672. Web of Science PubMed Google Scholar

Grünert, J., Freund, W., Liu, J., Maltezopoulos, T., Kuiken, B., Scherz, A., Konopkova, Z., Zastrau, U. & Tanaka, T. (2022). *J. Phys. Conf. Ser.* **2380**, 012083. Google Scholar

Guest, T. W., Bean, R., Bielecki, J., Birnsteinova, S., Geloni, G., Guetg, M., Kammering, R., Kirkwood, H. J., Koch, A., Paganin, D. M., van Riessen, G., Vagovič, P., de Wijn, R., Mancuso, A. P. & Abbey, B. (2022). *J. Synchrotron Rad.* **29**, 939–946. Web of Science CrossRef IUCr Journals Google Scholar

Gureyev, T. E., Nesterets, Y. I., Stevenson, A. W., Miller, P. R., Pogany, A. & Wilkins, S. W. (2008). *Opt. Express*, **16**, 3223–3241. Web of Science CrossRef PubMed Google Scholar

Hara, T., Aoki, T., Dewa, H., Fujita, T., Fukami, K., Fukui, T., Hiraiwa, T., Hosoda, N., Inagaki, T., Itoga, T., Iwai, E., Kiyomichi, A., Kondo, C., Maesaka, H., Masaki, M., Matsubara, S., Morimoto, O., Ohshima, T., Oishi, M., Shoji, M., Soutome, K., Tajiri, Y., Takano, S., Tamura, K., Taniuchi, Y., Togawa, K., Watanabe, T., Yabuuchi, T. & Tanaka, H. (2021). *Phys. Rev. Accel. Beams*, **24**, 110702. Web of Science CrossRef Google Scholar

Hellert, T., Baboi, N. & Shi, L. (2017*a*). *Phys. Rev. Accel. Beams*, **20**, 123501. Web of Science CrossRef Google Scholar

Hellert, T., Decking, W. & Branlard, J. (2017*b*). *Phys. Rev. Accel. Beams*, **20**, 090702. Web of Science CrossRef Google Scholar

Hellert, T. & Schmidt, C. (2018). *J. Phys. Conf. Ser.* **1067**, 032014. CrossRef Google Scholar

Holmes, S., Kirkwood, H. J., Bean, R., Giewekemeyer, K., Martin, A. V., Hadian-Jazi, M., Wiedorn, M. O., Oberthür, D., Marman, H., Adriano, L., Al-Qudami, N., Bajt, S., Barák, I., Bari, S., Bielecki, J., Brockhauser, S., Coleman, M. A., Cruz-Mazo, F., Danilevski, C., Dörner, K., Gañán-Calvo, A. M., Graceffa, R., Fanghor, H., Heymann, M., Frank, M., Kaukher, A., Kim, Y., Kobe, B., Knoška, J., Laurus, T., Letrun, R., Maia, L., Messerschmidt, M., Metz, M., Michelat, T., Mills, G., Molodtsov, S., Monteiro, D. C. F., Morgan, A. J., Münnich, A., Peña Murillo, G. E., Previtali, G., Round, A., Sato, T., Schubert, R., Schulz, J., Shelby, M., Seuring, C., Sellberg, J. A., Sikorski, M., Silenzi, A., Stern, S., Sztuk-Dambietz, J., Szuba, J., Trebbin, M., Vagovic, P., Ve, T., Weinhausen, B., Wrona, K., Xavier, P. L., Xu, C., Yefanov, O., Nugent, K. A., Chapman, H. N., Mancuso, A. P., Barty, A., Abbey, B. & Darmanin, C. (2022). *Nature Communications*, **13**, 4708. Web of Science CrossRef PubMed Google Scholar

E, J., Kim, Y., Bielecki, J., Sikorski, M., de Wijn, R., Fortmann-Grote, C., Sztuk-Dambietz, J., Koliyadu, J. C. P., Letrun, R., Kirkwood, H. J., Sato, T., Bean, R., Mancuso, A. P. & Kim, C. (2022). *Structural Dynamics*, **9**, 064101. Web of Science CrossRef PubMed Google Scholar

Koliyadu, J. C. P., Letrun, R., Kirkwood, H. J., Liu, J., Jiang, M., Emons, M., Bean, R., Bellucci, V., Bielecki, J., Birnsteinova, S., de Wijn, R., Dietze, T. E. J., Grünert, J., Kane, D., Kim, C., Kim, Y., Lederer, M., Manning, B., Mills, G., Morillo, L. L., Reimers, N., Rompotis, D., Round, A., Sikorski, M., Takem, C. M. S., Vagovič, P., Venkatesan, S., Wang, J., Wegner, U., Mancuso, A. P. & Sato, T. (2022). *J. Synchrotron Rad.* **29**, 1273–1283. Web of Science CrossRef IUCr Journals Google Scholar

Kongtawong, S., Chubar, O. & Shaftan, T. (2022). *Phys. Rev. Accel. Beams*, **25**, 024601. Web of Science CrossRef Google Scholar

Kujala, N., Freund, W., Liu, J., Koch, A., Falk, T., Planas, M., Dietrich, F., Laksman, J., Maltezopoulos, T., Risch, J., Dall'Antonia, F. & Grünert, J. (2020). *Rev. Sci. Instrum.* **91**, 103101. Web of Science CrossRef PubMed Google Scholar

Kukk, E., Motomura, K., Fukuzawa, H., Nagaya, K. & Ueda, K. (2017). *Appl. Sci.* **7**, 531. Web of Science CrossRef Google Scholar

Latychevskaia, T., Mancini, G. F. & Carbone, F. (2015). *Sci. Rep.* **5**, 16573. Web of Science CrossRef PubMed Google Scholar

Lee, H., Shin, J., Cho, D. H., Jung, C., Sung, D., Ahn, K., Nam, D., Kim, S., Kim, K. S., Park, S.-Y., Fan, J., Jiang, H., Kang, H. C., Tono, K., Yabashi, M., Ishikawa, T., Noh, D. Y. & Song, C. (2020). *J. Synchrotron Rad.* **27**, 17–24. Web of Science CrossRef IUCr Journals Google Scholar

Lehmkühler, F., Dallari, F., Jain, A., Sikorski, M., Möller, J., Frenzel, L., Lokteva, I., Mills, G., Walther, M., Sinn, H., Schulz, F., Dartsch, M., Markmann, V., Bean, R., Kim, Y., Vagovic, P., Madsen, A., Mancuso, A. P. & Grübel, G. (2020). *Proc. Natl Acad. Sci. USA*, **117**, 24110–24116. Web of Science PubMed Google Scholar

Lehmkühler, F., Roseker, W. & Grübel, G. (2021). *Appl. Sci.* **11**, 6179. Google Scholar

Loh, N. D. & Elser, V. (2009). *Phys. Rev. E*, **80**, 026705. Web of Science CrossRef Google Scholar

Madsen, A., Leheny, R. L., Guo, H., Sprung, M. & Czakkel, O. (2010). *New J. Phys.* **12**, 055001. Web of Science CrossRef Google Scholar

Makita, M., Seniutinas, G., Seaberg, M. H., Lee, H. J., Galtier, E. C., Liang, M., Aquila, A., Boutet, S., Hashim, A., Hunter, M. S., van Driel, T., Zastrau, U., David, C. & Nagler, B. (2020). *Optica*, **7**, 404–409. Web of Science CrossRef CAS Google Scholar

Mancuso, A. P., Aquila, A., Batchelor, L., Bean, R. J., Bielecki, J., Borchers, G., Doerner, K., Giewekemeyer, K., Graceffa, R., Kelsey, O. D., Kim, Y., Kirkwood, H. J., Legrand, A., Letrun, R., Manning, B., Lopez Morillo, L., Messerschmidt, M., Mills, G., Raabe, S., Reimers, N., Round, A., Sato, T., Schulz, J., Signe Takem, C., Sikorski, M., Stern, S., Thute, P., Vagovič, P., Weinhausen, B. & Tschentscher, T. (2019). *J. Synchrotron Rad.* **26**, 660–676. Web of Science CrossRef CAS IUCr Journals Google Scholar

Manea, V. (2009). *J. Opt. Soc. Am. A*, **26**, 1907–1914. Web of Science CrossRef Google Scholar

Manetti, M., Buzmakov, A., Samoylova, L., Schneidmiller, E., Sinn, H., Szuba, J., Wrona, K. & Yurkov, M. (2019). *AIP Conf. Proc.* **2054**, 030019. Google Scholar

Martin, A. V., Kozlov, A., Berntsen, P., Roque, F. G., Flueckiger, L., Saha, S., Greaves, T. L., Conn, C. E., Hawley, A. M., Ryan, T. M., Abbey, B. & Darmanin, C. (2020). *Commun. Mater.* **1**, 40. Web of Science CrossRef Google Scholar

Nagaya, K., Motomura, K., Kukk, E., Fukuzawa, H., Wada, S., Tachibana, T., Ito, Y., Mondal, S., Sakai, T., Matsunami, K., Koga, R., Ohmura, S., Takahashi, Y., Kanno, M., Rudenko, A., Nicolas, C., Liu, X.-J., Zhang, Y., Chen, J., Anand, M., Jiang, Y., Kim, D.-E., Tono, K., Yabashi, M., Kono, H., Miron, C., Yao, M. & Ueda, K. (2016). *Phys. Rev. X*, **6**, 021035. Google Scholar

Nakano, M., Miyashita, O., Jonic, S., Tokuhisa, A. & Tama, F. (2018). *J. Synchrotron Rad.* **25**, 1010–1021. Web of Science CrossRef CAS IUCr Journals Google Scholar

Nugent, K. A. (2011). *Contemp. Phys.* **52**, 55–69. Web of Science CrossRef Google Scholar

Paganin, D. M. & Pelliccia, D. (2021). *Advances in Imaging and Electron Physics*, Vol. 18, edited by M. Hÿtch & P. W. Hawkes, pp. 63–158. Amsterdam: Elsevier. Google Scholar

Pardini, T., Cocco, D. & Hau-Riege, S. P. (2015). *Opt. Express*, **23**, 31889. Web of Science CrossRef PubMed Google Scholar

Patel, J., Round, A., Bielecki, J., Doerner, K., Kirkwood, H., Letrun, R., Schulz, J., Sikorski, M., Vakili, M., de Wijn, R., Peele, A., Mancuso, A. P. & Abbey, B. (2022). *J. Appl. Cryst.* **55**, 944–952. Web of Science CrossRef CAS IUCr Journals Google Scholar

Petrov, I., Boesenberg, U., Bushuev, V. A., Hallmann, J., Kazarian, K., Lu, W., Möller, J., Reiser, M., Rodriguez-Fernandez, A., Samoylova, L., Scholz, M., Sinn, H., Zozulya, A. & Madsen, A. (2022). *Opt. Express*, **30**, 4978–4987. Web of Science CrossRef CAS PubMed Google Scholar

Pfeiffer, F. (2018). *Nat. Photon.* **12**, 9–17. Web of Science CrossRef CAS Google Scholar

Poudyal, I., Schmidt, M. & Schwander, P. (2020). *Struct. Dyn.* **7**, 024102. Web of Science CrossRef PubMed Google Scholar

Raubenheimer, T. O. (2018). *Proceedings of the 60th ICFA Advanced Beam Dynamics Workshop on Future Light Sources*, 5 March 2018, Shanghai, People's Republic of China, Abstract No. MOP1WA02. Geneva: JACoW Publishing, Geneva, Switzerland. Google Scholar

Reddy, H. K. N., Yoon, C. H., Aquila, A., Awel, S., Ayyer, K., Barty, A., Berntsen, P., Bielecki, J., Bobkov, S., Bucher, M., Carini, G. A., Carron, S., Chapman, H., Daurer, B., DeMirci, H., Ekeberg, T., Fromme, P., Hajdu, J., Hanke, M. F., Hart, P., Hogue, B. G., Hosseinizadeh, A., Kim, Y., Kirian, R. A., Kurta, R. P., Larsson, D. S. D., Duane Loh, N., Maia, F. R. N. C., Mancuso, A. P., Mühlig, K., Munke, A., Nam, D., Nettelblad, C., Ourmazd, A., Rose, M., Schwander, P., Seibert, M., Sellberg, J. A., Song, C., Spence, J. C. H., Svenda, M., Van der Schot, G., Vartanyants, I. A., Williams, G. J. & Xavier, P. L. (2017). *Sci. Data*, **4**, 170079. Web of Science CrossRef PubMed Google Scholar

Reiche, S. (1999). *Nucl. Instrum. Methods Phys. Res. A*, **429**, 243–248. Web of Science CrossRef CAS Google Scholar

Rose, M., Bobkov, S., Ayyer, K., Kurta, R. P., Dzhigaev, D., Kim, Y. Y., Morgan, A. J., Yoon, C. H., Westphal, D., Bielecki, J., Sellberg, J. A., Williams, G., Maia, F. R. N. C., Yefanov, O. M., Ilyin, V., Mancuso, A. P., Chapman, H. N., Hogue, B. G., Aquila, A., Barty, A. & Vartanyants, I. A. (2018). *IUCrJ*, **5**, 727–736. Web of Science CrossRef CAS PubMed IUCr Journals Google Scholar

Sala, S., Daurer, B. J., Odstrcil, M., Capotondi, F., Pedersoli, E., Hantke, M. F., Manfredda, M., Loh, N. D., Thibault, P. & Maia, F. R. N. C. (2019). arXiv:1901.08970. Google Scholar

Saldin, E., Schneidmiller, E. & Yurkov, M. (1999). *Nucl. Instrum. Methods Phys. Res. A*, **429**, 233–237. Web of Science CrossRef CAS Google Scholar

Saldin, E., Schneidmiller, E. & Yurkov, M. V. (2006) *Proceedings of FEL2006*, BESSY, Berlin, Germany, pp. 206–209. Google Scholar

Saldin, E. L., Schneidmiller, E. A. & Yurkov, M. V. (2010). *New J. Phys.* **12**, 035010. Web of Science CrossRef Google Scholar

Saleh, B. E. A. & Teich, M. C. (2019). *Fundamentals of Photonics*, 3rd ed. Chichester: Wiley. Google Scholar

Samoylova, L., Buzmakov, A., Chubar, O. & Sinn, H. (2016). *J. Appl. Cryst.* **49**, 1347–1355. Web of Science CrossRef CAS IUCr Journals Google Scholar

Schelp, C. (2018). *An Alternative Way to Plot the Covariance Ellipse.* https://carstenschelp.github.io/2018/09/14/Plot_Confidence_Ellipse_001.html. Google Scholar

Seaberg, M., Cojocaru, R., Berujon, S., Ziegler, E., Jaggi, A., Krempasky, J., Seiboth, F., Aquila, A., Liu, Y., Sakdinawat, A., Lee, H. J., Flechsig, U., Patthey, L., Koch, F., Seniutinas, G., David, C., Zhu, D., Mikeš, L., Makita, M., Koyama, T., Mancuso, A. P., Chapman, H. N. & Vagovič, P. (2019). *J. Synchrotron Rad.* **26**, 1115–1126. Web of Science CrossRef CAS IUCr Journals Google Scholar

Sinn, H., Gaudin, J., Samoylova, L., Trapp, A. & Galasso, G. (2011). *X-ray Optics and Beam Transport.* Technical Report, PHPPUBDB-16926, XFEL.EU TR-2011-002, European XFEL. Google Scholar

Sobolev, E., Zolotarev, S., Giewekemeyer, K., Bielecki, J., Okamoto, K., Reddy, H. K. N., Andreasson, J., Ayyer, K., Barak, I., Bari, S., Barty, A., Bean, R., Bobkov, S., Chapman, H. N., Chojnowski, G., Daurer, B. J., Dörner, K., Ekeberg, T., Flückiger, L., Galzitskaya, O., Gelisio, L., Hauf, S., Hogue, B. G., Horke, D. A., Hosseinizadeh, A., Ilyin, V., Jung, C., Kim, C., Kim, Y., Kirian, R. A., Kirkwood, H., Kulyk, O., Küpper, J., Letrun, R., Loh, N. D., Lorenzen, K., Messerschmidt, M., Mühlig, K., Ourmazd, A., Raab, N., Rode, A. V., Rose, M., Round, A., Sato, T., Schubert, R., Schwander, P., Sellberg, J. A., Sikorski, M., Silenzi, A., Song, C., Spence, J. C. H., Stern, S., Sztuk-Dambietz, J., Teslyuk, A., Timneanu, N., Trebbin, M., Uetrecht, C., Weinhausen, B., Williams, G. J., Xavier, P. L., Xu, C., Vartanyants, I. A., Lamzin, V. S., Mancuso, A. & Maia, F. R. N. C. (2020). *Commun. Phys.* **3**, 97. Web of Science CrossRef Google Scholar

E, J., Stransky, M., Jurek, Z., Fortmann-Grote, C., Juha, L., Santra, R., Ziaja, B. & Mancuso, A. P. (2021). *Sci. Rep.* **11**, 17976. Web of Science CrossRef PubMed Google Scholar

Sun, Y., Esposito, V., Hart, P. A., Hansson, C., Li, H., Nakahara, K., MacArthur, J. P., Nelson, S., Sato, T., Song, S., Sun, P., Fuoss, P., Sutton, M. & Zhu, D. (2021). *Appl. Sci.* **11**, 10041. Web of Science CrossRef Google Scholar

Teague, M. R. (1983). *J. Opt. Soc. Am.* **73**, 1434–1441. CrossRef Web of Science Google Scholar

Tran, T. & Wurtele, J. (1989). *Comput. Phys. Commun.* **54**, 263–272. CrossRef CAS Web of Science Google Scholar

Vagovič, P., Sato, T., Mikeš, L., Mills, G., Graceffa, R., Mattsson, F., Villanueva-Perez, P., Ershov, A., Faragó, T., Uličný, J., Kirkwood, H., Letrun, R., Mokso, R., Zdora, M.-C., Olbinado, M. P., Rack, A., Baumbach, T., Schulz, J., Meents, A., Chapman, H. N. & Mancuso, A. P. (2019). *Optica*, **6**, 1106–1109. Google Scholar

Vartanyants, I. A., Singer, A., Mancuso, A. P., Yefanov, O. M., Sakdinawat, A., Liu, Y., Bang, E., Williams, G. J., Cadenazzi, G., Abbey, B., Sinn, H., Attwood, D., Nugent, K. A., Weckert, E., Wang, T., Zhu, D., Wu, B., Graves, C., Scherz, A., Turner, J. J., Schlotter, W. F., Messerschmidt, M., Lüning, J., Acremann, Y., Heimann, P., Mancini, D. C., Joshi, V., Krzywinski, J., Soufli, R., Fernandez-Perea, M., Hau-Riege, S., Peele, A. G., Feng, Y., Krupin, O., Moeller, S. & Wurth, W. (2011). *Phys. Rev. Lett.* **107**, 144801. Web of Science CrossRef PubMed Google Scholar

Vassholz, M., Hoeppe, H. P., Hagemann, J., Rosselló, J. M., Osterhoff, M., Mettin, R., Kurz, T., Schropp, A., Seiboth, F., Schroer, C. G., Scholz, M., Möller, J., Hallmann, J., Boesenberg, U., Kim, C., Zozulya, A., Lu, W., Shayduk, R., Schaffer, R., Madsen, A. & Salditt, T. (2021). *Nat. Commun.* **12**, 3468. Web of Science CrossRef PubMed Google Scholar

Wijn, R. de, Melo, D. V. M., Koua, F. H. M. & Mancuso, A. P. (2022). *Appl. Sci.* **12**, 2551. Google Scholar

Williams, G. J., Chubar, O., Berman, L., Chu, Y. S. & Robinson, I. K. (2017). *Proc. SPIE*, **10388**, 103880E. Google Scholar

Williams, G. J., Quiney, H. M., Peele, A. G. & Nugent, K. A. (2007). *Phys. Rev. B*, **7**, 104102. Web of Science CrossRef Google Scholar

Yoon, C. H., Yurkov, M. V., Schneidmiller, E. A., Samoylova, L., Buzmakov, A., Jurek, Z., Ziaja, B., Santra, R., Loh, N. D., Tschentscher, T. & Mancuso, A. P. (2016). *Sci. Rep.* **6**, 24791. Web of Science CrossRef PubMed Google Scholar

Zhang, L., Cocco, D., Kelez, N., Morton, D. S., Srinivasan, V. & Stefan, P. M. (2015). *J. Synchrotron Rad.* **22**, 1170–1181. Web of Science CrossRef IUCr Journals Google Scholar

This is an open-access article distributed under the terms of the Creative Commons Attribution (CC-BY) Licence, which permits unrestricted use, distribution, and reproduction in any medium, provided the original authors and source are cited.