X-Ray Sources at Large-Scale Facilities

High-brilliance X-ray sources are powerful probes to investigate the properties of matter down to the sub-angstrom scale and on time scales that can extend below a femtosecond. In this chapter, an introductory overview of the physics behind storage ring-based synchrotrons and linear accelerator-based X-ray free-electron lasers is presented, while the properties of the radiation they produce are explained.

Photon energies and the electromagnetic spectrum. Above the visible regime, spanning only an energy range of 1.77-3.1 eV, the electromagnetic spectrum is divided into UV (up to approximately 140 eV), soft X-rays (up to 2 keV), tender X-rays (to 4 keV), hard X-rays (to 50 keV) and gamma rays (above 50 keV). Important photon energies are highlighted, green (Kedge) and red (L-edge) arrows pointing down imply absorption energies, while those pointing up imply emission lines on the structure-even changes of a few picometres in bond length, or one degree in bond angle, can have fundamental consequences on the material's electronic character [1].
Protein crystals can often only be grown with linear dimensions of a few tens of micrometres, while interfacial regions between different oxide materials which exhibit unexpected properties [2] may only be a few nanometres thick. Any signal from irradiation of such samples using X-rays, be it the degree of absorption, the amount of elastically scattered radiation, fluorescence or the photoelectron yield, is likely to be very weak. This sets a premium on finding a very intense X-ray sourcesynchrotrons and X-ray free-electron lasers (XFELs) have been developed to fulfil this need.
The broad range of applications of X-rays has manifested itself in the last two decades in the heterogeneity of scientific fields served and the broad spectrum of techniques now available at synchrotron facilities, representing perhaps the clearest illustration of multidisciplinary research, covering the natural and medical sciences and many aspects of engineering and technology. Nowadays, there are worldwide more than seventy facilities in operation, or under construction, providing sophisticated investigative tools for well over 110 000 users from virtually every field of the natural and engineering sciences.
These users need to understand the operating principles of synchrotrons and their generation of X-radiation in order to best prepare, firstly, proposals to be submitted to the highly competitive review procedure at synchrotrons, and secondly, the beamtimes themselves. This brief overview of synchrotrons, synchrotron sources, and XFELs draws substantially from chapters on synchrotron and XFEL physics in [3] and as such is intended as an accessible primer to the interested reader from any branch of the natural and engineering sciences.
In the next section, the architecture and operating principles of synchrotrons are described and the standard figure of merit for synchrotron light, called the brilliance, is introduced. The three different types of source (bending magnets, wigglers and undulators) are presented in Sect. 1.3. We finish this section by describing ways to control the polarization of X-rays at synchrotrons. Sections 1.4 and 1.5 outline the most pertinent features of the latest generation of storage rings, so-called diffraction-limited storage rings (DLSRs), and X-ray freeelectron lasers (XFELs), respectively.

Introduction
A synchrotron consists of a ring-shaped evacuated vessel (the storage ring, having a circumference measured typically in a few hundreds of metres, Fig. 1.2) in which high-energy electrons circulate at highly relativistic velocities, and so-called 'beamlines', that extract and use the radiation emitted by the electrons tangentially to their orbital path, at positions defined by components known as bending magnets (BMs) and insertion devices (IDs).
The electron energy E at synchrotrons is typically of the order of a few GeV. The emitted photons, on the other hand, have energies measured anywhere between a few eV (just above the visible) and several hundred keV, in the ultrahard X-ray regime. 1 Note, however, that even the photon energies of the latter are still some four orders of magnitude smaller than the electrons' kinetic energy E in the storage ring.
The electrons are forced into a closed path by bending magnets, which exert a centripetal Lorentz force on them. It is here, and in straight sections in which the insertion devices are installed (see Sect. 1.3), that they emit electromagnetic (EM) radiation.
The electrons lose energy due to their emitting EM radiation. This must be replenished and is achieved via axial acceleration through one or more radio-frequency (RF) cavities installed in the storage ring.

The Lorentz Factor
Before we proceed further, the dimensionless parameter γ is introduced. This socalled 'Lorentz factor' expresses the ratio of the electron energy E to the rest mass energy of the electrons m e c 2 = 511 keV (m e = 9.109 × 10 −31 kg is the electron rest mass and c = 2.9979 × 10 8  and then injected into a booster ring, where they are further accelerated. They are then further injected into the so-called storage ring. There, they are maintained in a closed path using bendingmagnet achromats at arc sections. The beamlines use the radiation emitted from insertion devices (IDs, either wigglers or, more commonly, undulators) placed at the straight sections between the arcs, and from the bending magnets (BM), on the axes of emission. The energy lost by the electrons through the emission of synchrotron light is replenished by particular parts of the cycle of one or more radio frequency (RF) supplies. This forces the electrons within the storage ring to separate into discrete bunches. Each bunch contains of the order of 10 9 electrons and has a full width at half maximum duration of the order of 100 ps. Reproduced from [3] with permission (Copyright 2019, John Wiley and Sons) Consequently, for typical storage ring energies of the order of a few GeV, γ is of the order of a few thousand to a little over 15 000 (for the Advanced Light Source in Berkeley, E = 1.9 GeV and hence γ = 3718, while the highest energy storage ring, SPring8, has a storage ring energy of E = 8 GeV, leading to γ = 15 656). The Lorentz factor crops up in many equations related to synchrotron radiation (SR), including the beam divergence, relativistic electron mass, electron emittance and the radiative power output. From the special theory of relativity, it emerges that where v is the electron's velocity. We re-arrange this to obtain v = c 1 − 1/γ 2 1/2 .
We know γ is of the order of several thousand, hence 1/γ 2 is a very small number, of the order of 10 −8 . We use the approximation In other words, the difference between c and v is very small, of the order of a few m s −1 .
Lastly, the mass of the electron from the perspective of a stationary observer is equal to γ m e . We will return to these findings later.

Dipole Radiation and Synchrotron Radiation
Why do electrons emit EM radiation at all? First, it should be stressed that electrons, or indeed any charged particles, only emit EM radiation when accelerated. 'Accelerated' can include the conventional meaning of an increase in speed but no change in direction; its opposite, that is, a deceleration; or a change in the electrons' direction, such as in centripetal acceleration. The second case corresponds to the socalled 'Bremsstrahlung' (German expression for braking radiation), while the third is associated with SR.
Given this, why then does the action of accelerating electrons cause them to emit light? Consider Fig. 1.3. EM radiation is a form of transverse wave in which the oscillations (of the electric and magnetic fields) are at right angles to the direction of motion. For the sake of simplicity, we consider here only the electric field component of the EM radiation. The electric field lines of the electrostatic field of a stationary and isolated electron emanate out radially from the electron. Any observer looking at the electron, therefore, sees no transverse component of the field, which thus implies she sees no radiation [ Fig. 1.3a].
If, however, the electron is made to execute oscillatory motion, the electric field lines, which are anchored to the electron and emanate out from it at the speed of light, will reflect this motion and thus also oscillate accordingly [ Fig. 1.3b]. In all directions except that exactly along the axis of acceleration, our observer will 'see' a transverse component to the electric field and therefore perceive that light is being emitted. The amplitude of the radiation is proportional to cos χ , where χ is the polar angle between the axis of acceleration and the observer's direction. The intensity distribution, shown in Fig. 1.3b, is proportional to cos 2 χ . This so-called 'dipole radiation' is the reason why mirrors reflect visible light, radio antennae capture or emit radio waves and undulators produce X-radiation.
SR is highly collimated, with natural divergences of the order of 0.1 mrad (mrad; 1 mrad is approximately equal to 0.06 • ). A detailed derivation of the spatial distribution of SR lies beyond the brief of this introductory overview (see, for example, [3]). Suffice it to say, it differs substantially from the dipole distribution shown in Fig. 1.3b; this is due to relativistic Doppler shifting. The angular power distribution Generation of EM radiation through the acceleration of charged particles. a A charged particle at rest or moving at a constant velocity will not emit light, as an observer of the particle will detect no lateral component of the electric field lines. b If, however, the particle is accelerated, an observer positioned anywhere except along the axis of that acceleration (position A) will experience a shift in the position and direction of the electric field lines as the event horizon washes over them at the speed of light (for example, at position B). A simple harmonic driving force will generate radiation from the electrons at the same frequency. Adapted from [3] with permission (Copyright 2019, John Wiley and Sons) per solid angle dP/d for an electron moving with a velocity v is given without derivation as 2 (1.5) where φ and θ are the polar (out of the orbital plane) and azimuthal (in the orbital plane) angles, respectively, κ = e 2 /(16π 2 0 c) = 6.124 × 10 −38 kg m 2 s −1 and a = Bec/(γ m e ) is the acceleration perpendicular to the direction of motion due to the Lorentz force exerted on the relativistic electron by the magnetic field B. Note that in the nonrelativistic limit of v c (β = v/c 1), (1.5) reduces to the simple cos 2 θ dependence of dipole radiation. The progression from dipole to synchrotron radiation for different values of β is shown in Fig. 1.4).
For a given centripetal acceleration a, the maximum power (in the forward direction) scales with the fourth power of the electron-beam energy. At highly relativistic velocities, it emerges that where κ = e 4 /(2π 2 m 2 e 0 c) = 1.5156 × 10 −14 m 2 C 2 kg −1 s −1 ) (or WT −2 ). In the frame of reference of the electron, the distribution remains pure dipole radiation From dipole radiation to synchrotron beams. The progression of the angular power distribution of radiation from an electron travelling at a fraction of the speed of light β = v/c while experiencing a centripetal acceleration a perpendicular to its motion. The case v = 0 corresponds to dipole radiation. As β increases, the radiation distribution is swept in the forward direction  Fig. 1.4) and the opening angle is θ = ±π/2. From the perspective of a stationary observer, however, the angular distribution is modified such that .
Thus, the opening angle changes from ±π/2 in the electrons' frame of reference to ±1/γ in the laboratory frame. The entire beam therefore lies within ±1/γ , and has a full width at half maximum of approximately 1/γ . This 'natural opening angle' (or divergence) of the narrow radiation cone, for typical storage ring energies of 1−8 GeV, is equal to 0.5−0.06 mrad (0.028−0.0034 • ), respectively; SR is highly collimated. Lastly, it can be simply demonstrated from (1.2) and (1.5) that, for a given acceleration a, the ratio of the power in the forward direction (θ = 0) for an electron beam travelling at a non-zero speed perpendicular to a, to that of the maximum of dipole radiation for an electron with zero velocity perpendicular to the acceleration is where the approximation on the right is valid for relativistic velocities. Both the exact and approximate expressions are shown in Fig. 1.5 up to β = 0.9999. Increases in power of the order of 10 16 compared to electrons undergoing stationary dipole oscillations can thus be expected-synchrotrons truly do deliver powerful beams!

Spectral Flux, Emittance, and Brilliance
Flux and brilliance are figures of merit of the quality of a synchrotron facility. The spectral flux is defined as the number of photons per second per unit bandwidth (BW), normally given as 0.1%, and is the appropriate measure for experiments that use the entire, unfocussed X-ray beam. Brilliance essentially states how tightly the spectral flux is collimated and how small the source size is. It is defined as , (1.9) and is therefore equal to the flux per unit source cross-sectional area and unit solid angle. Note that the flux (as against the spectral flux) is simply measured in photons per second. Doubling the transmitted BW from a broadband source thus doubles the flux, but leaves the spectral flux unchanged. From (1.9), it is seen that the brilliance is inversely proportional to both the source size and the beam divergence. The product of the linear source size σ and the beam divergence σ in the same plane is known as , the emittance in that plane, that is The goal of the machine physicist designing a synchrotron magnet lattice is to provide as low an emittance as possible, in other words, a source with an exceedingly small cross section emitting X-rays that are highly collimated. For a given synchrotron storage ring, the emittance in each transverse direction (x, in the orbital plane, or y, perpendicular to the orbital plane) is, according to Liouville's theorem, a constant. The emittance will be different for different facilities, in each case being determined primarily by the degree of sophistication and perfection of the magnet lattice. Importantly, the total emittance in a given plane is a convolution of the contribution from the electron beam and that from the emitted photons. It follows that the total source size σ x,y and divergence σ x,y in the x-and y-planes perpendicular to the direction of propagation of a given storage ring are also convolutions of contributions from the electron and photon beams, that is While the electron contribution can be minimized by sophisticated electron optics (see Sect. 1.4), the photon emittance is an intrinsic property defined by Heisenberg's uncertainty principle, and is equal to λ/4π in both the x-and y-plane. In thirdgeneration storage rings, the electron emittance in the orbital plane e x dominates the total emittance and is thus the limiting factor for the brilliance. In fourth-generation DLSRs, the benchmark for modern storage ring designs, e x has been reduced to values close to or even below (in the case of soft X-rays) the intrinsic photon emittance, which we consider in detail in Sect. 1.4. In other words, the emittance is no longer limited by the electron optics, but by the fundamental optical diffraction limit. This is the meaning of the moniker 'diffraction-limited storage ring' defining the fourthgeneration synchrotron facilities now coming online.
Synchrotrons have brilliances using modern undulators of approximately 10 22 photons s −1 mrad 2 mm −2 0.1% bandwidth −1 . This is some 12 orders of magnitude higher than that of a standard laboratory-based Cu K α source and less than a factor of 100 lower than high-quality visible laser sources. The main reasons for this are the size of the radiation source, of the order of ten micrometres at fourth-generation DLSRs, the high collimation of the beams, being of the order of 10 µrad in the orbital plane and the fact that synchrotrons emit an enormous amount of light. The power emitted by an electron is proportional to the square of the electron's centripetal acceleration a, and the fourth power of the storage ring energy.

The Radio-Frequency Power Supply
Conservation of energy dictates that the kinetic energy of the electrons is dissipated due to emission of radiation at the bending magnets and insertion devices. This energy must be replenished, or otherwise, the electrons would spiral into the inner wall of the storage ring. This is achieved by boosting the electrons' energy at one or more positions along the storage ring as they pass through RF cavities [ Fig. 1.6a]. This requires that the electrons enter the cavity at a certain point of the RF cycle.
Because the electrons can only receive the correct amount of energy at very specific and narrowly defined values in the RF cycle, they are separated into a series of packets, or 'bunches'. The energy loss of the electrons for each cycle around the ring is given by the total power loss of the storage ring divided by the storage ring current and is equal to approximately 0.2-1 MeV, or of the order of 0.05% of the nominal electron energy. Depending on the size of the facility, most storage rings host between two and eight RF cavities. Between them, they must be able to replenish this loss.
Consider Fig. 1.6b. On average, the electrons require a certain energy boost in order to keep them on a stable path, given by an amount eV ref . If an electron loses more than this amount of energy, it will enter the RF cavity somewhat earlier at point A. This might sound counterintuitive-surely if the electron has less energy, it will be slower and enter the cavity later. But because it takes a shorter path in the bends according to the linear dependence of the bending radius and the electron energy it Replenishing the electron energy in a storage ring. a Electrons entering the resonant RF cavity at the correct moment in its voltage cycle are accelerated by a suitable amount by the electric field within the cavity. Note that the field lines point in the opposite direction to the acceleration, as the electric force is F E = qE but an electron has a negative charge −e. b 'Slow' electrons entering the RF cavity at A will be given more of a boost than 'fast' electrons at B. Adapted from [3] with permission (Copyright 2019, John Wiley and Sons) indeed will arrive earlier than a higher energy electron, and will thus experience a larger acceleration than if it were at the reference voltage. Likewise, if the electron is too fast, it will receive less of a boost. Any electrons entering the RF cavity outside this narrow range above and below the reference voltage will not gain the correct energy and will be lost to the system. The electrons therefore quickly bunch into packets associated with each cycle of the RF cavity.
The short bunch lengths allow users to exploit the time structure of SR down to well below the nanosecond time scale for time-resolved experiments. These types of experiment became increasingly important in third-generation synchrotron facilities, in areas as diverse as molecular biology, catalysis, condensed matter physics and domain flipping in nanomagnetism and, for DLSRs, they promise to be complementary to XFEL investigations.

Radiation Equilibrium
What determines the electron emittance? The emittance of a storage ring is determined by the opposing influences of two phenomena: radiation damping (something you want) and quantum excitation (something you don't). At the NSLS II in Brookhaven, the machine performance is optimized by maximizing radiation damping, while in the next generation of DLSRs such as MAX-IV, quantum excitation has been minimized. As we have already stated, radiation damping improves the emittance by reducing the transverse momentum component [see Fig. 1.7a]. When an electron emits a photon, it loses the energy of the photon. This causes it to oscil-p' = p − dp dp p" Radiation equilibrium between quantum excitation and radiation damping. a Radiation damping. An electron traversing a magnet in an insertion device is made to deviate from the central axis by an angle θ, due to the Lorentz force. Emission of a photon with momentum h/λ = k will be in the direction of the electron at that instant in time. Conservation of momentum dictates that the electron's momentum will be reduced to p = p − h/λ. The same electron will regain this momentum loss d p after travelling through the RF cavity; importantly, this will now be parallel to the central axis, thus reducing the angle of the electron's momentum p to the central axis and hence also the electron beam's emittance. b Quantum excitation. An electron loses energy due to the emission of a photon and begins to oscillate around a new reference orbital path with a smaller radius. These oscillations induce a stochastic distribution of transverse momenta, thereby increasing the emittance. Reproduced from [3] with permission (Copyright 2019, John Wiley and Sons) late around a new reference orbit, thus broadening the beam and thereby increasing the emittance [ Fig. 1.7b]. Moreover, the dispersion of the electron beam increases. Quantum excitation can be reduced by designing the magnet lattice so that the electron energy dispersion is minimized at the main locations of radiation, namely the bending magnets. This is achieved by horizontal focusing at the bends and the use of many small deflection angle bends in multibend achromat lattices (see Sect. 1.4) to limit dispersion growth.

Coherence
We now consider coherence, including both longitudinal and transverse coherence. The latter depends on the source size and divergence of the photon beam, in other words, it depends on the emittance; longitudinal coherence depends on the bandwidth. The coherent fraction of a beam is critically important in lensless imaging techniques and photon correlation spectroscopy, plus also in phase-contrast tomography. Note also that bound up in the figure of merit of brilliance are the above parameters that quantitatively define coherence: the emittance and the relative spectral BW. The coherent fraction of a broadband, spatially extended, source can be selected as follows. Firstly, a pinhole selects a small, spatially constrained fraction of the radiation thereby acting as a secondary, quasi-pointlike, source. This secondary source has an improved transverse (or spatial) coherence, as the emittance, which is the product of the radiation's divergence and source size, is now much smaller. Next, a filter (which is normally a monochromator) selects a narrow BW which is much narrower than the original source. Now, the radiation is spatially and longitudinally (or temporally) coherent. Note that both the emittance and relative spectral BW are included in the definition of brilliance. Reproduced from [3] with permission (Copyright 2019, John Wiley and Sons) know which factors determine a given value. For example, is the brilliance high because there are more photons on the sample, or because the emittance is small? No X-ray source has an infinitely narrow bandwidth. Consequently, the different frequency components within the beam will sooner or later drift out of phase with one another. The time for the phase between two waves differing in frequency by an amount ν but which are initially in phase to differ by π radians (i.e. from fully constructive to fully destructive) is simply 1/2 ν. This is known as the so-called longitudinal coherence time, τ (l) c . During this time, the waves have travelled in vacuum a distance l (l) c = c τ (l) c /2, known as the longitudinal (or temporal) coherence length [see Fig. 1.9a], given by (1.14) The longitudinal coherence after a monochromator is usually determined by the rocking curve of the crystal or grating used in the monochromator, which defines λ/ λ. For a perfect crystal with insignificant mosaicity, λ is limited by the so-called Dar-win width, and λ/ λ can easily exceed 10 4 -the relative bandwidth of a Si(111) single crystal is determined by the extinction depth and is approximately 1.4 × 10 −4 . The longitudinal coherence length can thus be several micrometres, even in the hard X-ray regime.
The transverse coherence length l (t) c (also called the spatial coherence length) results from the interference of waves having the exact same wavelength but with slightly different directions of propagation. This arises because all sources have a finite size D and a non-zero divergence θ (that is, a non-zero emittance), as shown in Fig. 1.9b. In this case, where D is the linear size of the finite source and R is the distance from the source to the observation point. If we assume the source has a Gaussian profile, determination of D requires integration of interference contributions across the entire source's intensity distribution. It emerges that l (t) c is related to the standard deviation of the beam size σ x,y by (1.16) or, in practical units . (1.17) Note that the transverse coherence length can be made larger by judicious use of slits limiting the apparent source size and divergence, but obviously at the cost of flux. Beamlines such as coherent lensless imaging beamlines tend to be very long in order to maximize R.
In the vertical direction, the source size at an undulator of, say, 2-m length, is of the order of σ y = 2 µm. For 1-Å radiation, this yields a vertical spatial coherence for an observer at 40 m of l (t,y) c = 564 µm. The horizontal spatial coherence has traditionally been two orders of magnitude smaller than this, due to the very much larger extent of the electron beam in the orbital plane. The electron beam source size in DLSR storage rings in the horizontal direction may, however, be as small as σ x = 10 µm; the corresponding coherence length l (t,x) c is of the order of 0.1 mm.

Sources of Synchrotron Radiation
In this section, the three sources of SR are semi-quantitatively described, while the differences between the radiation produced by bending magnets and wigglers on the one hand, and undulators on the other, are presented in a heuristic manner.

Bending Magnets and Wigglers
As mentioned above, the electrons are maintained on a closed path via magnetic, or Lorentz, forces. The Lorentz force, F L , is proportional to the cross-product of the magnetic field strength, B, and the charged particle's velocity, v, that is where e = 1.6022 × 10 −19 C is the elementary charge. It acts perpendicular to the plane defined by B and v. For the sake of simplicity, we only consider those cases where F L , B, and v are mutually orthogonal, and drop the bold face implying their vectorial nature. Now, We equate this with a centripetal force mv 2 /ρ, where m = γ m e is the relativistic mass of the electron travelling at a speed v ≈ c. The bending radius of the centripetal force, ρ, is equal to the bending magnet radius. Therefore, to a high degree of accuracy, In practical units, we obtain For typical storage ring energies of a few GeV and magnetic field strengths of the order of 1 T, we obtain bending magnet radii of the order of 10 m. The relative spread in electron energy E/E in a storage ring is of the order of 10 −3 . The bending radius ρ is directly proportional to the electron energy [see (1.21)]. Therefore, the path of those electrons with more (less) than the central energy will have a larger (smaller) radius, resulting in an unwanted increase in emittance. This problem is resolved by using an arrangement of bending and quadrupole magnets is known as a double-bend achromat (DBA, also called a Chasman-Green lattice, after its inventors [4]), shown in Fig. 1.10.
The natural (i.e. minimum) horizontal electron emittance of a DBA with bending angle 2θ (that is, θ for each dipole pair) is given by [5]. So, for example, the lower limit emittance of a 3 GeV storage ring containing 20 DBAs would be 3.3 nm rad, larger by nearly three orders of magnitude than the photons' diffraction-limited value of λ/4π = 8 pm rad calculated for 1-Å radiation. Efforts to approach the diffraction limit by using multibend achromats (MBAs) are discussed in Sect. 1.4.
The primary purpose of bending magnets is to maintain the electrons in the storage ring on a closed path. Bending magnets have typical magnetic field strengths of the order of 1 T. They produce bending magnet radiation in a flattened cone with a fan angle equal to that swept out by the path of the electrons due to the Lorentz forces they are subjected to. The relatively large subtended angle of bending magnet Photons/s/mrad 2 /0.1% BW 2 GeV, 4 T 4 GeV, 1 T 6 GeV, 1.25 T radiation, measured in degrees, allows one to accommodate more than one so-called 'bending-magnet beamline' at a single bending magnet.
The spectral flux distribution is given by where E c = 3 eBγ 2 /2m e is the so-called critical, or characteristic, energy (which in practical units can be expressed as is the modified Bessel function of the second kind for nonintegral order (in this instance, 2/3), shown in Fig. 1.11. The spectral flux is thus determined by the storage ring energy and the magnetic field strength. Increasing B (but keeping E constant) shifts the maximum of the spectrum to higher photon energies but does not increase the spectral flux's maximum. In contrast, only increasing E both shifts the spectral maximum to higher photon energies and higher values.
The broadband bending magnet spectra for three different combinations of storage ring energy and magnetic field strength are shown in Fig. 1.12. Particularly at low-and medium-energy facilities, the maximum values of both these quantities are too small to extend the spectrum far into the hard X-ray regime. However, if superconducting magnets with larger magnetic field strengths are employed, the photon energy range can be extended to harder X-radiation, as the critical energy is proportional to the magnetic field strength. Moreover, the radiative power increases with the square of the magnetic field strength B. These so-called 'superbends' can have magnetic field strengths as high as 8 T.
There are two types of insertion devices, distinguished from each other by the amount that the electrons are forced to deviate in a slalom-like path from a purely straight path. This at first seemingly subtle distinction has a fundamental effect on the nature of the radiation, however. For angular excursions substantially larger than the synchrotron radiation's natural opening angle γ −1 , the radiation cones from each magnet in the insertion device do not overlap. Under these conditions, the intensities produced from each dipole are added and the ID is referred to as a wiggler, which is briefly described below.
For gentler excursions of the order of γ −1 , the ID is called an undulator, described in Sect. 1.3.2.
The maximum angular deviation φ max of the electron oscillations in an ID is defined by the dimensionless 'magnetic deflection parameter' K , given by (1.25) K can be expressed in terms of the maximum magnetic field B 0 as where λ u or λ w are the periods of the oscillations in the undulator or wiggler, respectively, and k u,w = 2π/λ u,w . For a wiggler, K is typically between 10 and 50, while for undulators, K is close to unity and changes according to the size of the gap between the upper and lower magnet arrays. The horizontal spread in the electron beam divergence is A wiggler can be thought of as being a series of bending magnets within a straight section of the storage ring that turns the electrons alternately to the left and to the right. The maximum angular excursion from the central axis is larger than the natural opening angle of the radiation, γ −1 . For each oscillation, the electrons are twice moving parallel to (and in reality also very close to) this axis. The radiation is therefore enhanced by a factor of 2N , where N is the total number of wiggler periods and is of  Fig. 1.13 Comparison of brilliances at a 3 GeV DLSR running at 400 mA between a U14 undulator with K = 1.6 (blue), a bending magnet with B = 1.41 T (red), a superbend with B = 4 T (yellow), and a wiggler with the same field strength as the bending magnet and 100 periods (green). Note that the peak brilliance of synchrotron sources can be calculated from the average brilliance shown in this figure by multiplying by the ratio of the pulse separation t ∼ 5 ns to the pulse width τ ∼ 50 ps, that is, approximately a factor 100. The peak brilliance of XFELs is of the order of 10 34 ph s −1 mm −2 mrad −2 0.1% BW −1 , some ten orders of magnitude greater than that produced by DLSR undulators. Reproduced from [3] with permission (Copyright 2019, John Wiley and Sons) the order of 20. The spectrum from a wiggler has the same form as that from a bending magnet-it is broadband and thus produces a large amount of integrated radiative power, of the order of several kW. Thermal management of optical components is thus critical. Wigglers are therefore becoming fairly uncommon, particularly in fourth-generation DLSRs.

Undulators
In undulators, the angular deviation of the electrons away from the central axis is of the order of 1/γ ; the radiation cones emitted by the electrons thus overlap as they execute the slalom motion. Consequently, radiation from the dipoles interferes with one another. As such, the field amplitudes are added vectorially (i.e. including the phase difference from each contribution) and the sum of this is squared to produce the intensity, which peaks at those wavelengths where interference is constructive.
Undulators therefore differ fundamentally from bending magnets and wigglers in that their spectral flux reflects this interference phenomenon and is hence concentrated in evenly separated, narrow bands of radiation ( Fig. 1.13). The first practical undulator device to operate in the X-ray regime was constructed by Klaus Halbach and co-workers at the Lawrence-Berkeley National Laboratory and tested at the SSRL synchrotron at Stanford in 1981. This breakthrough was thanks on the one hand to the development of novel magnetic alloys such as SmCo 5 [6], allowing the construction of magnet arrays with the required small periodicities and high magnetic field strengths [7]; and on the other, to a clever arrangement of pole orientations (referred to as the 'Halbach array') which effectively suppresses the field strength on one side of the array and doubles it on the other, thus maximizing the magnetic flux where it is needed.
The four basic parameters for undulator radiation from a device of length L are the relativistic Lorentz factor γ , the undulator spatial period λ u , the number of periods in the magnet array N = L/λ u , and K . As already stated, for an undulator, K is about unity. K can be varied by changing the gap size between the upper and lower arrays of magnets; this tunes the spectrum so that a suitable near-lying spectral maximum sits at the desired photon energy. The transformation from wiggler to undulator radiation is achieved in practice not by reducing the lateral excursions through reduction of the magnetic field strength between the magnetic pole pairs-this would result in an unacceptable drop in flux-but instead by reducing the magnetic pole spatial periodicity λ u [see (1.26)].
It emerges that the condition for constructive interference is given for the mth harmonic by The intrinsic source size and divergence of undulators associated exclusively with photon emission (i.e. ignoring the electron emittance) are given by Note that the divergence σ p can also be expressed in terms of the harmonic number m and number of periods N , and is approximately equal to σ p = 1/(γ √ m N ). The In normal operation, scanning to higher energies within any given harmonic is achieved by opening the undulator gap (the progression of this between the third and fifth harmonics is shown as the dot-dashed blue lines). One moves from a given harmonic to the next higher (red dot-dashed lines) when the desired photon energy can be accessed at the higher harmonic with a gap size no smaller than the minimum allowed value, here 4 mm, shown as the blue horizontal dashed line. Adapted from [8], with permission (Copyright 2013, IUCr) divergence thus becomes smaller with harmonic number and number of periods in the undulator. The interference spectrum at an angle θ away from the central axis of the undulator is shifted towards lower energies, and is given by (1.33) For example, an observer positioned off axis by half the natural opening angle θ = 1/2γ (approximately 3.5 mm at a distance of 40 m for a facility with a 3 GeV storage ring energy) would, for K = 1, see a spectrum shifted by a factor 7/6 to the red. The spectral width of the undulator harmonics is inversely proportional to the number of periods, N . As in any interference or diffraction set-up, the condition for constructive interference becomes increasingly strict the larger the number of involved 'scatterers' (in this instance, the 2N magnet pairs). Hence, the inverse of the relative bandwidth, called variously the monochromaticity or the quality factor λ m / λ m = ν m / ν m , is equal to the number of periods N multiplied by the harmonic number m. As an example, the tenth harmonic of an undulator consisting of N = 70 periods has a relative bandwidth λ m /λ m of 1.4 × 10 −3 .
The undulator spectrum is tuned by varying K . This is achieved by changing the gap between the two sets of magnetic poles and thereby the magnetic field strength B 0 [see (1.26) and Fig. 1.14].
Note that, for reasons of symmetry, even harmonics are in general weaker than odd harmonics. Higher K undulators provide both more intense higher-energy harmonics than lower K devices, while the difference in intensities between even and odd harmonics is less pronounced.

Polarization of Synchrotron Radiation
Polarization of light in spectroscopy is a highly valuable tool, as certain selection rules imply that certain electronic features can be distinguished merely by using differently polarized X-radiation, for example, in the study of surface absorbates on crystalline surfaces, or in distinguishing between differently oriented ferromagnetic or antiferromagnetic domains. Magnetic dichroism using tunable and polarized soft or hard X-rays at synchrotron sources offers the unique feature of chemical specificity. Magnetic features down to below the 100-nm scale can be imaged by exploiting the dependence of the absorption on the polarization of X-rays in ferromagnetic and antiferromagnetic materials. The methods are called X-ray magnetic circular dichroism (XMCD) and X-ray magnetic linear dichroism (XMLD), respectively, for ferromagnetic and antiferromagnetic materials (see Chap. 4). Imaging down to the nanometre range is very important for magnetic structures, as at this scale, the influence of domain boundaries between one magnetic direction and another becomes significant and new phenomena can occur which would be negligible in larger structures. An understanding of the energetics of nanomagnetism is thus essential in the drive to further miniaturize magnetic memory storage devices.
The polarization of undulator radiation can be controlled and varied in so-called APPLE (Advanced Planar Polarized Light Emitter) undulators. APPLE undulators have undergone successive refinements (reflected by their generational names of APPLE-I, II, III and X), based on the flexibility of movements of their magnet arrays; here, we consider only the basic principles.
Instead of the two Halbach magnet arrays found in 'normal' undulators discussed thus far, APPLE undulators consist of four arrays (two above, two below) that can be longitudinally shifted relative to each other [A1-A4, Fig. 1.15a] [9]. Each array consists of a periodic repetition of four different orientations [down (blue ⊗); reverse (green arrow); up (yellow ); and forward (red arrow), see Fig. 1.15b]. With all array components aligned longitudinally, normal linear horizontal (LH) radiation as found in 'normal' undulators is produced. Antisymmetric shifts (that is, one array moving in the positive z-direction, the other in the negative) of A1 and A4 between −λ u /2 and +λ u /2 will maintain linearly polarized radiation but will vary the tilt angle from linear vertical (LV at −λ u /2), through LH (zero shift) back to LV (+λ u /2). Conversely, symmetric movements of A1 and A4 by approximately ±λ u /4 will produce right circularly polarized light (at approximately −λ u /4), or left circularly polarized light (at +λ u /4). In this last instance, the exact shift in the arrays depends on the gap size and details of the magnet strengths. Symmetric shifts smaller than this result in elliptical polarization, that is, radiation with both a linear and circularly polarized component.
Synchrotron sources provide fluxes and brilliances many orders of magnitude greater than those from laboratory-based sources. Third-generation facilities were defined by their use of insertion devices, most importantly undulators. The fourth generation of synchrotrons, just beginning to come online at the time of writing, increase brilliances by two orders of magnitude by reducing the horizontal (orbital The magnet periodicity λ u is composed of four magnet orientations. Viewed from above, these are down (blue ⊗); reverse horizontal (green arrow); up (yellow ); and forward horizontal (red arrow). When all four arrays are aligned longitudinally, linear horizontal polarization is produced. c By shifting arrays A1 and A4 either symmetrically or antisymmetrically by ±λ u /2, linear vertically polarized radiation is produced. d Linear polarization of any desired tilt angle can be selected by moving A1 and A4 antisymmetrically relative to A2 and A3. e and f Circularly polarized radiation is generated by symmetric shifts of A1 and A4 by approximately λ u /4, the exact shift depending on the gap size and details of the magnetic field strengths. Reproduced from [3] with permission (Copyright 2019, John Wiley and Sons) plane) emittance through the implementation of MBAs. We discuss this in more detail now.

Diffraction-Limited Storage Rings
As we have already intimated, the main limit to the emittance in storage rings is due to the electron spread induced at bending magnet achromats as a consequence of quantum excitation (Sect. 1.2.6). In our discussion of DBAs in Sect. 1.3.1, the lower limit to the electron emittance, its so-called 'natural emittance', was given by (1.23). However, if we extend an arc section simply by increasing the number of dipoles from 2 to M in a so-called MBA, and keeping the swept angle per dipole constant, the ratio between the natural emittances of the DBA and MBA is Such an MBA, subtending an arc of angle M/2 times larger than that of the DBA, will have a superior emittance up to a factor of three for large M. So, for example, a 10 • DBA will have a natural emittance 2.25 times that of a 35 • 7BA (M = 7) for a fixed swept angle per dipole. This is clearly not the way to proceed, as an increase from two bends to M will reduce the number of straights around the ring by a factor of M/2. A far more effective way to improve the natural emittance of an MBA can be achieved by reducing the swept angle θ per dipole. This is due to the cubic dependence of the former on the latter [see (1.23)]. So, if in the example above, the 7BA is designed to sweep the same total angle as the DBA, the reduction in emittance will now be (4/9) × (2/7) 3 = 32/3087 ≈ 1/100, thus producing emittances which assume values of the order of 100 pm rad. This is only an order of magnitude larger than the diffraction-limited photon emittance for hard X-rays of approximately 10 pm rad. Indeed, soft X-ray beamlines, for which λ/4π ∼ x,MBA , are already diffraction-limited when using MBAs.
Note also that the natural emittance scales with the square of the storage ring energy E. The two highest-energy third-generation storage rings, namely the APS (7 GeV) and SPring8 (8 GeV) are both planning to decrease E to 6 GeV in their upgrades, despite the associated decrease in the highest accessible photon energies.
In most instances, because an achromat (be it a DBA or MBA) requires about the same length of 'real estate' within the storage ring, the ring's circumference C is approximately inversely proportional to θ -large rings have bend achromats that subtend smaller angles than those at small rings. This is why the large APS facility has 36 sectors, while the smaller ALS in Berkeley only has 12. Thus, for a fixed cell design, a convenient figure of merit describes how well optimized the magnet lattice is [10], as this takes into account the available real estate and electron beam energy and weighs the emittance by this, accordingly. The newest (fourth) generation synchrotron facilities are thus dubbed 'diffractionlimited storage-rings' (DLSRs) [10][11][12][13]. A light source is said to be diffractionlimited if the horizontal electron beam emittance is smaller than that of the radiated photon beam (λ/4π ). In practical terms, the diffraction-limited photon energy E DL with a wavelength equal to 4π x , is given by .
(1.36) By this metric, even a second-generation facility would be a DLSR for a beamline generating infrared radiation; in contrast, most third-generation facilities are diffraction-limited in the very soft X-ray regime at around 25 eV. Note that beamlines that use photon energies that lie near to or below the diffraction limit for the facility where they are installed gain little or nothing from the emittance of the storage ring being further improved (i.e. reduced by more sophisticated electron optics). This is the true meaning of the diffraction limit: the fundamental lower value set by the photon beam rather than the electron beam. DLSRs are thus defined by their use of MBAs. They gain most at largecircumference storage rings, at medium storage ring energies and indeed the two greenfield DLSR facilities to date (MAX-IV and Sirius) plus the first major upgrade from third to fourth generation (ESRF-EBS) reflect these characteristics. This seemingly obvious and long-understood approach to improve the horizontal emittance via the use of MBAs and thereby the brilliance has only recently been pursued because, until now, the costs (both in hardware and real estate) and the introduction of potential mechanical misalignments associated with increasing the number of elements in the magnet lattice, were considered unacceptable. Miniaturization of these magnet lattice components and the development of multifunctional magnets machined from a single yoke block have decreased both costs and the necessary circumference of the ring to accommodate the MBAs and thus achieve these goals. The PETRA-IV project is especially interesting, as the circumference is 2.3 km, allowing exceptionally shallow angles for the arcs, promising diffraction-limited photon energies well into the hard X-ray regime, at approximately 6 keV.
Another serious obstacle to reducing the size and separation of the magnets is that the lateral dimensions (that is, the cross-section) of the storage ring vacuum vessels containing the electron beam need to become so small that pumping them with traditional pumping equipment, in particular, ion-getter pumps, becomes increasingly difficult. In recent years, however, a novel approach to achieve ultrahigh vacuum (UHV) conditions has been developed, namely the use of non-evaporable getter (NEG) coating of the inner walls of the storage ring vacuum vessels [14,15]. NEGs are porous alloys of Al, Ti, Fe, V and Zr sintered onto the inner walls of the vacuum vessel to a thickness of the order of a micrometre, or even as little as 100-200 nm. After installation, the vacuum vessel is pumped to a moderately high vacuum using traditional pumps and then heated out to temperatures below 200 • C. This activates the NEG material, allowing pressures to drop to approximately 10 −10 mbar in the UHV regime. Importantly, even very narrow spaces can be readily coated. Moreover, recent developments in computer numerical control of machining storage ring components allow micrometre accuracy such that geometrically near-perfect miniature vacuum vessels with cross-sections of the order of a square centimetre can be constructed.
With the advent of DLSRs and improvements in magnetic materials, undulator spectra have undergone important transformations. Figure 1.16 compares the brilliance of the same undulator at a third-generation source and at a DLSR having a 40 times smaller total horizontal emittance. In addition to the expected 40 times increase in peak brilliance, the DLSR-spectrum is substantially cleaner: the lobes seen on the low-energy flanks of the spectral peaks for the third-generation source are completely absent in the DLSR spectrum. This is because the horizontal width of the electron beam is much smaller (typically by an order of magnitude). In thirdgeneration facilities, the horizontal electron beam width is, at approximately 100 µm, two orders of magnitude larger than the oscillation amplitude A, which is of the order  Fig. 1.16 Comparison of the brilliance of undulator spectra at third-and fourth-generation facilities. Top: the lateral extent of the electron beam passing through an undulator at third-generation facilities is approximately two orders of magnitude larger than the oscillation amplitude A, while at DLSRs, it might only be approximately 10 A. Bottom: as a consequence, an observer on-axis will 'see' less off-axis radiation, given by (1.33), thereby suppressing the lobes on the low-energy flanks of the main spectral maxima. Note also the enhanced brilliance at the spectral peaks for the DLSR. Both simulated spectra were generated for a U12 undulator (that is, λ u = 12 mm) containing 120 magnet periods, for K = 1.6, 400 mA and a storage ring energy of 2.4 GeV. Courtesy Marco Calvi, Paul Scherrer Institute. Reproduced from [3] with permission (Copyright 2019, John Wiley and Sons) of a micrometre. This means that an observer on axis at the DLSR-undulator will see a much smaller contribution from emission from off-axis electrons, and it is these that produce the low-energy lobes in the spectra, according to (1.33). Many experiments do not require the relative BWs of the order of 10 −4 provided by crystal monochromators and would profit from using the entire flux from any given harmonic. The relative BW of the mth undulator harmonic is 1/m N , where N is the number of undulator periods. For the lower harmonics, this is of the order of 0.005-0.01; for higher harmonics, the relative BW does not drop as steeply as 1/m, as gradually, the off-axis contributions do begin to leak into the peaks, causing them to broaden marginally. Nonetheless, the spectral quality remains sufficiently high to use the entire flux of any given harmonic for small-period undulators at DLSRs. Note, however, spectral filtering is still required to remove the other harmonics. This can be effectively achieved using multilayer monochromators or, in some instances, refractive optics such as compound refractive lenses or prisms [16]. Improvements don't stop here, however. A critical aspect of undulator design is that the magnetic field must be exceedingly homogeneous in the x-direction (that is, in the horizontal plane, perpendicular to the undulator axis) in the region where the electron beam propagates. This has meant that, for third-generation facilities, the magnet yokes need to be a few centimetres wide or more in the x-direction. The approximately five to ten times smaller extent of electron beams passing through undulators installed in DLSRs means that the yokes can be of the order of one centimetre. This allows the design of compact magnetic 'funnels', concentrating magnetic field lines and thus increasing the magnetic field strength, which, in turn, allows for a more compact design and shorter undulator periods. Moreover, this means that more periods (N ) can be fit into a given undulator length L.
The reduction of the horizontal electron emittance in DLSRs thus lends many potential scientific opportunities and will drive exciting innovations along the full technology chain, from the sources (in particular, undulators), through improved Xray optics (regarding minimization of optical imperfections and aberrations), detector technology, to handling of large data volumes. The first DLSR, MAX-IV in Lund, Sweden, came online in Summer 2016, while a second greenfield facility. Sirius in Campinas, Brazil and the ESRF, the first facility to undergo an upgrade from third generation to DLSR status, both began pilot experiments in early 2020. Several orders of magnitude higher peak brilliance are provided by high-gain X-ray free-electron lasers (XFELs). The machine science and technologies for this paradigm shift in X-ray sources are based on fundamentally different principles, and consequently, XFELs are discussed separately in the next section.

X-Ray Free-Electron Lasers
Radiation from fourth-generation DLSRs has some important common features with laser radiation: it is very intense, collimated and, in the case of radiation from undulators, partially monochromatic. An important distinction, however, is that the degree of transverse (spatial) coherence of synchrotron radiation, although much improved at DLSRs compared to that produced by third-generation facilities, is still only of the order of a few percent in the hard X-ray regime. This is because, although radiation from any single electron travelling along an undulator is coherent, there is no spatial (i.e. phase) correlation between different electrons, and hence their combined output remains largely incoherent. In contrast, visible lasers are normally close to being 100% coherent.
Moreover, the shortest pulse duration of X-rays from synchrotrons is a few tens of picoseconds and may be as large as a few hundred picoseconds in the case of DLSRs. Lasers in the visible and near-visible regimes can have pulse lengths as small as 70 attoseconds in some exceptional cases; more representatively, pulse lengths of a few femtoseconds are routinely achieved. The production of femtosecond light pulses has been motivated by studies of the dynamics of chemical reactions-this is one of the most important goals in science, as a biomolecular understanding of the processes of life, plus most industrial chemical processes, depend intimately on understanding transient intermediate states. Indeed, the holy grail of physical chemistry is the direct observation of the making and breaking of chemical bonds and following reactions through the reconfiguration of the atomic structure. In order to achieve this, one needs a probe that can spatially resolve the atomic positions, measured in angstroms, thus necessitating the use of hard X-rays. Moreover, in order to record a movie of chemical processes, each 'frame' must be shorter than the speed of the process divided by the desired resolution, which we have just stated should be of the order of an angstrom. Typical velocities associated with atomic motion are of the order of 1000 m s −1 , hence each movie frame should be separated by no more than approximately 100 fs. For example, phonons and molecular rotations have time scales of approximately 100-1000 fs, while molecular vibrations, crucial to the process of chemical reactions, are shown to have periodicities of the order of 10-100 fs.
X-ray free-electron lasers (XFELs) were developed to fulfil this goal. They provide extremely intense and short pulses of X-rays. XFELs and synchrotron facilities differ substantially in this respect (see Table 1.1). The total average number of photons per second delivered to a third-or fourth-generation synchrotron beamline after monochromatization (typically between 10 13 and 10 14 s −1 ) is comparable to that of an XFEL beamline, although the latter can vary by orders of magnitude, depending on the facility repetition rate and whether the beam is monochromatized or not. In contrast, their time structures are very different: synchrotrons deliver pulses with the same frequency as the RF supply, typically several hundred million pulses per second (1/ t); each pulse is maybe a few tens of picosecond long ( τ ) and contains the order of 10 4 -10 5 photons. XFELs deliver anything between approximately 100 and several hundreds of thousands of pulses per second, depending on the electron gun source and the properties of the accelerating LINAC. Most importantly, each XFEL pulse is only a few tens of femtoseconds long (and can be even shorter, down to a femtosecond) and contains the order of 10 12 photons. The peak arrival rate of photons at XFELs is thus approximately 10 billion times higher than that at synchrotron beamlines.
XFELs thus provide the tools needed to study the dynamics, physical properties and structure of materials with unsurpassed spatial detail and on a time scale over a thousand times shorter than that which is possible at synchrotron facilities.
The beam quality in storage rings is limited by the stochastic competing processes described above in radiation equilibrium. High-gain XFELs are made possible by a runaway process called self-amplified spontaneous emission (SASE). Because, in contrast to synchrotrons, the electrons in XFELs are not stored and require only a few microseconds to traverse the length of the entire XFEL facility, they are far less perturbed than are the equilibrated electrons in a storage ring, meaning they can maintain a very low emittance defined by the electron gun, acceleration and bunch compression mechanism. The linear architecture of XFELs is very different than that of synchrotron facilities; it is summarized in the following.

XFEL Architecture
The fate of electrons in a high-gain XFEL proceeds as follows. In order to generate pulses of electrons, a ps laser is focussed on to the surface of a photoemitter. The resulting ps-duration electron pulse contains a charge of the order of 300 pC (or 2 × 10 9 electrons) and is accelerated in a first LINAC to energies of the order of several hundred MeV (see Fig. 1.17). Shorter laser pulse durations containing the same total number of electrons are excluded due to Coulomb repulsion, which would blow up the beam size and thus spoil the emittance. However, once the electrons become relativistic after acceleration in the first, short, LINAC, the bunch can be compressed without spoiling the emittance. This is achieved in one or more bunch compressors; thereafter, the electrons are further accelerated in a longer LINAC, before entering a very long undulator array. It is while the electrons are travelling along the undulator that the SASE process takes place, resulting in the emission of femtosecond-duration pulses of X-rays.
The initial few-ps-duration electron bunch produced by the low-emittance gun has a transient peak current of about 50 A (300 pC/6 ps). Bunch compression is required in order to reduce the pulse duration to approximately 300 fs and produce the several thousand amperes peak current required to induce SASE ( Fig. 1.18).
The necessary factor of approximately 20-50 increase is realized by adjusting the RF phase in the first accelerator module (LINAC 1 in Fig. 1.17) to allow the electrons to 'surf' down the slope of the sinusoidal RF field-the leading electrons experience a slightly smaller acceleration by the sinusoidal electric field of the RF cavity and are thus accelerated less than those electrons towards the back of the  Fig. 1.17 Schematic of XFEL architecture. Electron bunches are emitted from a low-emittance gun (LEG) irradiated by picosecond laser pulses. They are then accelerated in a short LINAC (LINAC 1), then compressed using one or more bunch compressor magnet chicanes (BC); they are then further accelerated using a much longer LINAC (LINAC 2) before entering a long undulator, typically a few hundred metres in length. The SASE process along the undulator produces extremely intense X-ray pulses with durations of the order of 50 fs. Reproduced from [3] Fig. 1.18 Bunch compression in high-gain XFELs. Before entering the first LINAC, the electron density n e and spread in kinetic energy E are both relatively low. The phase of the LINAC RF-field relative to the passage of the bunch is so adjusted to induce a larger spread of the electrons' kinetic energies, whereby the bunch's trailing edge is made to be more energetic than the leading edge. Compression is achieved by allowing the bunch to pass through a four-dipole chicane, where the faster electrons at the back can catch up with the slower electrons at the front, thanks to the shorter path that they execute. Reproduced from [3] with permission (Copyright 2019, John Wiley and Sons) bunch (a phenomenon referred to as 'chirping'). However, the electrons' velocities are already so close to the speed of light that any differences are far too small to allow the faster electrons at the back of the bunch to catch up with the slower electrons positioned further forward and thereby squeeze the bunch length. Instead, the bunch passes through a magnetic four-dipole chicane. The trailing (high-energy) electrons execute a shorter path through the chicane because they are less deviated by the chicane's magnetic field. This shorter path means that they catch up with the less energetic leading electrons, which are more deviated by the magnet chicane. This compression thus shortens the bunch duration to approximately 300 fs (equating to a bunch length of 100 µm) and increases n e by a factor of approximately 20-50. The increased energy spread of the chirped electron beam after bunch compression must be removed through 'dechirping', which can be achieved in one of several ways [18,19].

The SASE Process
As the electrons begin to propagate down the undulator, they initially emit X-rays independently and stochastically and are bathed in this radiation. They will interact with this EM field. We begin our discussion of SASE by determining the magnitude of these forces in conventional undulators at synchrotrons. Classical electromagnetism tells us that the power transmitted per unit area by an EM plane wave is given by where A is the cross-section of the beam, E 0 is the amplitude of the electric field component and H 0 is the amplitude of the magnetic intensity, which, in vacuum, is related to the magnetic field strength amplitude B 0 by where μ 0 = 4π × 10 −7 m kg C −2 is the permeability of free space (given here in SI units). Also from classical electromagnetic theory, it emerges that From (1.37) to (1.39), we thus obtain an areal power density A typical synchrotron undulator may have a source size of A = 100 × 10 µm 2 , produce light bunches of 50-ps duration, each containing 5 × 10 6 1-Å photons (within the full width of a harmonic). This equates to an areal power density of the order of 1.6 × 10 11 W m −2 . From (1.39) and (1.40), one calculates an electric field amplitude E 0 ≈ 10 7 V m −1 and B 0 ≈ 40 mT. This latter value is nearly two orders of magnitude smaller than that imposed by the undulator's magnet array. We can thus conclude that, in a conventional third-or fourth-generation synchrotron facility, the forces of the electromagnetic field generated by undulator radiation on the electrons' trajectory are negligible.
In the case of XFELs, however, the beam is tailored to have as low an emittance and as high an electron density as possible, through the low-emittance gun and bunch compression, respectively. The motivation for this is exactly to induce forces through the generated radiation that are sufficiently large that they do indeed have an impact on the energy and spatial distribution of the electron bunch. Although at the upstream end of the XFEL undulator, this interaction is still very weak, it is sufficient to seed the runaway process of SASE, which is now briefly described.
The ratio of the Lorentz force and electric field force experienced by an electron bathed in EM radiation is The electrons within XFELs are highly relativistic and hence to a high degree of accuracy, β ≈ 1 and F L ≈ −F E (the fractional imbalance in the forces is equal to F/F E = 1/2γ 2 ∼ 2 × 10 −9 ). Thus, for an electron moving exactly along the axis of the EM radiation (that is, ignoring for the time being the oscillations induced by the magnet array of an undulator), the electric and Lorentz forces are equal and opposite and point perpendicularly to the beam propagation.
If the electrons move in a straight line parallel to the EM plane wave, both the electric and magnetic forces (which anyway cancel each other out) always act at right angles to the electrons' direction of propagation and thus could transfer energy to or from the electrons. What happens if we now allow the electrons to move in directions that are not precisely parallel to the EM radiation, such as in the slalom path induced by an undulator's magnet array? Let us now consider those positions exactly in between the magnet poles, where the electrons have their maximal transverse velocity.
The first observation to make is that, because the magnetic field of the emitted EM radiation always lies perpendicular to the plane of the electrons' trajectory, it cannot transfer energy, but only vary the direction of the electrons' motion. In contrast, the electric field part of the emitted radiation has a component parallel to the electrons' trajectory and can either decelerate them or accelerate them. Consequently, some electrons will be accelerated while others are decelerated. These two opposing interactions cause the electrons to form microbunches within the 'normal' bunch, separated by a distance equal to the wavelength of the light they both generate and are bathed in. Although, for hard X-rays, the 'normal' bunch length of approximately 100 µm equates to approximately 10 6 microbunches, SASE only begins in the coincidentally most intense portion of the bunch. As such, SASE is a stochastic process. The duration of the SASE radiation therefore depends on the degree of bunch compression and the integrated charge of the initial bunch as it enters the undulator array. Low-charge bunches will thus produce XFEL pulses with lower peak brilliance but with durations that can be shorter than 1 fs. More commonly, 'standard' bunch durations are a few tens of femtoseconds. incoherent bunch coherent bunch n e n e Fig. 1.19 Incoherent and coherent radiation from an ensemble (bunch) of electrons. If the relative longitudinal positions of the electrons bear no correlation to the radiation they emit, the relative phases of that radiation are likewise random. From normal statistics, it can be shown that their summed amplitude is equal to the amplitude of the radiation emitted from one electron multiplied by the square root of the number of electrons (n e ) in the bunch. The intensity (proportional to the square of the amplitude) is therefore proportional to n e . In contrast, the radiation induced by SASE is fully coherent, as the emission from all electrons is in phase. The amplitudes of the radiation from each of the n e electrons thus add linearly, resulting in an increase in intensity by n 2 e . Reproduced from [3] with permission (Copyright 2019, John Wiley and Sons) SASE is a runaway effect. The more the electrons bunch together into microbunches, the stronger is the radiation they produce, leading to stronger associated forces on those electrons and still tighter microbunching.
An important property of the microbunches produced by SASE is the following. In the case of normal SR, the emission of radiation from n e electrons within a bunch is stochastic and uncorrelated, and hence the vector addition of the individual amplitudes will follow normal statistics and, on average, be equal to A tot = √ n e A, where A is the amplitude of the contribution to the radiation of any one electron. But the intensity is proportional to the square of the amplitude and is therefore proportional to n e .
In the case of XFEL SASE radiation, the initial bunch is modified so that it becomes a set of microbunches separated from their neighbours by the wavelength of light produced by the undulator interference. It follows that the individual contributions to the radiation amplitude will all be more or less in phase and the electrons will all emit coherently. Thus, the amplitudes add linearly as they all have the same phase and hence A tot = n e A. The intensity will be proportional to n 2 e (see Fig. 1.19). This is the key to the 'runaway' amplification in SASE: the more the electrons bunch and radiate in phase (that is, coherently), the stronger is the EM-field interaction with them. This in turn further enhances the microbunching phenomenon associated with coherent emission, thus increasing the degree of coherent emission in a positive feedback loop.
This runaway instability causes the light intensity to grow exponentially along the undulator until the process saturates [20]. The microbunches produced by the SASE process each contain approximately n e = 10 9 electrons, resulting in a peak brilliance for XFELs approximately one billion times larger than that from fourth-generation synchrotron sources! The quality of a high-gain XFEL is encapsulated in the dimensionless so-called Pierce, or FEL, parameter, ρ FEL , given approximately by where λ u is the undulator period length, r 0 = 2.82 × 10 −15 m is the Thomson scattering length (also known as the classical electron radius), N e is the electron density of the pulse bunch as it enters the undulator, K is the deviation parameter, and γ = E/m e c 2 is the Lorentz factor. Equation ( Electron densities in the compressed electron bunch entering the undulator are typically 10 4 µm −3 (that is, 10 9 electrons in a volume of the order of 10 5 µm 3 ); the undulator period λ u = 15-30 mm, and K -values of approximately 2-3 are normal. The LINACs produce electron energies of the order of 10 GeV. Because of the weak cube-root dependency of ρ FEL on all the design variables except E, its spread is fairly narrow across all facilities designed or commissioned to date, and normally assumes values of around 5 × 10 −4 .
ρ FEL determines three important properties of high-gain XFEL radiation. Firstly, it describes the fraction of the electrons' power converted at SASE saturation to photon power, that is (1.44) The larger is ρ FEL , the more efficiently electron energy is converted into photon energy. ρ FEL also describes the relative spectral BW at saturation, ρ FEL = ω ω , (1.45) which means that at photon energies of the order of 10 keV, the instantaneous BW (that is, the BW of any one FEL pulse) is of the order of 5 eV. This is over an order of magnitude larger than the transmitted BW after monochromatization with a diamond (004) single crystal. In addition, the stochastic nature of the initial spontaneous generation of SASE radiation is responsible for the central position of the SASE spectrum jittering from pulse to pulse by a few tens of eV. This is acceptable for many types of experiment, such as in serial femtosecond crystallography, but can be problematic in others, especially in spectroscopy. The bandwidth can be reduced in several ways including self-seeding, or the use of chicanes in so-called highbrightness SASE. It lies outside the remit of this overview to detail these here [3].
In contrast to the transverse coherence length, the longitudinal coherence length of SASE pulses [which depends inversely on the BW, see (1.14)] is small, of the order of 200 nm in the hard X-ray regime.
Thirdly, the distance L G within an XFEL undulator required to obtain a gain in SASE radiation by a factor e ≈ 2.72 is inversely proportional to ρ FEL and is given by (1.46) Inserting our known values for λ u and ρ FEL , we obtain values for L G of the order of a few metres. Saturation of SASE occurs after a gain of approximately five orders of magnitude. But 10 5 ≈ e 11 , and hence the total undulator length should exceed L G by a factor of 11 or more. The LCLS hard X-ray undulator is over 110 m long. Hard XFEL radiation can therefore directly track atomic motions in condensed matter and vibrations with periods of the order of picoseconds down to tens of femtoseconds, a hitherto inconceivable scientific endeavour. XFELs deliver peak brilliances many orders of magnitude greater than radiation from third-and fourthgeneration synchrotron sources, 100% transverse coherent radiation, and pulse durations typically of a few tens of femtoseconds, but which can also be tailored to be less than one femtosecond [21,22].

Concluding Remarks
The main objective of this section was to summarize the machine physics of XFELs in a manner that is accessible to a wide spectrum of potential users. XFEL technology and science are bound to further develop and morph in the next decades, as, in contrast to synchrotron science and technology, XFELs are still very much in their infancy. Nonetheless, they are maturing rapidly, thanks in no small part to the knowledge base already established for synchrotron facilities. Because the radiation produced by XFELs differs so greatly from SR in the peak brilliance and associated very short pulse durations, experimental methods commonly used at synchrotrons need more often than not to be entirely rethought in order to be carried out at XFELs; indeed, some experimental methods at synchrotrons are wholly excluded at XFELs.
On the other hand, some experimental techniques first developed at XFELs, in particular serial femtosecond crystallography, are now being adopted and adapted for synchrotron light. XFELs should thus not be considered as superior alternatives to synchrotrons, but more as complementary facilities.
Many experimental disciplines, particularly in the fields fs-time resolved studies and nonlinear light-matter interactions, have emerged using XFELs and are still rapidly evolving; this is the reason, in fact, why XFELs were developed in the first place. It will be intriguing to see how these develop and expand in the forthcoming years and decades. The future of photon science indeed looks bright!

Summary
This chapter has introduced the reader to the basic physics of radiation produced by accelerated electrons and the recent advances in machine technologies which have resulted in the development of DLSRs and XFELs. The number of dedicated X-ray sources has burgeoned over the last three decades and has opened the field of synchrotron science, transforming it into a multidisciplinary enterprise, nowadays attracting some hundred thousand scientists across the broadest spectrum of the natural sciences.
Open Access This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made.
The images or other third party material in this chapter are included in the chapter's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.