Metrology of high-order harmonics for free-electron laser seeding

We examine the characteristics of high-order harmonics generated with 800 nm, 25 mJ, 160 fs laser pulses in an Ar gas cell with the objective of seeding a free electron laser. We measure the energy per pulse and per harmonic, the energy jitter, the divergence and the position stability of the harmonic beam. We perform ab initio numerical simulations based on integration of the time-dependent Schrödinger equation and of the wave equation within the slowly varying envelope approximation. The results reproduce the experimental measurements to better than a factor of two. The interaction of a frequency comb of harmonic fields with an electron bunch in an undulator is examined with a simple model consisting of calculating the energy modulation owing to the seed–electron interaction. The model indicates that the undulator acts as a spectral filter selecting a given harmonic.


Introduction
Free electron lasers (FELs) are the upcoming tools for intense, time-resolved experiments in the x-ray wavelength regime. Radiation with wavelength as short as 1.5 Å has been generated at the Linac Coherent Light Source (LCLS) at SLAC (Stanford) and is now available for user operation [1]. For the wavelength range between 4.5 and 47 nm, pulse energies of a few tens of µJ are available at the free-electron laser in Hamburg (FLASH). The pulse duration is about 25 fs and the facility is open for user operation since 2005 [2]. LCLS, FLASH and many upcoming FELs are based on self-amplified stimulated emission (SASE) [3,4]. The drawback of this process is that the SASE process starts from noise, resulting in a noisy time structure with random spikes and limited temporal coherence [5]. Novel schemes have been introduced to overcome these limitations by seeding the FEL with an external light field: for example, high-gain harmonic generation (HGHG) [6][7][8], echo-enabled harmonic generation (EEHG) [9] and coherent harmonic generation (CHG) [10]. These schemes use either seeding by the direct output from a laser or after nonlinear frequency conversion of the seeding laser field in a nonlinear crystal, e.g. frequency tripling [11], or by high-order harmonic generation (HHG) in a dilute gas target [12,13]. A great deal of effort is currently devoted to a seeded FEL at FLASH by using the 21st harmonic of a short-pulse titanium-sapphire (Ti : Sa) laser [14].
Designing seeded FELs using HHG requires a precise knowledge of the performance and stability of HHG sources. Although there are numerous articles on HHG in the literature since its discovery in 1987 [15], only a few mention exact photon numbers [16][17][18][19][20][21], and always in optimized conditions. In addition, the overall stability of the HHG source needs to meet the requirements of an FEL [22] in terms of energy and pointing stability.
Another demand from the FEL community is a numerical code for simulating HHG in different conditions [23][24][25], the output of which could be used in FEL codes such as GENESIS [26], GINGER [27] or PERSEO [28]. A difficulty is that the experimental optimization of the laser parameters and interaction geometry has to be simulated in order to obtain a reliable output of the calculation. Some of the parameters are usually not accessible or measurable, such as the wavefront and divergence of the driving laser field inside the gas cell, or the gas density and distribution.
In the HHG process, odd harmonics, from the third order up to a cut-off that can be far in the soft x-ray range [29], are generated. In the time domain, a sequence of light bursts with attosecond pulse duration, a so-called attosecond pulse train (APT) [30,31], is created. An FEL, on the other hand, is a fairly narrowband device, with a maximum supported bandwidth typically of the order of 1% of the wavelength or lesser. An interesting question is whether FEL seeding depends on the bandwidth and temporal structure of the seed radiation. Seeding can be achieved directly with the emitted HHG radiation, consisting of a train of attosecond pulses. Alternatively, a single harmonic can be selected, e.g. with a multilayer mirror, and used for seeding.
In this paper, we discuss the performances of an 'ordinary' HHG source as it could be integrated into running FEL facilities. We generate harmonic radiation in argon between 30 and 40 nm with up to 25 mJ, 160 fs pulses, centered at 800 nm wavelength. We present a detailed characterization of our source, including the absolute photon flux, the energy jitter and the pointing and divergence stability (section 2). We develop a numerical code (HARP) to simulate the experimental conditions, including the optimization procedure regarding focusing geometry and the position of the focus in the generating cell. The experimental results are found to be within a factor of two of the predictions of this HHG code (section 3). Finally, in section 4, we present a simple model where the energy modulation of an electron in an undulator subjected to a combination of harmonic fields is calculated. The results indicate that an undulator acts as a natural spectral filter and that pre-filtering a single harmonic should not be a requirement for seeding.

Experimental method and results
The experiment was performed at the Lund High-Power Laser Facility, with a 10 Hz Ti : Sa laser system, delivering pulse energies up to 1 J with duration down to 40 fs. For our experiment, we used at most 25 mJ in 160 fs pulse duration. The reason for this mode of operation was to reproduce the conditions of laser systems such as the one being used at Max-lab for the test-FEL facility [32]. In future, Ti : Sa laser systems could be replaced by optical parametric amplifiers [33] seeded by low-noise diode-pumped solid-state lasers [34,35], delivering a similar bandwidth and pulse duration.
The experimental setup is schematically represented in figures 1 and 2. The laser power was adjusted by a half-wave plate and a polarizer in front of the compressor. The incoming infrared (IR) laser beam was focused by a spherical mirror with f = 2 m focal length into a gas cell with 1 mm transverse diameter. The length of the gas cell was previously optimized to be ∼20 mm [20]. With an adjustable aperture after the focusing mirror, the focusing conditions, pulse energy and therefore the IR intensity inside the gas cell could be controlled. The focusing mirror could be moved to control the focus position relative to the center of the gas cell. The generated harmonics propagate together with the driving IR laser field into the detection chamber. A first Al filter (F1) at the entrance of the detection chamber was used to transmit the extreme ultraviolet (XUV) and block the major part of the IR. The XUV pulse is sent either directly into a calibrated XUV charge-coupled device (XUV-CCD) (Andor iKon-L) or via two metallic plane mirrors (M1, M2) into an XUV spectrometer (Jobin-Yvon PGM-PGS 200). The calibrated CCD allowed us to analyze the XUV signal in terms of absolute energy, energy stability, beam shape and pointing stability. Combining this information with the measured spectra, pulse energy calibration of the individual harmonics could be performed. Two additional Al filters (F2 and F3) were used to prevent saturation and damage of the XUV-CCD.
The Al filters were grown in house. F1 and F2 were mounted on translation stages and could be moved in and out of the beam. This setup allowed us to determine the transmission of these filters, which was measured with the XUV-CCD to be comparable, of the order of 25%. The spectral response was determined using the XUV spectrometer. We found the best agreement between our measurements and the transmission calculated for a 170 nm-thick Al filter with 8 nm oxide layers on both sides (see figure 3) [36]. Note that the last data point at 51 eV, obtained for a weak harmonic, with a low signal-to-noise ratio (see figure 8), was not included in the fit. The estimated filter thickness was somewhat thinner than the 200 nm for which the filters have been designed. Assuming constant oxide layer thickness, most of our measurement points were within a window between 140 and 200 nm thickness (gray shaded area in figure 3).
The incidence angle on both mirrors was 11.25 • . The reflectance of the two mirrors was calculated using tabulated refractive index data [36,37]. The spectrometer was able to detect frequencies from harmonic 19 upwards. It was placed at a relatively long distance (2 m) after the generation chamber. In addition to the spectrum, the spatial profile in one dimension and therefore the divergence of the individual harmonics could be measured.   The IR pulse energy was varied between 5.5 and 25 mJ by the rotation of the half-wave plate (see figure 1). This energy was measured after the compressor through a 25 mm-wide reference iris. The integrated HHG signal was optimized by moving the focusing mirror and adjusting the variable aperture. By changing the focus position and the beam divergence in the target, phase matching conditions for the short trajectory could be optimized. After the optimization, 3-8.8 mJ pulse energy was available for HHG. Figure 4 shows the single-shot farfield profile of the XUV radiation, measured with the CCD. The slightly elliptical beam shape was due to the off-axis focusing by a spherical mirror. This could be prevented by using the focusing mirror on-axis or replacing the mirror with a lens or an off-axis parabolic mirror.
The total number of photons per shot, with energy higher than ∼15 eV, was measured by integrating the beam profile and using the calibration curve from the manufacturer. The results are shown by the solid line in figure 5. As expected, the number of photons increases with IR driving pulse energy up to ∼3 × 10 10 photons pulse −1 . The optimized aperture size decreases with increasing driving pulse energy, and consequently a large amount of laser pulse energy is wasted. It should be possible to use the driving pulse energy more efficiently with longer focallength optics and larger apertures [18,38]. This would likely lead to higher generated photon numbers. Due to space limitations, this was not possible in our experiment. The root-mean squared (rms) fluctuations in the photon number (circles) were ∼7% at the minimum driving pulse energy used, decreasing to 2% at 8.8 mJ. This could be due to better phase matching in these conditions, so that HHG becomes less sensitive to laser intensity fluctuations (see figure 10).
The same data set was also used for the spatial analysis presented in figure 6. The 1/e 2 beam radius measured on the XUV-CCD chip decreases in both the horizontal and vertical directions with increasing driving energy. The reason for the relatively small beam size at high IR energy is that the harmonic yield is maximized for a small-diameter aperture, which results in small IR and XUV divergences. Figure 6(b) shows the shot-to-shot variation in divergence. The relative fluctuations are approximately 3% for both directions. Using the XUV spectrometer, we were also able to resolve the relative divergence changes of the individual harmonics. These were found to be typically between 5 and 10% and therefore higher than the averaged value of the overall beam.
The pointing instability was measured to be ∼25 µm on the CCD chip, which represents ∼3% of the averaged beam radius (figure 7). The generation process could lead to pointing instabilities, owing to pressure turbulence or laser variation in the interaction region. In this case, since the distance between the XUV-CCD and the cell is 2 m, this would mean a pointing stability of better than 12.5 µrad. Another (and most probable) source of pointing instability is that of the laser itself, which could be improved by stabilization techniques. The XUV-beam stability requirements for the seeded FLASH (sFLASH) facility were recently studied by Azima et al [22]. They showed that a 35 µm spatial or a 20 µrad angular offset of the HHG beam compared with the electron bunch leads to a 5% decrease of the FEL saturation power. The measured values in our experiment are well below these values.
The combination of the measurements with the XUV-CCD and the spectrometer allowed us to determine the absolute pulse energy per harmonic order. The spectral detection range of the XUV-CCD was limited to harmonic 13 and higher due to the transmission of the aluminum filters, while the spectrometer covered only the frequency range from harmonic 19 and higher. Therefore, we had to estimate the spectral amplitude of the lower-order harmonics.  are in the plateau of the harmonic spectrum [29,39], where the harmonic  amplitude varies slowly. Based on this argument we assumed that the invisible harmonics were equally strong, with an amplitude corresponding to the mean amplitude of the four lowestorder detected harmonics. The pulse energies of individual harmonics were deducted from consecutive measurements of the total number of photons per shot using the XUV-CCD and of the harmonic spectra. For the stability analysis, we recorded a series of 128 single-shot spectra for each driving laser pulse energy. The performances of our XUV source and its laser energy scaling are summarized in figure 8 and in table 1. In addition to the spectra, which correspond to an average of 128 single-shot measurements, the total energy per harmonic (circles) are also shown. The individual spectra are broad compared with what could be expected from the laser pulse duration (160 fs). This is because the IR laser pulse was not transform limited. The measured spectral bandwidths correspond to those that could be expected for HHG from a 40 fs laser pulse. At low driving laser power, harmonic 27 shows the highest energy. By increasing the IR energy, the aperture needs to be decreased for optimum harmonic generation. In these conditions, mainly the lowerorder harmonics gain energy. At the highest IR energy, harmonic 21 is the strongest, with an average photon count of 6.5 × 10 9 , corresponding to a harmonic energy of 34 nJ. The maximum achieved single-shot value for harmonic 21 was 40 nJ. The neighboring harmonics are slightly weaker but the average harmonic energy is still in the range between 20 and 25 nJ.
The pulse energy fluctuations of the individual harmonics are between 5 and 10% and thus higher than the total energy fluctuations. The difference between the total and individual harmonic energy fluctuations can be attributed to a difference in sensitivity of the harmonics to laser energy. The optimized, phase-matched harmonics are relatively insensitive to laser energy fluctuations, while the weak ones exhibit a stronger dependence on laser energy fluctuations.
To seed a SASE-FEL successfully, the seed must out-compete the shot noise in the start-up of the FEL process. The shot-noise power P 0 can be estimated from [40]  where ρ is the Pierce parameter [3] describing the gain per undulator period, E b the electron beam energy and ω 0 the seed frequency. Assuming that ρ = 2.2 × 10 −3 , E b = 900 MeV [40], we calculate a shot-noise power level P 0 ≈ 20 W. For high-harmonic pulses with 160 fs duration and 30 nJ energy, the corresponding seed power is P s ≈ 200 kW. This is four orders of magnitude higher than the shot-noise limit. Even including some transport optics to get the beam into the FEL, enough seed power should remain for successful HHG seeding. In general, it is of interest to maximize the energy in the harmonic beam. This facilitates the transport of the beam, which is necessary when the HHG setup cannot be installed close to the FEL. In addition, the energy modulation of the electrons scales with the strength of the modulation field. A high seed energy therefore reduces the undulator length required for the amplification. Since P 0 is proportional to ω 0 and E b , more seed power is required at shorter wavelengths. Soft x-ray harmonics have been generated [43], but seeding in this wavelength region is still challenging.
In the present setup, the HHG stability is mainly limited by the overall stability of the employed Ti : Sa laser system. There is neither pointing nor pulse energy stabilization. The implementation of such stabilization systems would improve the stability of the harmonic output. Other options would be to replace the Ti : Sa laser by a diode-pumped solid-state laser system, well known for its high stability and reliability in operation.

Simulation
A numerical code (HARP, high-order HARmonic generation and Propagation within the slowly varying envelope approximation) has been developed for calculating the harmonic fields generated in the medium. The code is based on the integration of the propagation equations for the harmonic and IR laser fields in a gas within the paraxial and adiabatic approximations. We thus assume that the main features of the generation process are determined by the instantaneous intensity of the laser [23]. The propagation equation for each harmonic component can be written as where z denotes the directions of propagation, ω the IR laser frequency, E q ( r , t) is the complex slowly varying envelope of the harmonic field, k q the corresponding wave vector and P NL q ( r , t) the laser-induced nonlinear polarization equal to 2N a ( r , t)D q (I ( r , t))e iqφ( r ,t) . Here N a ( r , t) denotes the atomic density, I ( r , t) and φ( r , t) are the intensity and phase of the fundamental laser field envelope and D q (I ) is the component of the single-atom dipole moment oscillating at frequency qω. D q (I ) is calculated by integrating the time-dependent Schrödinger equation in Ar within the framework of the single-active-electron approximation [41]. The generating medium is inhomogeneous, since it is ionized by the laser field and absorbing. We also take into account defocusing of the IR laser due to the presence of free electrons in the medium. The efficiency of this code allows us to run a number of simulations for testing the influence of different laser or geometry parameters. Similarly to the experiment, we optimized the 25th harmonic yield with respect to the position of the focus in the generating cell, the laser intensity, the cell length and the gas pressure. We found that the optimum pressure is inversely proportional to the gas cell length so that the total number of neutral atoms on axis contributing to the generation of harmonics is approximately constant. This optimum pressure is between 40 and 90 mbar for the shortest cell (2 mm) and around 4-9 mbar for the longest one (20 mm). In figure 9, we present the isocontour plot of the H 25 yield as a function of the laser intensity and the position of the focus. When the IR laser peak intensity varies between 5 × 10 13 and 3.5 × 10 14 W cm −2 , the harmonic yield increases and the maximum is reached for a position of the focus close to the center of the cell. Although a slight gain may be observed at an even higher intensity, we restrict ourselves to this intensity range. Above 3.5 × 10 14 W cm −2 , ionization starts to modify, in a nontrivial way, the IR laser propagation, leading to temporal and spatial reshaping [42] and making the slowly varying envelope approximation questionable.
The beam focusing geometry is an important parameter for the optimization. In the experiment, it is varied by adjusting the spatial aperture after the focusing mirror. In the simulations, we use Gaussian beams, but let the confocal parameter be a variable parameter. We present in figure 10 the iso-contour plot of the total energy in the harmonic spectrum (from H 19 to H 33 ) as a function of laser energy varying from 1 to 9.5 mJ and confocal parameter. At a given laser energy, there is an optimal confocal parameter that leads to maximum harmonic yield. The higher the laser energy, the larger the optimal confocal parameter and the higher the harmonic yield. A minimum peak intensity of 10 14 W cm −2 is required in order to obtain a substantial harmonic yield, and for all input energies, the optimal geometry is obtained for a peak intensity of 2 × 10 14 W cm −2 (see dashed lines). This conclusion can be understood by examining the condition to achieve phase matching [25], ].
The term on the left, arising from dispersion in the neutral and partly ionized medium, depends linearly on the atomic density (pressure), whereas that on the right, including the effect of the single-atom response and of focusing, is independent of atomic density. At a given pressure, the equation above is fulfilled at a certain intensity. Therefore, a higher intensity does not improve the harmonic yield. The gas density must be changed to find another phase matching condition, corresponding to another intensity. In practice, for a higher laser intensity the gas pressure needs to be increased. Using a laser energy of ∼7.5 mJ, the optimum conditions ( figure 10) are obtained for a confocal parameter equal to 16 cm. We calculate the harmonic energies in these conditions and in figure 11 we compare them to the experimental values. The theoretical results predict the correct energies ∼20 nJ (within 25%) for harmonic orders between 23 and 29 (photon energies between 35 and 45 eV). The cut-off region at higher photon energy (above 40 eV) is relatively well reproduced, suggesting that the average laser intensity in the calculation is close to the experimental one. The simulated low-order harmonics are not as strong as the experimental ones, which could possibly be due to the asymmetric laser profile used in the experiments, leading to two maxima (at 33 and 40 eV) instead of one (at 40 eV) in the simulations. In these conditions, the IR laser is defocused due to partial ionization of the medium as shown in the inset. At the exit of the cell, the spatial distribution of the IR laser is close to a super-Gaussian. We present in figure 12 the spatial and temporal distributions of the 25th harmonic obtained in the conditions of figure 11. On the right, the integrated spatial (near field) and phase exhibit regular behavior with an almost flat wavefront. In the center of the figure, the spatio-temporal distribution shows the history of the high-harmonic generation process. The harmonic is first generated on axis and progressively at larger radius when the IR laser reaches its maximum intensity. Once half of the IR pulse has passed through the medium, atoms are ionized and the efficiency of the generation process decreases. The most intense part of the harmonic field is generated on the leading edge of the IR pulse (∼−50 fs) as is shown on the top. The spatiotemporal distribution shows that phase matching is achieved predominantly at a given intensity during the pulse, leading to an intense arrow-like pattern.
To summarize, there is quite good agreement between our experimental results and our (ab initio) calculations. The selection of the parameters in the simulations has been done by mimicking the experimental conditions (for the known parameters) and the experimental procedure for optimization (for the unknown parameters). This gives us confidence in the possibility of using the HARP predictions as input for FEL simulation programs.

High-harmonic seeding of free-electron lasers
During the electron-light interaction in a seeded FEL, the energy of the electron beam is modulated. The energy modulation can be converted to a density modulation by letting the electron beam pass a dispersive section, where the path length depends on the electron energy. The dispersive section can be a magnetic chicane or the undulator system itself. The density modulation, the so-called microbunching, is necessary for the electrons to radiate in phase and emit coherent radiation in further undulator sections. Here, we consider only the first part of the seeding process, the energy modulation, and investigate how it is affected by the temporal and spectral properties of an HHG source. Microbunching is assumed to take place in a dispersive section after the undulator and is not included in the calculations.
For multi-cycle driving laser pulses, the output of an HHG source is an attosecond pulse train (APT) [31] in the time domain and the corresponding spectrum is a comb of harmonics, as shown illustratively in figure 13. In the generation process, one pulse is born every half-cycle of the driving field and the electric field changes sign from half-cycle to half-cycle. This leads to a spectrum containing odd harmonics of the driving laser frequency. The electric field of an APT can be expressed as the sum of harmonics, E q (t), where A q (t) and φ q (t) are the amplitude and phase of harmonic q. We here assume for simplicity transform-limited harmonics (φ q (t) = φ 0 , for all q). In the simple example shown in figure 13, the spectrum contains seven harmonics and is centered at harmonic 15. Unlike in the above-presented experiment, we are considering here a comb of Fourier-transform-limited harmonics. The temporal structure is that of a short pulse train with three 170 as pulses. Our model consists in solving, in one dimension, Newton's equations of motion for electrons traveling through the undulator. We assume that all electrons follow the same sinusoidal path independent of their energy and that they have the same forward velocity v z , thus neglecting its variation due to the sinusoidal movement in the perpendicular plane. Denoting by x the direction perpendicular to the undulator gap, which is also the direction of polarization of the electric field, v x varies as where λ u is the undulator period [44]. The energy change for an electron passing through the undulator and interacting with the light field E is given by where T is the time the electron spends inside the undulator and t 0 is the timing of the electron relative to the electric field at the entrance of the undulator, which determines the amount of energy the electron gains or loses. The wiggling motion gives electrons a lower forward velocity compared to light traveling straight. For every period, the electrons slip a fixed amount depending on the undulator properties and the electron energy. When the electrons emit light, contributions from all the periods in the undulator interfere. Constructive interference occur at the resonance wavelength λ r , which can be calculated through where γ is the electron Lorentz factor and K the so-called undulator parameter [44]. At this wavelength, the electrons slip a full cycle of the generated electric field during one undulator period. Seeding will be efficient on resonance, i.e. when the seed wavelength λ s = λ r . In our model, the resonance condition is fulfilled, with λ r = 53 nm, corresponding to the 15th harmonic of 800 nm radiation. We have chosen this harmonic because it can be experimentally produced with a relatively high intensity. Temporal structure of the energy modulation after one, four and seven undulator periods and corresponding normalized spectra. Figure 14 shows the energy modulation achieved after one, four and seven undulator periods. After one undulator period, the energy modulation is essentially a mapping of the light field onto the electrons and the spectrum obtained by taking the square of the Fourier transform of the energy modulation is essentially that of the seed light. As the seeding light and the electrons pass through the undulator, the electron-light slippage adds one period in the electron energy modulation after each undulator period. In the time domain, the length of the energy modulation is increased by T r = λ r /c after each undulator period and therefore the corresponding spectrum is narrowed. After q/2 periods, where q is the harmonic order, the modulations due to consecutive pulses in the APT begin to overlap in time. In the spectral domain, this leads to the selection of one harmonic. A smearing out of the APT structure has been observed in simulations of seeded FELs [45][46][47]. Our simple model allows us to visualize how the APT structure of the energy modulation evolves, period by period, through the undulator.
The spectral selection of one harmonic indicates that only the energy of the harmonic that is closest to the undulator resonant wavelength matters for the seeding process. The energy in all other harmonics does not significantly contribute to the energy modulation. In figure 15, the modulations caused by a single (resonant) 15th harmonic and the full APT, with the same energy in harmonic 15, are compared after 30 undulator periods. The energy modulations are equally strong for both cases. There is some residual structure from the APT but the spectral width and amplitude of the modulations are almost identical. The undulator filter function can be formulated from simple arguments. The energy modulation in the FEL seeding process is a convolution between the transverse velocity v x (t) and the seeding electric field E(t) (see equation (7)). In the frequency domain, this corresponds to the product of the undulator filter function and the seed spectrum. The action of the undulator is periodic with period T r . The energy modulation can be regarded as a multiple-slit interference effect in the time domain where the number of slits is the number of periods in the undulator. As in multiple-slit interference, the resulting spectrum of the energy modulation is a product of a single-slit pattern (action of the undulator during one period) and a function that depends on the number of slits (periods). The spectrum obtained after modulation in an undulator with n periods can be written as where u(ω) is the spectral filter corresponding to one period of the undulator, s(ω) is the seed spectrum and the multi-slit function |sin(nωT r /2)/sin(ωT r /2)| 2 arises from the repetition of the process in the undulator. In general, the bandwidth of u(ω) is large compared with that of the seed. The bandwidth is instead usually given by the multi-slit function, ω n = ω r /n, ω r = 2π/T r . The multi-slit function is periodic in frequency and the frequency spacing between two interference peaks is ω r . Since this spacing is in general much larger than the width of the seed spectrum and since u(ω) has minima at multiples of ω r , only one frequency will be efficiently selected in the process.
The influence of the seed pulse duration, for a given pulse energy, is shown in figure 16. The total energy transferred to the electrons increases with pulse length towards a value depending on the undulator parameters and the pulse energy. The shape of the curves in figure 16(a) only depends on the number of periods in the undulator. Therefore, a long pulse uses the seed pulse energy most efficiently. A more important aspect is how the amplitude of the energy modulation depends on the pulse duration. Figure 16(b) shows that there is an optimum pulse duration that maximizes the modulation amplitude. When the seed pulse is short, the bandwidth of the seed is significantly larger than the undulator resonance bandwidth and the energy in the spectral wings cannot be used, similarly to the case of several harmonics presented above. This leads initially to an increase in transferred energy (figure 16(a)) and modulation amplitude (figure 16(b)) with increasing pulse duration. As the seed pulse duration and slippage length become approximately equal, most of the seeding energy can be used and the energy transferred to the electrons starts to saturate. For a fixed seeding pulse energy, a longer pulse means a lower electric field amplitude and thus a decrease of the modulation amplitude.
The duration of the electron bunch introduces an additional temporal gate to the modulation signal. The energy transferred to the electrons is reduced when the wings of the energy modulation are lost outside the electron bunch. This effect is illustrated for a 60-period undulator in figure 17, where short 10-30 fs electron bunches are modeled by selecting the central part of the electron modulation. As expected, the selection of the central part of the modulation does not affect its amplitude. The transferred energy, on the other hand, shows a maximum when the energy loss due to the bandwidth of the seeding process and to the finite electron bunch is minimized.
The calculations presented here give insight into how the induced energy modulation is affected by the attosecond structure, pulse duration and bandwidth of the HHG seed. Technical constraints, such as temporal jitter between electrons and seed, matching of seed and electron bunch durations or the requirement of an output pulse duration from the FEL for a certain experiment, can in practice set the desired seed pulse duration. Since the electron-light slippage leads to the selection of one harmonic from the HHG bandwidth, no monochromator for harmonic selection is needed. The HHG seed needs to be designed according to the FEL requirement regarding energy and temporal properties.

Conclusions
In conclusion, we have performed a complete characterization of high-order harmonics generated in a gas of argon atoms. We have shown the excellent quality of the harmonic beam and we have performed a stability analysis in terms of pointing, divergence and energy stability. Overall we have generated up to 3.1 × 10 10 XUV photons in the spectral range between 73 and 24 nm. The 21st harmonic was the strongest with 34 nJ energy and an rms power jitter of 5.7%. Even though the HHG source was not operated at its optimal performance, the quality of the generated XUV output is good enough for an HHG seeded FEL. We have performed a simulation of these experimental results using the HARP code, reproducing in particular the experimental optimization procedure with respect to position of the focus, pressure and focusing geometry. We found excellent agreement between the simulated and experimental data, which gives us confidence in using the code for HHG designs. Finally, we have examined using a simple model the energy modulation when seeding an electron bunch with a frequency comb of high-order harmonics. The model indicates that the undulator acts as a spectral filter for the highorder harmonics. This makes the filtering of low-order harmonics prior to seeding unnecessary, which might simplify experimental design.