## research papers

## Why is my image noisy? A look into the terms contributing to a time-resolved X-ray microscopy image

^{a}Swiss Light Source, Paul Scherrer Institut, 5232 Villigen PSI, Switzerland^{*}Correspondence e-mail: simone.finizio@psi.ch

Through Monte Carlo simulations, we investigate how various experimental parameters can influence the quality of time-resolved scanning transmission X-ray microscopy images. In particular, the effect of the X-ray

of the thickness of the investigated samples, and of the frequency of the dynamical process under investigation on the resulting time-resolved image are investigated. The ideal sample and imaging conditions that allow for an optimal image quality are then identifed.Keywords: STXM; time-resolved microscopy; Monte Carlo simulations.

### 1. Introduction

The interactions between the large number of atoms that constitute real-world material systems lead to a multiplicity of collective effects with spatial and temporal scales ranging from the nanoscopic to the mesoscopic and macroscopic. In condensed-matter physics, such effects include, for example, ferromagnetism and antiferromagnetism, ferroelectricity, and superconductivity. The characterization of these effects at the nanoscale is of vital importance for their understanding, and has received much attention from the research community in recent times (Wen *et al.*, 2019).

Various experimental techniques have been developed to tackle the challenge of investigating complex systems at ultrasmall and ultrafast timescales (Wen *et al.*, 2019). A particular effort has been dedicated into the development of experimental methods and protocols able to combine high spatial and temporal resolutions into time-resolved (TR) imaging techniques. Amongst such time-resolved imaging techniques, pump–probe TR X-ray microscopy has proven itself from its inception in the early 2000s (Choe *et al.*, 2004; Van Waeyenberge *et al.*, 2006) a very powerful technique for the investigation of dynamical processes exhibiting features at the sub-nanosecond and nanometre scales. The pump–probe microscopy technique allows for the imaging of repetitive dynamical processes by exciting the dynamical process through a periodic `pump' signal (*e.g.* electrical pulse, RF signal, optical excitations, *etc*.) and probing the configuration of the sample through a periodic `probing' beam (*e.g.* an X-ray pulse). The time separation between the pump and probe signal can be varied and, by determining the status of the sample at each delay, a time-resolved series can be reconstructed. A successful pump–probe investigation requires therefore a sample exhibiting a reproducible dynamical behavior, precise timing between the pump and probe pulses, a probing pulse faster than the dynamical process of interest, a contrast mechanism to allow for the probing of the dynamical sample configuration, and the absence of interactions between the probing pulse and the sample that might cause an unwanted dynamical response.

Pump–probe investigations are not limited to TR imaging techniques, and include, for example, the study of phase transitions (Zhu *et al.*, 2016), dynamical strain variations (Clark *et al.*, 2013), ferroelectric domain dynamics (Akamatsu *et al.*, 2018), and magneto-dynamical processes. In the case of pump–probe imaging, this technique has been highly successful for the investigation of dynamical processes in magnetic materials, where important discoveries on the physical processes driving the dynamics have been carried out. A non-exhaustive list of examples includes the manipulation of magnetic domain walls (Rhensius *et al.*, 2010; Bisig *et al.*, 2013; Finizio *et al.*, 2019*a*; Foerster *et al.*, 2017; Donnelly *et al.*, 2020; Vogel *et al.*, 2012) and of topological objects such as magnetic vortices (Guslienko *et al.*, 2006; Choe *et al.*, 2004; Bolte *et al.*, 2008; Jung *et al.*, 2010; Van Waeyenberge *et al.*, 2006; Kammerer *et al.*, 2011; Filianina *et al.*, 2019) and skyrmions (Büttner *et al.*, 2015; Finizio *et al.*, 2019*b*; Litzius *et al.*, 2017; Woo *et al.*, 2018), spin-torque driven processes (Bolte *et al.*, 2008; Finizio *et al.*, 2019*b*; Litzius *et al.*, 2017; Woo *et al.*, 2018; Baumgartner *et al.*, 2017), and spin-wave processes (Wintz *et al.*, 2016; Förster *et al.*, 2019; Dieterle *et al.*, 2019; Kammerer *et al.*, 2011; Albisetti *et al.*, 2020). Amongst the various X-ray microscopy techniques that offer the possibility for time-resolved imaging, such as, for example, time-resolved photoemission (Raabe *et al.*, 2005; Choe *et al.*, 2004; Van Waeyenberge *et al.*, 2006), time-resolved holography (Büttner *et al.*, 2015), and time-resolved ptychography (Donnelly *et al.*, 2020), scanning-transmission X-ray microscopy (STXM) is a popular choice. This is mostly due to the use of a fast (APD) as the X-ray detector, that allows one to resolve X-ray photons emitted from neighboring electron bunches, enabling the possibility to use the entire filling pattern of the synchrotron light source to acquire time-resolved images, substantially reducing imaging times if compared with techniques that rely on a single bunch for pump–probe imaging (Puzic *et al.*, 2010).

For some specific sample systems, the acquisition of high-quality TR-STXM images can be challenging. Examples of challenging sample systems are ultrathin magnetic films (Baumgartner *et al.*, 2017), where the low contrast requires long integration times to acquire sufficient statistics, the study of processes occurring at frequencies of several GHz (Dieterle *et al.*, 2019), where the width of the X-ray pulses generated by the synchrotron light source becomes comparable with the period of the excitation, and long-lived processes requiring nonetheless to be investigated with a fine time resolution (Finizio *et al.*, 2019*b*), where the high number of frames of the time-resolved image imposes high integration times to acquire sufficient statistics. Given the fact that synchrotron beam time is a relatively limited and costly resource, the optimization of the processes, leading to a TR-STXM image (from the design of the sample to the choice of the specific imaging parameters), should lead to an improved success rate. It is therefore useful to provide the users of TR-STXM imaging with a tool allowing them to simulate how the TR-STXM images of the process to be investigated would appear under experimental conditions. In this work, we provide such a tool, based on Monte Carlo simulations. With these simulations, we then identify what parameters affect the quality of the final TR-STXM image, finding optimal imaging conditions.

### 2. Time-resolved imaging model

To understand what parameters influence the quality of a TR-STXM image, we modeled each possible contribution to the TR-STXM image and simulated them with a Monte Carlo approach. The model employed for the simulations is schematically depicted in Fig. 1. There are four different systems that contribute to the final TR-STXM image, given by:

(1) *Probe beam.* In our case, the probing beam is generated by the synchrotron light source. Here, we model the generation of the single X-ray photons, *i.e.* the probability of whether a photon is generated in a given bunch, its polarization, and the moment at which it is generated.

(2) *Sample.* The X-ray photons generated by the synchrotron are focused onto a nanometric spot on the surface of the sample (which is then raster scanned to form an image), and interact with the magnetic material. The probability that an X-ray photon is transmitted is dependent on the absorption probability.

(3) *Electronics.* The goal of time-resolved imaging with the pump–probe protocol is to image a reproducible dynamical process triggered by an external excitation. This excitation is typically generated using high-frequency waveform generators synchronized to the master clock of the synchrotron light source. The precision of this locking will affect the recorded dynamics, and needs therefore to be modeled.

(4) *Detector.* The X-ray photons transmitted across the sample need to be detected, in order to determine the local absorption of the sample. For TR-STXM imaging, a fast APD is employed as X-ray detector. The detection process affects the recorded TR-STXM images, and therefore needs to be considered in our model. In particular, the linearity of the APD and the inability of the APD to recognize multiphoton and higher-energy photon events (due to the fact that each X-ray photon can be absorbed in different regions of the APD) need to be considered.

In the next sections, the model employed to describe each of the contributions introduced above will be discussed.

#### 2.1. Probe beam

A synchrotron light source operates as an intrinsically pulsed X-ray source, generating an X-ray pulse every about 2–10 ns depending on the frequency of the radio-frequency (RF) cavities employed to restore the energy lost by the electrons due to the X-ray emission. For the Swiss Light Source, the RF cavities operate at a frequency of about 5 × 10^{8} Hz, leading to the emission of an X-ray pulse every about 2 ns. Within a single electron bunch, the generation of the single X-ray photons is a stochastic process, where the generation probability is determined by quantum-mechanical and relativistic effects, whose detailed description lies well beyond the scope of this work. For the purpose of the model described here, *i.e.* in the absence of coherent synchrotron radiation, the photon generation can be described according to Poisson statistics, where the probability mass function *P*_{ph}(*N*) of generating *N* photons from the electron bunch is given by the following relation,

with ν being the mean number of X-ray photons generated by the electron bunch.

The emitted X-ray photons are passed through a beamline that uses a combination of mirrors, slits and gratings (or crystals) to reject photons outside of the desired photon energy range and coherently illuminate a Fresnel zone plate that focuses the beam onto the sample. For the purpose of the simulations presented in this work, we can describe the whole synchrotron and beamline up to the sample (see Fig. 1) as an X-ray photon generator with Poisson statistics, where the mean number of monochromatic X-rays generated per bunch is given by

with Φ being the at the focal spot of the Fresnel zone plate, *f*_{rev} the revolution rate of the synchrotron (*i.e.* the frequency at which an electron bunch conducts a full rotation of the storage ring), and *N*_{fill} the number of filled bunches stored in the ring. In the case of the Swiss Light Source, the revolution rate *f*_{rev} is 1.049 × 10^{6} Hz, and the number of filled bunches *N*_{fill} is 420 (in the multibunch operation mode), out of a total of 480 available bunch positions.

Assuming a typical zone plate for TR-STXM (Ir zone plate with an outermost zone width of 25–30 nm, diameter around 240 µm) with an efficiency of about 10% (Jefimovs *et al.*, 2007), the typical photon fluxes Φ that can be expected after the zone plate for a soft X-ray bend-magnet beamline at the *L*_{3} absorption edges of the transition metal ferromagnetic elements are on the order of 10^{6}–10^{8} photons s^{−1} with a of 2000 (Raabe *et al.*, 2008). This leads to a probability of a bunch generating a photon that passes through the beamline to illuminate the sample in the range 10^{−3}–10^{−1}. In the case of an undulator-based beamline with typical photon fluxes before the zone plate on the order of 10^{11} photons s^{−1} (resolving power > 5000) (Flechsig *et al.*, 2010), photon fluxes on the order of 10^{8}–10^{10} photons s^{−1} can be expected to illuminate the sample.

Besides the photons at the fundamental energy, X-ray photons at energies corresponding to the higher-order diffractions of the grating monochromator can also illuminate the sample. This additional, unwanted, *et al.*, 2007). For an undulator beamline equipped with a plane-grating monochromator, the higher-order suppression will depend on the fix focus constant (*c*_{ff}) of the monochromator, but a value on the order of 1–5% can be assumed for the higher-order contribution (Sawhney *et al.*, 1997). These higher-order photons are not affected by the magnetic configuration of the sample, and are transmitted across the sample with minimal absorption from it. As the APD is not able to determine the energy of the X-ray photon (see Section 2.4 for more details), the contribution of the higher-order photons on the final TR-STXM image needs to be considered. Here, the higher-order photons are generated in the same way as the fundamental energy photons where the probability mass function for the photon generation is given by

with ν_{H} = *H*ν, with *H* defined as the higher-order fraction. The total will therefore be given by Φ_{tot} = (1 + *H*)Φ.

A further parameter that has to be considered here is given by the temporal width of the X-ray pulses generated by the synchrotron light source. The amplitude as a function of time of the X-ray pulses generated by the synchrotron light source can be described with a Gaussian distribution. The time instant at which the photon is generated can be described using a Gaussian probability density function, given by the following relation,

with σ_{x} being the 1σ width of the X-ray pulse. In the case of the Swiss Light Source operating in the multibunch filling pattern with normal optics, the width of the X-ray pulses is about 70 ps full width at half-maximum (FWHM), corresponding to a σ_{x} of about 30 ps.

Therefore, for the simulations presented here, the synchrotron generates, for each filled bunch, a number of photons according to the probability mass functions given in equations (1) and (3). As the interaction of the fundamental energy and higher-order photons with the sample is different, the two cases are simulated separately, each with their defined photon fluxes. For each of the photons at the fundamental energy, the time at which the photons are generated is determined according to the probability density function given in equation (4). This will be used, together with the time-jitter term described in Section 2.3, to determine the time-of-arrival of the X-ray photon on the sample (in the time frame of the dynamical process being investigated). Finally, the polarization of each X-ray photon at the fundamental energy is determined depending on the fraction of circular light generated by the synchrotron. In the case of a bend-magnet beamline such as PolLux, about 60% of the generated photons are circularly polarized (when tilting the electron orbit of 200 µrad inside the bend magnet) (Raabe *et al.*, 2008), while for a APPLE-II type undulator operating at the first harmonic in the soft X-ray regime about all of the generated photons are circularly polarized.

#### 2.2. Sample

The sample is where the dynamical process that the user of the endstation wants to investigate takes place. Samples for TR-STXM imaging are fabricated on X-ray transparent substrates that allow for the transmission of the soft X-rays not absorbed by the magnetic material. To image the dynamical processes, the X-ray energy is tuned to one of the X-ray absorption edges of the element that is being investigated.

To image the magneto-dynamical processes, as considered in this work, the X-ray energy is tuned to a resonance peak that shows X-ray *et al.*, 1987) and belongs to an of the element being investigated. This provides a contrast mechanism to discern variations in the projection of the local magnetization vector of the sample along the direction of the probing X-ray beam, which we define here as *m*_{x}. The discussion and model presented here can be extended also to other contrast mechanisms. The absorption probability is determined by the thickness of the material following the Lambert–Beer law, *i.e.*

with *d* being the thickness of the magnetic material, and ξ the of the material. The product of *d* and ξ is defined as the (OD) of the material. If the X-rays are circularly polarized, the additional contribution to the photon absorption probability given by the XMCD effect needs to be considered. This can be described by an additional term ξ_{mag} that contributes to the This additional term is given by the product of the XMCD coefficient ξ_{XMCD}, dependent on the specific magnetic material, with the projection of the local magnetization vector **m** along the direction indicated by the wavevector of the incoming X-radiation. Therefore, for circularly polarized photons, the absorption probability is given by the following relation,

with *m*_{x} being the projection of the local magnetization unit vector along the wavevector of the X-radiation, and γ_{XMCD} the XMCD contrast in units of The value of *m*_{x} will vary across the image (*i.e.* depending on the local magnetic configuration of the sample), and will also exhibit a time-dependent variation, describing the dynamical process being investigated. For the purpose of the simulations presented here, we consider the case of a purely sinusoidal excitation, *i.e.* where the magnetization configuration of the sample is excited by a sinusoidal signal at a defined frequency *f*. This means that the magnetization can be described with the following relation,

with **r** being the position on the sample probed by the beam. Equation (6) can therefore be rewritten as follows,

The absorption probability given in equation (8), and its counterpart for the linearly polarized light given in equation (5), are used to describe the absorption of the X-ray photons at the fundamental energy. For the higher-order light, the absorption can be described as = , independently of the X-ray polarization, as the photon energy does not match a dichroic resonance of the magnetic material. As the effect of this absorption is to decrease the higher-order after the sample independently from the magnetic configuration of the sample, and considering that higher-energy photons typically have a high transmittance, we have made the simplifying assumption that all of the higher-order light is transmitted across the sample, as the variation of the higher-order is already being considered in the photon generation model.

#### 2.3. Electronics

In the previous section, it was mentioned that the local magnetization configuration of the sample, described by the local magnetization vector **m**, oscillates with a sinusoidal modulation at a given frequency *f*. This dynamical process is triggered by an external excitation. As mentioned in the introductory section of this manuscript, many different excitation mechanisms can be employed to trigger magneto-dynamical processes. In the case of TR-STXM imaging, the most typical excitation mechanism is given by electrical signals, which can be directly employed for exciting the dynamical process [*e.g.* processes driven by spin–orbit torques (Finizio *et al.*, 2019*b*; Litzius *et al.*, 2017; Woo *et al.*, 2018; Baumgartner *et al.*, 2017)], or indirectly through the generation of oscillating magnetic fields when injecting the electrical signal across a nanostructured antenna [*e.g.* spin-wave processes (Wintz *et al.*, 2016; Förster *et al.*, 2019; Dieterle *et al.*, 2019; Kammerer *et al.*, 2011)]. To generate these signals, an arbitrary waveform generator is synchronized with the master clock of the storage ring, allowing to generate a signal that is synchronous with each of the X-ray pulses generated by the storage ring, allowing for the sampling of this signal at well defined time instants (Puzic *et al.*, 2010).

However, jitter in the synchronization between the master clock and the waveform generator can produce an additional uncertainty on the time instant that is being probed by a given X-ray photon. As electronic jitter is usually well described by a Gaussian probability density function, the effect of the electronic jitter can be described as an additional uncertainty on the photon arrival time (in the time frame of the dynamical process), described by the following Gaussian probability density function,

with σ_{t} being the standard deviation of the electronic jitter. A reasonable number for the electronic setup currently employed at PolLux is for a jitter of about 50 ps FWHM, corresponding to a σ_{t} of about 20 ps.

#### 2.4. Detector

The final component of the TR-STXM imaging model presented in this work is the X-ray detector, which is utilized to convert the X-ray photons into an electrical signal that is then processed by the fast analog–digital converter installed in the setup employed for time-resolved imaging, which converts the voltage pulses into counts (Puzic *et al.*, 2010). The detector employed for TR-STXM imaging is an APD with a bandwidth higher than the master clock frequency of the synchrotron. This allows the APD to resolve two X-ray photons emitted by neighboring bunches, which enables the possibility to employ the entire filling pattern of the synchrotron to acquire a time-resolved image (Puzic *et al.*, 2010; Finizio *et al.*, 2018*b*). This is one of the main advantages of TR-STXM compared with other time-resolved X-ray microscopy techniques, which have to rely only on the photons emitted by an isolated electron bunch and suffer therefore from a strongly reduced photon flux.

The behavior of the APD detector can be modeled according to the following considerations:

(i) The APD cannot distinguish the `type' of photon it is detecting, *i.e.* a circularly polarized photon is the same as a linearly polarized for the APD.

(ii) The APD cannot resolve the energy of the photon, *i.e.* a higher-energy photon will be indistinguishable from a photon at the nominal energy.

(iii) The APD cannot distinguish between one or multiple photons within the same bunch. It can either count 0 (no photons detected) or 1 (one or more photons detected). This will affect the linearity of the APD at high photon fluxes.

(iv) The APD has a given

defining the probability that a photon arriving at the APD will produce a voltage pulse.It is noteworthy here that, in principle, if all photons interacted in the same manner with the APD, it would be possible to utilize the amplitude of the generated APD voltage pulse to resolve the energy of the incident photons. However, as there are several possible interaction mechanisms for the photon inside the APD, this leads to a substantial distribution of the amplitude of the generated APD voltage pulses (Finizio *et al.*, 2020), which hinders the detection of the original photon energy.

### 3. Monte Carlo simulations

To investigate the influence of each of the components of the model introduced in the previous section, we performed a Monte Carlo simulation of a TR-STXM image, where a magneto-dynamical process simulated through micromagnetic modeling was employed as template for the TR-STXM image. The specific process that was utilized for the simulations presented in this work is the gyration of a magnetic vortex in a Landau pattern, simulated using the MuMax3 finite differences simulation package (Vansteenkiste *et al.*, 2014), and shown in the supporting information. To reduce computation time, a 16 × 16 pixel cropped area at the center of the Landau pattern was utilized for the simulation of the TR-STXM image. Here, it is assumed that the probing X-ray spot covers exactly one pixel of the reference image, without any signal originating from the neighboring pixels. The simulated TR-STXM image is composed of 14 time steps.

Before starting the Monte Carlo simulation, the number of bunches per pixel that contribute to the final image is calculated from the user-defined integration time. For each of these bunches, which interact with the sample every 2 ns, the following algorithm is executed:

(1) The number of photons emitted by the given bunch is determined using equations (1) and (3) for the photons of nominal energy and the higher-order photons, respectively, taking into consideration the specific filling pattern of the synchrotron. For each one of the photons at the nominal energy, the following is determined:

(1*a*) Polarization, depending on the probability of generation of circularly polarized photons.

(1*b*) The position (time) in the bunch from which the photon was emitted, using equation (4).

(2) The nominal energy photons are then interacting with the sample (it is assumed, for simplicity, that the higher-order photons do not interact with the sample), and the number of photons transmitted across the sample is determined. For this determination, the following is considered:

(2*a*) For the linearly polarized photons, the absorption probability is determined according to equation (5).

(2*b*) For the circularly polarized photons, the absorption probability is determined according to equation (8). The photon arrival time is calculated by summing the time at which the photon was generated from the bunch [equation (4)] with the jitter between the electronics and the synchrotron master clock, using equation (9).

(3) Each of the transmitted photons will independently interact with the APD. The number of photons that give rise to a signal from the APD is determined from the

of the diode. If at least one photon is detected, a single count will be added to the simulated TR-STXM image pixel.The simulations shown in this work were performed using the commercial software Matlab. The scripts employed for the simulations are available in the supporting information.

To understand how different parameters contribute to the final TR-STXM image, the following variables were used:

(i) *Photon flux.* The for the nominal energy photons was varied in a logarithmic scale between 10^{6} and 10^{11} photons s^{−1}. For an undulator-based endstation, a higher can be considered.

(ii) *Spectral purity.* The fraction of higher-order light was varied in a logarithmic scale between 0.001 and 1 (0.05% to 50% of the total flux). This parameter depends on the specific beamline.

(iii) *Sample thickness.* The thickness of the sample was varied in a logarithmic scale between 0.1 and 7 optical densities.

(iv) *XMCD contrast.* The XMCD contrast of the sample was varied in a linear scale between 0.01 and 0.1.

(v) *Excitation frequency.* The frequency of the excitation of the magneto-dynamical process was varied in a logarithmic scale between 10^{8} and 10^{10} Hz.

These values span the typical ranges for experimental samples routinely investigated at the PolLux beamline [*i.e.* ranging from 0.8 nm-thick Co nanostructures (Baumgartner *et al.*, 2017) to 200 nm-thick Fe_{x}Ni_{1–x} microstructures (Finizio *et al.*, 2018*a*)]. In addition to those variables, the following parameters have been kept constant (but can in principle be varied with minimal changes to the simulation script):

(i) *Polarization.* The purity of the circular polarization of the X-rays was selected to be 0.6, according to the value measured for the PolLux beamline (Raabe *et al.*, 2008). For a STXM endstation operating at an APPLE-II undulator-based beamline, the purity of the circular polarization would be 1 (at the first harmonic).

(ii) *Bunch width and jitter.* The width of the X-ray pulse was selected to be 70 ps FWHM, and the electronic jitter was selected to be 50 ps FWHM, according to values suitable for the PolLux beamline. For different beamlines, this parameter would be determined by the specific filling pattern (and electron optics) used in the synchrotron.

(iii) *Quantum efficiency.* To reduce the computation time, the of the APD was set to 1, *i.e.* that every photon that arrives at the APD will give rise to a detectable signal.

(iv) *Integration time.* The integration time was selected to be 10 ms, corresponding to about 5 × 10^{6} bunches per pixel at the Swiss Light Source. For a different beamline, this parameter would have to be modified depending on the specific filling pattern used in the synchrotron.

In summary, the parameters depending on the specific beamline are the

its spectral purity, the polarization of the X-rays, the width of the X-ray bunches and the electronics jitter. The parameters depending on the specific sample are its thickness, the XMCD contrast, and the frequency of the signal driving the dynamical process.The TR-STXM images simulated through the algorithm described above were then analyzed by determining the time-dependent change in contrast in a region of interest centered on the geometrical center of the structure, shown in the inset of Fig. 2. The predicted change in contrast, determined from the micromagnetic simulated template image, follows a sinusoidal curve, as shown in Fig. 2. Therefore, the change in contrast of the simulated TR-STXM images was fitted with the following function,

The amplitude *A*_{1} in equation (10) is then utilized as the metric for the quality of the TR-STXM image. To acquire sufficient statistics to determine a meaningful error for the fitted amplitude *A*_{1}, each simulation was repeated 100 times.

### 4. Results and discussion

In this section, the results of the Monte Carlo simulations described in the previous section will be presented. In particular, the contribution of each of the variables defined in the previous section to the final simulated TR-STXM image, using the amplitude of the sinusoidal fit described in Fig. 2 as metric, will be shown and discussed.

#### 4.1. Sample thickness and XMCD contrast

In this section, the influence of the sample thickness and of the XMCD contrast magnitude on the TR-STXM image will be discussed.

STXM imaging measures the transmission of X-rays across a sample. For this reason, the intensity recorded in a STXM image is directly related to the X-ray transmittance of the sample, which can be determined from the Lambert–Beer law presented in equation (13). Ignoring, for the moment, the contribution of the higher-order light, it is possible to write the transmitted Φ_{T}(*t*) for circularly polarized X-rays at a given position on the sample as follows,

where *T*(*t*) has been defined as the transmittance of the sample, and Φ as the incident photon.

From equation (11), it is then possible to obtain the time-dependent variation of the projection of the magnetization vector *m*_{x}(*t*) along the direction defined by the wavevector of the incoming X-ray beam by calculating the natural logarithm of the transmittance,

Assuming that the magnetization has a sinusoidal time dependence according to equation (10), it is possible to express the time-dependent transmittance as follows,

Therefore, the amplitude of the dynamical signal *A*_{1} can be determined from a sinusoidal fitting of the natural logarithm of the sample transmittance, normalized to the of the sample.

We calculated the amplitude *A*_{1}γ_{XMCD}, shown in Fig. 3(*a*), from the simulated TR-STXM images. These images were simulated considering a of 10 × 10^{6} photons s^{−1} and considering an excitation frequency of 5 × 10^{8} Hz. We calculated the amplitude value of *A*_{1}γ_{XMCD} as the value of the XMCD contrast is typically not calculated for experimental samples. As expected from intuitive considerations, a stronger XMCD contrast γ_{XMCD} will give rise to a larger amplitude of the recorded time-resolved signal.

It is noteworthy that in many cases *m*_{x}(*t*)γ_{XMCD} ≪ 1, due to the combination of a relatively weak effective XMCD contrast (*i.e.* normalized to the entire thickness of the sample, including its non-magnetic parts), and of a relatively small variation of the magnetization [*e.g.* in the case of spin waves, the canting of the spins from the surface plane is usually limited to a maximum of a few degrees (Wintz *et al.*, 2016), leading to *m*_{x}(*t*)γ_{XMCD} ≃ 10^{−3}]. In this case, the transmittance given in equation (12) can be simplified by considering only the first order of its Taylor expansion,

Using equation (13) instead of equation (12), we obtain the amplitudes shown in Fig. 3(*b*). By comparing Figs. 3(*a*) and 3(*b*), it is possible to observe that the two calculations yield comparable results, indicating that the approximation of equation (12) with its first-order Taylor expansion is reasonable. This is an important consideration, as most experimental TR-STXM images are analyzed utilizing the relation given by equation (13), which we will use for the remainder of this manuscript. It is, however, worth noting that for some special applications, such as, for example, time-resolved laminographic imaging (Donnelly *et al.*, 2020), where the quantitative determination of the changes in the orientation of the local magnetic vectors is of extreme importance, the formulation given in equation (12) needs to be employed.

From the results shown in Fig. 3, it can be observed that an increase in the error of the determined amplitude occurs at the extreme ends of the interval investigated here. This will influence the visibility of the dynamics in the time-resolved images, which can be quantified by the signal-to-noise ratio in the measured amplitude. We calculated this value from the simulations shown in Fig. 3(*b*), to find the optimal thickness of the magnetic material (as a function of its XMCD contrast). The results of this calculation are presented in Fig. 4, where it is possible to observe an optimal thickness of about 2 optical densities. It can also be observed that the signal-to-noise ratio has a relatively constant value for sample thicknesses between about 0.5 and 4 optical densities.

Therefore, if the specific physical process to be investigated allows for a selectable range of thicknesses of the material [*e.g.* the investigation of magnetic vortex gyration processes (Finizio *et al.*, 2017)], the choice of a thickness between 0.5 and 4 optical densities would be optimal in terms of signal-to-noise ratio. For processes with more stringent requirements on the thickness [*e.g.* spin–orbit torque switching processes, requiring ultrathin magnetic films (Baumgartner *et al.*, 2017)], the signal-to-noise ratio will not be optimal (according to the values presented in Fig. 4), but the other parameters described in the next sections still provide that can be used to optimize the image acquisition protocol.

#### 4.2. Photon flux

It is reasonable to assume that a higher

will provide higher-quality images thanks to the increased counting statistics. However, higher also brings an increased probability of multi-photon events. Since the APD is unable to recognize multi-photon events, a linear increase in the will not result in an equal increase of the recorded signal quality.To demonstrate the influence of the ). Here, it is of particular interest to vary both the and the of the sample. The other parameters were kept constant to an XMCD contrast of 5%, an excitation frequency of 5 × 10^{8} Hz, and the contribution of the higher-order light is ignored. The results of these simulations, normalized to the amplitude expected from equation (13), are shown for a set of simulated optical densities, in Fig. 5.

From the results shown in Fig. 5, it is then possible to compute the signal-to-noise ratio as a function of the for each of the simulated optical densities, which is shown in Fig. 6(*a*).

In Fig. 6(*a*), it is possible to observe that, for each sample thickness, the maximum of the signal-to-noise ratio occurs at a different with larger photon fluxes required to obtain the optimal imaging conditions for thicker samples. If, however, we now display the signal-to-noise ratio as a function of the after the sample, determined by applying equation (5) to the illuminating the sample, we obtain the result shown in Fig. 6(*b*). Here, the optimal imaging conditions occur, independently from the sample thickness, at a of about 5 × 10^{8} photons s^{−1}. Higher photon fluxes result in a sharp drop of the signal-to-noise ratio.

The reason for why the optimal imaging conditions occur at a ^{8} photons s^{−1} is in the behavior of the APD detector. Due to the fact that the APD is only able to distinguish between 0 and ≥1 photons in a given bunch, the response of the APD depending on the incident will exhibit a non-linear behavior at high photon fluxes. In particular, the response of the APD on the incident is displayed in Fig. 7.

From the behavior of the APD shown in Fig. 7, three different regimes can be identified, depending on the at the APD:

(i) Linear regime, Φ_{APD} < 2.5 × 10^{7} photons s^{−1} (ν_{APD} < 0.05).

(ii) Semi-linear regime, 2.5 × 10^{7} < Φ_{APD} < 5 × 10^{8} photons s^{−1} (0.05 < ν_{APD} < 1).

(iii) Non-linear regime, Φ_{APD} > 5 × 10^{8} photons s^{−1} (ν_{APD} > 1).

Here, ν_{APD} identifies the average number of photons per bunch that reach the APD, calculated as ν_{APD} = νexp(−OD), ν being the average number of photons per bunch that illuminate the sample.

Within the low photon fluxes, the (*a*)] remains constant, and its error, shown in Fig. 8(*b*), follows the dependence dictated by the Poisson statistics of the stochastic photon generation [linear slope in the log–log graph shown in Fig. 8(*b*)].

For higher photon fluxes, where the probability of multiphoton events within the same bunch becomes non-negligible, the detected

starts to deviate from the purely proportional response observed for low photon fluxes. Here, a drop in the measured amplitude of the time-resolved signal can be observed, while the error on the amplitude still follows the expected behavior dictated by Poisson statistics.Finally, for the very high photon fluxes, where the detected ^{8} counts s^{−1} (*i.e.* corresponding to ν_{APD} ≃ 1) with a non-linear response with respect to the incident a more substantial reduction of the measured amplitude of the time-resolved signal can be observed. In this case, it is also possible to observe [see Fig. 8(*b*)] that the error of the measured amplitude of the time-resolved signal does no longer follow the behavior expected from a Poisson statistics-dominated process.

The two contributions to the signal-to-noise ratio that depend on the . This optimal (after the sample) is about 5 × 10^{8} photons s^{−1}, and the slit settings of the beamline should be selected in order to obtain a count rate as similar as possible to this optimal value. However, it is worth noting that the absolutely optimal will therefore be given by a compromise between the signal-to-noise ratio presented in Fig. 6 and other beam-dependent parameters on a case-by-case basis depending on the specific goals of the measurement and on the sample under investigation.

#### 4.3. Higher-order light

In the previous sections, it was assumed that the X-ray , a fraction of the comprises higher-order light. Since the energy of these photons is not at the elemental of the magnetic material, their transmission across the sample will be independent of the local magnetization configuration of the sample, providing an additional background to the recorded images.

that illuminates the sample comprises exclusively monochromatic photons at the specified energy. However, as mentioned in Section 2We performed simulations of the TR-STXM images with this additional contribution from the higher-order light. The simulations were performed for a sample thickness of 1.2 optical densities, with an XMCD contrast of 5%, an excitation frequency of 5 × 10^{8} Hz, and considering a of 10^{7} photons s^{−1} for the photons at the nominal energy. These parameters were selected as they describe a typical TR-STXM sample and the frequency range typically used to excite its dynamics. The results of this simulation, normalized to the amplitude measured in the absence of higher-order light, are shown by the red circles in Fig. 9, where it is possible to observe that the increase of the for the higher-order light gives rise to a reduction of the measurable amplitude.

This reduction in the measurable amplitude is due to the fact that the transmittance is calculated according to equation (11), *i.e.* by normalizing the transmitted to the at the sample surface. Using the definition for the higher-order fraction of the given in equation (3), the reduction in the measured amplitude due to the higher-order photons is given by 1/(1 + *H*). This factor is plotted with a black line in Fig. 9. It should, however, be noted that, for photon fluxes in the semi-linear and non-linear regimes defined in the previous section, an increase in the higher-order contribution will lead to a non-linear response in the signal-to-noise ratio. Therefore, considering the behavior of the APD detector shown in Fig. 7 and the results shown in Fig. 8, the at the detector (including the higher-order contribution) should be tuned to about 5 × 10^{8} photons s^{−1} to obtain the best imaging conditions, as the contribution of multiphoton events at higher fluxes will severely impact the attainable signal-to-noise ratio.

#### 4.4. Excitation frequency

In this section, the influence of the frequency of the excitation signal on the amplitude of the excitation measured through TR-STXM imaging will be investigated. Here, we have to consider two contributions, given by the width of the X-ray pulses generated by the synchrotron, and by the jitter of the synchronization between the synchrotron master clock and the excitation signal, both of which add an uncertainty on the arrival time of the photons with respect to the sampling point.

As described in the simulation model section, both of these contributions can be described by a Gaussian probability density function for the photon arrival time. Therefore, the combined effect of the X-ray pulse width and of the electronic jitter can be described by the convolution between the two probability density functions, which, as well a Gaussian probability density function, is given by the following relation,

where σ_{x} and σ_{t}, respectively, identify the standard deviations caused by the width of the X-ray pulse and by the jitter between the excitation signal and the master clock of the synchrotron light source.

At each *t*_{s}, the point of the sinusoidal excitation signal that will be sampled will be given by *t*_{s} + *t*_{P}, where *t*_{P} is determined by the Gaussian probability density function given in equation (14). Assuming an infinite number of sampling points *t*_{s}, which allows us the use of continuous mathematics, the amplitude of the measured signal after its sampling will be given by the convolution between the probability density function given in equation (14) and the signal itself. The result of this convolution is given by a sinusoidal function modulated by a frequency-dependent amplitude term *A*_{1}(*f*), whose analytical formulation is given by the following relation,

From equation (15), it is then possible to conclude that the detected amplitude is modulated by a Gaussian-shaped term, dependent on the X-ray bunch width and on the jitter between the excitation signal and the master clock of the synchrotron light source. Monte Carlo simulations of the TR-STXM images as a function of the frequency of the excitation signal allow us to observe that the analytical formulation of the detected amplitude as a function of the excitation frequency given in equation (15) is correct, as shown in the comparison between simulations and analytical predictions shown in Fig. 10. The simulations shown in Fig. 10 were performed for a sample thickness of 1.2 optical densities, with an XMCD contrast of 5%, a of 10^{7} photons s^{−1}, and ignoring the contribution of higher-order light. Again, we selected these parameters as representative for a typical TR-STXM sample.

From the analytical formulation of the detected amplitude in TR-STXM imaging as a function of the excitation frequency, it is possible to determine the frequency boundary over which the detectable amplitude of time-resolved signals becomes too difficult for a meaningful measurement. Defining this threshold as the frequency at which 90% of the original amplitude of the excitation signal is lost, the critical frequency *f*_{c} can be defined as follows,

For the PolLux beamline, the critical frequency *f*_{c} would be at about 9 × 10^{9} Hz, considering an X-ray bunch width of 70 ps FWHM, and an electronic jitter of 50 ps FWHM. The critical frequency reported in equation (16) is inversely proportional to the width of the X-ray pulses and of the electronic jitter. Improvements in either of those will provide a substantial increase of the measuring frequencies. The reduction of the X-ray pulse width can, for example, be achieved by operating the synchrotron light source using low-α optics, which allows for a reduction of the X-ray pulse width down to less than 10 ps FWHM (Goslawski *et al.*, 2014), and the reduction of the electronic jitter can be achieved by improvements on the phase locked loops used to reference the signal generators to the master clock of the synchrotron light source.

The method described above for the measurement of the transmitted X-ray photons is based on the fast detection of whether the voltage pulses generated by the APD cross a user-defined threshold. This detection is performed every 2 ns, synchronized with the master clock of the synchrotron light source, with the use of a custom-programmed field-programmable gate array setup (Puzic *et al.*, 2010). Different detection methods, involving an improvement in the processing of the APD voltage pulses, are under development. An example is the measurement of the arrival time of the X-ray photons performed by a constant-fraction discrimination-based detection scheme (Finizio *et al.*, 2020). We have, however, made the choice for this manuscript to concentrate on the simpler TR-STXM detection scheme that is currently available for regular user operation.

### 5. Conclusions

In conclusion, we have presented a model for the physical mechanisms that contribute to the formation of a TR-STXM image, and investigated, with the help of Monte Carlo simulations and analytical calculations, their influence on the quality of the acquired image. In particular, it has been observed that the ideal sample thickness can be found in a range between about 0.5 and 4 optical densities, with an optimal thickness of about 2 optical densities. An optimal ^{8} photons s^{−1} was determined, where care should be taken to minimize the contribution from higher-order light. Finally, the excitation frequency should be below the critical frequency defined by equation (16), and the measured amplitude of the time-resolved signal should be normalized according to the attenuation factor defined by equation (15) if measurements at different frequencies are to be compared.

With this work, we aim at giving the users of time-resolved STXM imaging beamlines a tool for the verification of the feasibility of their proposed investigations, and for the estimation of the most efficient and effective imaging conditions. The tools and models described in this manuscript have been limited to the acquisition of time-resolved images, ignoring aspects such as the influence of energy and spatial resolution on the acquired images. The model can, however, be easily extended to include these additional restrictions, allowing the user to perform an as accurate as possible simulation of their specific processes.

### 6. Supporting information

The following information is available in the supporting information:

(i) TR_STXM_MonteCarlo.m — Matlab script used for the simulation of the TR-STXM images;

(ii) saveMonteCarloImage.m — Matlab function for saving the simulated TR-STXM images;

(iii) Reference_image.avi — micromagnetic simulated image of the vortex gyration dynamics used to determine the TR-STXM images;

(iv) Simulated_image.avi — example of a final TR-STXM image (parameters: Φ = 2.5 × 10^{6} photons s^{−1}; *f* = 5 × 10^{8} Hz; *H* = 0; ≃ 1.4 OD; 5% XMCD).

### Supporting information

TR_STXM_MonteCarlo.m: Matlab script used for the simulation of the TR-STXM images. DOI: https://doi.org//10.1107/S1600577521004240/mo5237sup1.txt

saveMonteCarloImage.m: Matlab function for saving the simulated TR-STXM images. DOI: https://doi.org//10.1107/S1600577521004240/mo5237sup2.txt

Reference_image.avi: Micromagnetic-simulated image of the vortex gyration dynamics used to determine the TR-STXM images. DOI: https://doi.org//10.1107/S1600577521004240/mo5237sup3.avi

Simulated_image.avi: Example of a final TR-STXM image. DOI: https://doi.org//10.1107/S1600577521004240/mo5237sup4.avi

### Acknowledgements

The authors thank Joe Bailey for discussions inspiring this work.

### References

Akamatsu, H., Yuan, Y., Stoica, V. A., Stone, G., Yang, T., Hong, Z., Lei, S., Zhu, Y., Haislmaier, R. C., Freeland, J. W., Chen, L.-Q., Wen, H. & Gopalan, V. (2018). *Phys. Rev. Lett.* **120**, 096101. Web of Science CrossRef PubMed Google Scholar

Albisetti, E., Tacchi, S., Silvani, R., Scaramuzzi, G., Finizio, S., Wintz, S., Rinaldi, C., Cantoni, M., Raabe, J., Carlotti, G., Bertacco, R., Riedo, E. & Petti, D. (2020). *Adv. Mater.* **32**, 1906439. Web of Science CrossRef Google Scholar

Baumgartner, M., Garello, K., Mendil, J., Avci, C. O., Grimaldi, E., Murer, C., Feng, J., Gabureac, M., Stamm, C., Acremann, Y., Finizio, S., Wintz, S., Raabe, J. & Gambardella, P. (2017). *Nature Nanotech*, **12**, 980–986. Web of Science CrossRef CAS Google Scholar

Bisig, A., Stärk, M., Mawass, M.-A., Moutafis, C., Rhensius, J., Heidler, J., Büttner, F., Noske, M., Weigand, M., Eisebitt, S., Tyliszczak, T., Van Waeyenberge, B., Stoll, H., Schütz, G. & Kläui, M. (2013). *Nat. Commun.* **4**, 2328. Web of Science CrossRef PubMed Google Scholar

Bolte, M., Meier, G., Krüger, B., Drews, A., Eiselt, R., Bocklage, L., Bohlens, S., Tyliszczak, T., Vansteenkiste, A., Van Waeyenberge, B., Chou, K. W., Puzic, A. & Stoll, H. (2008). *Phys. Rev. Lett.* **100**, 176601. Web of Science CrossRef PubMed Google Scholar

Büttner, F., Moutafis, C., Schneider, M., Krüger, B., Günther, C. M., Geilhufe, J., Schmising, C., Mohanty, J., Pfau, B., Schaffert, S., Bisig, A., Foerster, M., Schulz, T., Vaz, C., Franken, J. H., Swagten, H. J. M., Kläui, M. & Eisebitt, S. (2015). *Nat. Phys.* **11**, 225–228. Google Scholar

Choe, S.-B., Acremann, Y., Scholl, A., Bauer, A., Doran, A., Stöhr, J. & Padmore, H. A. (2004). *Science*, **304**, 420–422. Web of Science CrossRef PubMed CAS Google Scholar

Clark, J. N., Beitra, L., Xiong, G., Higginbotham, A., Fritz, D. M., Lemke, H. T., Zhu, D., Chollet, M., Williams, G. J., Messerschmidt, M., Abbey, B., Harder, R. J., Korsunsky, A. M., Wark, J. S. & Robinson, I. K. (2013). *Science*, **341**, 56–59. Web of Science CrossRef CAS PubMed Google Scholar

Dieterle, G., Förster, J., Stoll, H., Semisalova, A. S., Finizio, S., Gangwar, A., Weigand, M., Noske, M., Fähnle, M., Bykova, I., Gräfe, J., Bozhko, D. A., Musiienko-Shmarova, H. Y., Tiberkevich, V., Slavin, A. N., Back, C. H., Raabe, J., Schütz, G. & Wintz, S. (2019). *Phys. Rev. Lett.* **122**, 117202. Web of Science CrossRef PubMed Google Scholar

Donnelly, C., Finizio, S., Gliga, S., Holler, M., Hrabec, A., Odstrčil, M., Mayr, S., Scagnoli, V., Heyderman, L. J., Guizar-Sicairos, M. & Raabe, J. (2020). *Nat. Nanotechnol.* **15**, 356–360. Web of Science CrossRef CAS PubMed Google Scholar

Filianina, M., Baldrati, L., Hajiri, T., Litzius, K., Foerster, M., Aballe, L. & Kläui, M. (2019). *Appl. Phys. Lett.* **115**, 062404. Web of Science CrossRef Google Scholar

Finizio, S., Mayr, S. & Raabe, J. (2020). *J. Synchrotron Rad.* **27**, 1320–1325. Web of Science CrossRef CAS IUCr Journals Google Scholar

Finizio, S., Wintz, S., Bracher, D., Kirk, E., Semisalova, A. S., Förster, J., Zeissler, K., Weßels, T., Weigand, M., Lenz, K., Kleibert, A. & Raabe, J. (2018*a*). *Phys. Rev. B*, **98**, 104415. Web of Science CrossRef Google Scholar

Finizio, S., Wintz, S., Kirk, E., Suszka, A. K., Gliga, S., Wohlhüter, P., Zeissler, K. & Raabe, J. (2017). *Phys. Rev. B*, **96**, 054438. Web of Science CrossRef Google Scholar

Finizio, S., Wintz, S., Watts, B. & Raabe, J. (2018*b*). *Microsc. Microanal.* **24**, 452–453. CrossRef Google Scholar

Finizio, S., Wintz, S., Zeissler, K., Sadovnikov, A. V., Mayr, S., Nikitov, S. A., Marrows, C. H. & Raabe, J. (2019*a*). *Nano Lett.* **19**, 375–380. Web of Science CrossRef CAS PubMed Google Scholar

Finizio, S., Zeissler, K., Wintz, S., Mayr, S., Weßels, T., Huxtable, A. J., Burnell, G., Marrows, C. H. & Raabe, J. (2019*b*). *Nano Lett.* **19**, 7246–7255. Web of Science CrossRef CAS PubMed Google Scholar

Flechsig, U., Nolting, F., Fraile Rodríguez, A., Krempaský, J., Quitmann, C., Schmidt, T., Spielmann, S., Zimoch, D., Garrett, R., Gentle, I., Nugent, K. & Wilkins, S. (2010). *AIP Conf. Proc.* **1234**, 319–322. CrossRef Google Scholar

Flechsig, U., Quitmann, C., Raabe, J., Böge, M., Fink, R. & Ade, H. (2007). *AIP Conf. Proc.* **879**, 505–508. CrossRef CAS Google Scholar

Foerster, M., Macià, F., Statuto, N., Finizio, S., Hernández-Mínguez, A., Lendínez, S., Santos, P., Fontcuberta, J., Hernàndez, J. M., Kläui, M. & Aballe, L. (2017). *Nat. Commun.* **8**, 407. Web of Science CrossRef PubMed Google Scholar

Förster, J., Gräfe, J., Bailey, J., Finizio, S., Träger, N., Groß, F., Mayr, S., Stoll, H., Dubs, C., Surzhenko, O., Liebing, N., Woltersdorf, G., Raabe, J., Weigand, M., Schütz, G. & Wintz, S. (2019). *Phys. Rev. B*, **100**, 214416. Google Scholar

Goslawski, P., Ries, M., Ruprecht, M. & Wüstefeld, G. (2014). *Proceedings of the 5th International Particle Accelerator Conference (IPAC2014)*, 15–20 June 2014, Dresden, Germany, pp. 216–218. MOPRO058. Google Scholar

Guslienko, K. Y., Han, X. F., Keavney, D. J., Divan, R. & Bader, S. B. (2006). *Phys. Rev. Lett.* **96**, 067205. Web of Science CrossRef PubMed Google Scholar

Jefimovs, K., Vila-Comamala, J., Pilvi, T., Raabe, J., Ritala, M. & David, C. (2007). *Phys. Rev. Lett.* **99**, 264801. Web of Science CrossRef PubMed Google Scholar

Jung, H., Yu, Y.-S., Lee, K.-S., Im, M.-Y., Fischer, P., Bocklage, L., Vogel, A., Bolte, M., Meier, G. & Kim, S.-K. (2010). *Appl. Phys. Lett.* **97**, 222502. Web of Science CrossRef Google Scholar

Kammerer, M., Weigand, M., Curcic, M., Noske, M., Sproll, M., Vansteenkiste, A., Van Waeyenberge, B., Stoll, H., Woltersdorf, G., Back, C. H. & Schuetz, G. (2011). *Nat. Commun.* **2**, 279. Web of Science CrossRef PubMed Google Scholar

Litzius, K., Lemesh, I., Krüger, B., Bassirian, P., Caretta, L., Richter, K., Büttner, F., Sato, K., Tretiakov, O. A., Förster, J., Reeve, R. M., Weigand, M., Bykova, I., Stoll, H., Schütz, G., Beach, G. S. D. & Kläui, M. (2017). *Nat. Phys.* **13**, 170–175. Web of Science CrossRef CAS Google Scholar

Puzic, A., Korhonen, T., Kalantari, B., Raabe, J., Quitmann, C., Jüllig, P., Bommer, L., Goll, D., Schütz, G., Wintz, S., Strache, T., Körner, M., Marko, D., Bunce, C. & Fassbender, J. (2010). *Synchrotron Radiat. News*, **23**(2), 26–32. CrossRef Google Scholar

Raabe, J., Quitmann, C., Back, C. H., Nolting, F., Johnson, S. & Buehler, C. (2005). *Phys. Rev. Lett.* **94**, 217204. Web of Science CrossRef PubMed Google Scholar

Raabe, J., Tzvetkov, G., Flechsig, U., Böge, M., Jaggi, A., Sarafimov, B., Vernooij, M. G. C., Huthwelker, T., Ade, H., Kilcoyne, D., Tyliszczak, T., Fink, R. H. & Quitmann, C. (2008). *Rev. Sci. Instrum.* **79**, 113704. Web of Science CrossRef PubMed Google Scholar

Rhensius, J., Heyne, L., Backes, D., Krzyk, S., Heyderman, L. J., Joly, L., Nolting, F. & Kläui, M. (2010). *Phys. Rev. Lett.* **104**, 067201. Web of Science CrossRef PubMed Google Scholar

Sawhney, K. J. S., Senf, F., Scheer, M., Schäfers, F., Bahrdt, J., Gaupp, A. & Gudat, W. (1997). *Nucl. Instrum. Methods Phys. Res. A*, **390**, 395–402. CrossRef CAS Web of Science Google Scholar

Schütz, G., Wagner, W., Wilhelm, W., Kienle, P., Zeller, R., Frahm, R. & Materlik, G. (1987). *Phys. Rev. Lett.* **58**, 737–740. CrossRef PubMed Web of Science Google Scholar

Vansteenkiste, A., Leliaert, J., Dvornik, M., Helsen, M., Garcia-Sanchez, F. & Van Waeyenberge, B. (2014). *AIP Adv.* **4**, 107133. Google Scholar

Van Waeyenberge, B., Puzic, A., Stoll, H., Chou, K. W., Tyliszczak, T., Hertel, R., Fähnle, M., Brückl, H., Rott, K., Reiss, G., Neudecker, I., Weiss, D., Back, C. H. & Schütz, G. (2006). *Nature*, **444**, 461–464. Web of Science CrossRef PubMed CAS Google Scholar

Vogel, J., Bonfim, M., Rougemaille, N., Boulle, O., Miron, I. M., Auffret, S., Rodmacq, B., Gaudin, G., Cezar, J. C., Sirotti, F. & Pizzini, S. (2012). *Phys. Rev. Lett.* **108**, 247202. Web of Science CrossRef PubMed Google Scholar

Wen, H., Cherukara, M. J. & Holt, M. V. (2019). *Annu. Rev. Mater. Res.* **49**, 389–415. Web of Science CrossRef CAS Google Scholar

Wintz, S., Tiberkevich, V., Weigand, M., Raabe, J., Lindner, J., Erbe, A., Slavin, A. & Fassbender, J. (2016). *Nature Nanotech*, **11**, 948–953. Web of Science CrossRef CAS Google Scholar

Woo, S., Song, K. M., Zhang, X., Ezawa, M., Zhou, Y., Liu, X., Weigand, M., Finizio, S., Raabe, J., Park, M.-C., Lee, K.-Y., Choi, J. W., Min, B.-C., Koo, H. C. & Chang, J. (2018). *Nat. Electron.* **1**, 288–296. Web of Science CrossRef Google Scholar

Zhu, Y., Cai, Z., Chen, P., Zhang, Q., Highland, M. J., Jung, I. W., Walko, D. A., Dufresne, E. M., Jeong, J., Samant, M. G., Parkin, S. S. P., Freeland, J. W., Evans, P. G. & Wen, H. (2016). *Sci. Rep.* **6**, 21999. Web of Science CrossRef PubMed Google Scholar

This article is published by the International Union of Crystallography. Prior permission is not required to reproduce short quotations, tables and figures from this article, provided the original authors and source are cited. For more information, click here.