Modal analysis of a seeded free-electron laser

It has been shown that the direct seeding can enhance the performance of a free-electron laser (FEL) in terms of its spectral, temporal, and coherence properties and reduces ﬂuctuations in FEL output energy and arrival-time jitter. The properties of the used seed photon pulse are of high importance. In this paper, we describe the inﬂuence of the M 2 onto the achievable power contrast between the direct seeded and the unseeded FEL radiation. The results of these studies are compared with the data from the high harmonic generation direct seeding experiment ‘‘sFLASH’’ in Hamburg, Germany. A method to measure M 2 from a single transverse intensity distribution of the high harmonics beam at waist is discussed.


I. INTRODUCTION
In the direct seeding process the quality of the external photon pulse (''seed'') plays an important role since the coupling and energy transfer between the electromagnetic field of the seed pulse and the electrons depends on the wave front of the photon pulse [1]. The wave front itself can in principle be measured, e.g., using a Shack-Hartmann wave front sensor [2]. In practice, in a freeelectron laser (FEL) a direct measurement of the wave front in the beginning of the undulator is very difficult due to space limitations (e.g. [3]). Therefore another figure of merit which describes the quality of the seed beam, e.g. M 2 value [4], has to be used. In this paper, we present a simulations study on the M 2 impact on the output power of an FEL directly seeded using higher harmonics generated in gas (HHG). The simulation results are compared with experimental data from the seeding experiment sFLASH [5]. The M 2 of the sFLASH seed [6] has been estimated using a technique based on the modal decomposition proposed in [7]. A study on the quality of the photon pulse generated by an FEL emitting self-amplified spontaneous emission (SASE) using modal decomposition can be found in [8]. There are several other methods to measure the M 2 value, e.g., the focus scan technique [9] or modal decomposition using computer generated holograms [10]. In contrast to them, the M 2 measurement technique used in his paper only needs a single transverse intensity profile, e.g., a CCD-camera image. Thus, this technique becomes a viable alternative in the cases when due to space limitations other methods cannot be used and/or knowledge on the modal content of the laser radiation is required.

II. NUMERICAL SIMULATION SETUP
The studies presented in this paper have been done using the time-dependent 3D FEL code GENESIS 1.3, v2 [11]. This means that an appropriate model for the FEL start-up from shot noise has been used. The electron beam line considered in the simulations is similar to the FLASH2 beam line of the FEL facility FLASH at DESY, Hamburg, Germany [12,13]. All the relevant beam line parameters are listed in Table I.
The goal of the simulations is to study the FEL output power at the end of the beam line as a function of the M 2 value of the seed pulse. Furthermore, we have assumed that the seed waist is located at the entrance of the first undulator module. In all cases the waist size w 0 is kept constant and equal to 55 m. As shown in Fig. 1 this value corresponds to the optimum beam size for a seed pulse consisting of the fundamental TEM 00 mode only. The seeds with different M 2 values have been prepared as field distribution files for GENESIS all with the same total seed power of 2.5 kW. These field distributions have been generated by superposition of different Hermite-Gaussian modes. The amplitude and phase of each individual mode has been adjusted using a direct-search numerical algorithm [14] so that the following boundary conditions have been fulfilled: (i) The waist size has to be 55 m, as discussed above. (ii) M 2 is equal to the desired M 2 value for both planes. (iii) In order to keep the axial symmetry of the multimode seed field, only TEM mn modes with even n, m can be considered. Obviously, there are many sets of Hermite-Gaussian modes that fulfill the aforementioned boundary conditions. Out of them, we pick the one consisting of the smallest possible number of higher order modes. Technically, this is implemented in the numerical algorithm, which starts with the fundamental mode and higher order modes are being added in steps of one to the field only if a solution with the desired M 2 could not be found.

III. FEL OUTPUT POWER VS SEED PULSE M 2 VALUE
The simulation results have been summarized in Fig. 2 with the power contrast P pk ÀhP SASE i hP SASE i as the figure of merit. P pk stands for the peak output power for the seeded FEL, hP SASE i for the SASE power time averaged over the FEL photon pulse. Apparently the contrast has a maximum at M 2 ¼ 1 and drops rapidly to 0 at an M 2 of about 5, where the power of the fundamental mode is almost zero. In order to give a proper interpretation of these results, all the higher order modes in the seed field distributions have been taken out except the fundamental TEM 00 mode. Then the simulations have been repeated and the results are plotted in Fig. 2. The comparison between the seeding with the full modal content and the TEM 00 only shows that mainly the fundamental mode contributes to the seeded FEL output power. One can see that the power contrast comes almost completely from the embedded fundamental mode, while higher order modes do not contribute to the power contrast. This conclusion is supported by the simulation results using the same seed field distribution but without the fundamental mode. The results, also shown in Fig. 2 show that FEL seeded with such fields have almost zero output contrast compared to SASE. Furthermore, the drop in the FEL power contrast can be understood in a way that with increasing M 2 , given the waist size is fixed, the TEM 00 mode transverse size is decreasing. This means that the fundamental mode does not couple effectively to the electron beam which explains the decreasing contrast. In addition, for larger M 2 the seed pulse energy is distributed among more higher order modes, which means less power in the fundamental mode. This effect further contributes to the decrease of the power contrast. Since in the exponential growth regime the FEL works as a linear amplifier, the plot above should be independent on position along the undulator as long as the FEL operates in this mode. One has to note that we consider power contrast, while in practice one usually measures energy contrast. Therefore in the exponential growth regime the expected energy contrast can be estimated from Fig. 2 by scaling the power contrast with the ratio between the seed pulse length and the SASE photon pulse length. In addition, the influence of the M 2 of the seed on the M 2 of the FEL has been studied, leading to the following result: For our simulation setup and for any simulated M 2 of the seed pulse, and also for the SASE case, the resulting M 2 at the end of the FEL is 1.38 and independent from the initial M 2 .

IV. MODAL RECONSTRUCTION OF INTENSITY PROFILES
As already mentioned, due to limited space in the electron beam line it is challenging to install a wave front sensor in the vicinity of the undulator. For that reason the M 2 value  is often the only measure for the quality of the seed pulse. M 2 is usually measured using the focus scan technique [9]. An alternative method is to use a mode decomposition of the transverse seed pulse intensity profile as suggested in [7]. The advantage of this technique is that one can measure M 2 from a single intensity profile, provided that the observation screen is at the waist of the seed beam. In the onedimensional case, the field amplitude can be considered as a superposition of Hermite-Gaussian functions [7]: This approach can be extended into two dimensions as it has been derived in [8]. The two-dimensional intensity distribution in the waist is then given by Here one makes use of the fact that the generalized Guoy phase [Eq. (5c) in [8] ] is zero at the waist. Assuming that the modes are independent from each other then the timeaveraged intensities can be added which means that the elements A nm A n 0 m 0 ¼ c nm nn 0 mm 0 , where mn stands for the Kronecker symbol. Then for the time-averaged intensity Eq. (2) reduces to " Iðx; yÞ ¼ X 1 n;m¼0 ½c nm G 2 n ðxÞG 2 m ðyÞ; where c nm are the weights representing the intensity content of the individual modes. These coefficients can be calculated as shown in [7] using the Fourier transformĨðp x ; p y Þ of the intensity distribution where p x , p y are the spacefrequency variables: Â É n ð 2 w 2 0 p 2 y Þp x p y dp x dp y ; where É n ðtÞ ¼ L n ðtÞ expðÀ t 2 Þ with L n the nth order Laguerre polynomial. The constant C 0 is a normalization factor which is used to adjust the total power of the reconstructed field to the measured one. Although the method provides unique solutions for the power content coefficients, in practice one has to set an upper limit for the expected highest mode number. This means that the summation in Eq. (3) does not go to infinity but is limited to upper summation bounds n max , m max . In the following analysis of experimental data, we set n max ¼ 8 since the reconstructed intensity profiles yield more than 95% of the original intensity. The upper bounds depend on the considered profile and has to be adjusted for each particular case. It is worth noting that the precise calculation of M 2 requires a high number of modes as noted in [8]. However, the higher order modes tend to have very small intensities, close to the noise level of the detector, and therefore it is difficult to obtain a precise estimate for their power intensity coefficients from experimental data. From this point of view, the choice of n max , m max is a compromise between the need to correctly measure M 2 and the desire to keep the measurement error small. These issues have been covered in the discussion on the measurement errors in the section below. In our analysis the waist size w 0 of the fundamental mode is a free parameter which can be fitted using a maximum likelihood approach using the following numerical algorithm: One starts with some initial guess for w 0 and one computes the mode content coefficients c nm , where n; m ¼ 0; . . . ; n max . Based on these coefficients, one calculates the intensity distributionÎ using Eq. (3). Further the algorithm adjusts w 0 until the difference ð " I ÀÎÞ 2 reaches a minimum.

V. COMPARISON TO EXPERIMENTAL RESULTS
We have used the procedure described above to analyze the 38 nm HHG seed pulse at the sFLASH direct seeding experiment [5,6]. The transverse intensity distribution at the waist is shown in Fig. 3. Apparently the measured intensity distribution is tilted and asymmetric. There are three sources for this [15]. The first is the injection beam line which transports the seed pulse from the harmonics source to the undulators. This beam line rotates the beam by about 11 , thus introducing coupling between x and y. The second is an astigmatism which comes directly from the source as it has been experimentally studied in [6]. Third, the near-infrared laser beam used for the production of the harmonics is also astigmatic. All of these lead to odd modes contributing to the intensity distribution. Since in our analysis a two-dimensional Fourier transform of the intensity distribution has been done, the decomposition algorithm is not restricted to even modes and can also be used to determine the modal content of arbitrary intensity profiles.
The modes decomposition yields the power content coefficients as shown in Fig. 4. With these power coefficients one can calculate M 2 of the field. There are at least two possibilities to do this. The first option is to use the formula derived in [8] which directly relates the beam quality factor to the power content coefficients: Applying Eq. (5) yields M 2 x ¼ 2:45 and M 2 y ¼ 2:39. This result is in a very good agreement with the result obtained with the second possible option which is to numerically propagate the field over a certain distance and thus obtain the dependence of the beam size versus longitudinal position wðzÞ and then analyze this data in the same way as a focus scan technique by exploiting the formula M 2 ¼ w 0 z ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi ffi w 2 ðzÞ À w 2 0 q . One can estimate the M 2 of the HHG seed beam to be M 2 x ¼ 2:2 AE 0:6 and M 2 y ¼ 2:0 AE 0:6. The error of 28% consists of two contributions: The error estimation for the first contribution has been done using a Monte Carlo simulation considering uncertainties in the determination of the wavelength and beam size due to finite camera pixel size, yielding an error of about 20%. This Monte Carlo simulation works as follows: First, a field consisting of a random set of modes is generated and the corresponding intensity profile calculated. This continuous profile is then converted to a grid with a size corresponding to the size of the camera pixel, typically in the order of few m. Then noise is added and finally a modal reconstruction takes place. An uncertainty of 10% in the wavelength has been assumed. After the reconstruction, the M 2 value is calculated. Obviously, due to the introduced noise, finite grid size, and wavelength uncertainty, the calculated M 2 differs from the true one. The above described procedure has been repeated 10 5 times and the resulting values are plotted in Fig. 5. The graph in this figure shows the probability for a given measurement result to occur. Another error to the measurement is introduced if the measurement has not been done directly at the waist position. This error source has been also studied by scanning the z position. It turns out that within one Rayleigh length this leads to an error of 20% or less. This error adds quadratically to the errors due to noise, finite grid size, and wavelength uncertainty which gives a final error on the M 2 value of approximately 28%.
A modal decomposition of the measured seed profile shown in Fig. 3 has been performed and an input field distribution for GENESIS containing the power content coefficients from the modal reconstruction has been prepared. It has been assumed that the profile was taken at waist and the phase differences between the modes have been assumed to be zero. The FEL output power for the seeded and unseeded case has been calculated for the parameters listed in Table I. The power contrast after the third undulator along the internal bunch coordinate is plotted in Fig. 6. The simulated contrast for this case is in a good agreement with the expected value for an M 2 of 2.2 in Fig. 2 and with the experimentally measured energy contrast reported in [5]. One has to stress that in the latter reference, an energy contrast is reported with ratio between the SASE photon pulse length and the seed pulse length of about 4. The seeded FEL pulse energy was ð1:3 AE 0:5Þ J while the unseeded SASE pulse had an energy of about 300 nJ. The duration of the seeded FEL pulse is determined by the duration of the seed pulse of approximately 15 fs while the duration of the region in the bunch qualified for SASE was 60 fs, measured using a transverse deflecting cavity. Shot-to-shot fluctuations have been averaged out.   Fig. 3. The TEM 00 mode is, with around 90% of the overall intensity, the strongest mode. Power content coefficients smaller than 10 À3 are colored white.

VI. CONCLUSION
The influence of M 2 onto the achievable power contrast between the direct seeded FEL radiation and SASE has been studied considering the hardware setup and the electron beam properties expected for FLASH2. It has been found that the power contrast decreases rapidly with M 2 reaching 0 at an M 2 of about 5. The results of the simulation studies are in good agreement with the experimental data obtained at the HHG direct seeding experiment ''sFLASH.'' A modal decomposition using a single transverse intensity profile has been discussed as a method for M 2 measurement. This technique has been applied to the experimental data obtained at the sFLASH experiment and it has been shown that the power contrast from a GENESIS simulation using the reconstructed field is in good agreement with the experimental observation at sFLASH.