Transverse diagnostics based on dipole mode signal fitting method in TESLA-type accelerating cavities at the free-electron laser FLASH

TESLA cavities are used at the free-electron laser in Hamburg (FLASH) to accelerate electron bunches for generating intense free-electron laser beams. Two specially designed couplers mounted at both ends of each cavity damp the higher order modes (HOMs) excited by the beam in these cavities. By using a specific dipole mode signal extracted from these couplers, one can determine the transverse beam position as well as the dipole mode polarizations and center in each cavity. We introduce a new method based on fitting the dipole mode signal to correlate the dipole mode amplitude and phase to the measured beam position. With this method, the TESLA cavities can be used as HOM-based beam position monitors (HOMBPMs), delivering consistent results over several months, with a resolution better than 10 μ m RMS. We implemented this method for a whole accelerating module for beam orbit monitoring. The method also delivers the polarization axes and the center of the dipole mode for all eight cavities in this module. Our measurements show that the cavities did not move inside the module within almost one year.


I. INTRODUCTION
Higher order modes (HOMs) are used for a variety of diagnostics for the electron beam and the accelerating cavities [1][2][3]. For example, the monopole modes can be used to monitor the beam phase relative to the accelerating rf, and the dipole modes to measure the transverse beam positions and the cavity misalignment. Special couplers installed on each cavity provide the necessary HOM signals. In this paper, we focus on a specific dipole mode for transverse diagnostics in the accelerating cavities. These diagnostics can provide the beam position as well as information on the mode in the cavity. While the usefulness of such a method has been shown before, we introduce a new method to be able to use dipole modes stably for operation. We applied this method in the TeV-energy superconducting linear accelerator (TESLA) cavities at FLASH during several experiments.
The free electron laser in Hamburg (FLASH) [4,5] is a linac based self-amplified spontaneous emission free electron laser (FEL) facility generating high brilliance x-ray pulses. Nowadays, it serves not only as a FEL user facility, but also as a test facility, for example for the European x-ray free-electron laser (European XFEL) [6] and the International Linear Collider (ILC) [7]. Figure 1 shows the layout of FLASH. The electron beam is generated by a normal conducting rf photo cathode gun and then accelerated by a superconducting linac consisting of seven 1.3 GHz accelerating modules. Each module contains eight TESLA type nine-cell cavities. One module with four 3.9 GHz cavities is used to linearize the energy spread [8]. The bunch trains are compressed in two stages to achieve a peak current of 0.8 to 2.5 kA and accelerated to up to 1250 MeV. FLASH1 and FLASH2 are the two undulator beamlines with fixed gap and variable gap undulator, respectively. They generate high brilliance ultrashort ultraviolet and soft X-ray pulses for two experiments simultaneously. A third beamline accommodates a beam-driven plasma-wakefield experiment named FLASHForward [9].
When an electron beam passes through the TESLA cavities, it excites wakefields [10]. These fields, covering a wide range in frequency, can be decomposed into different modes. The modes with higher frequencies than the accelerating mode are referred to as HOMs, and for cylindrically symmetric structures, can be classified into monopole, dipole, quadrupole, etc. modes according to their symmetry. The HOMs are a main cause of emittance growth in rf accelerators and may deteriorate the beam quality [11]. In order to minimize their coupling to the beam, HOM couplers are used. Centering the beam in the cavities also reduces the HOM effects. The conventional beam position monitors (BPMs) installed in FLASH do not give direct information about the beam position in the accelerating cavities. Especially there are magnets between the BPM and the cavities, which make it difficult to infer the beam position in the cavities directly. This information can be obtained from the dipole mode signal, which has a linear dependence on the beam offset with respect to the cavity axis. We use this property for beam position measurement and beam alignment. A method has been proposed years ago, which showed good results [1]. However, previous studies show that the phase of the dipole signal is not stable [12]. Accordingly, the HOMbased BPM (HOMBPM) loses its prediction power quickly.
Here for the first time, we propose to extract the relevant physical quantities that can fully parametrize the HOM signal. We developed a new method based on fitting of the dipole mode signal, and then implemented it for all eight cavities in one accelerating module at FLASH. The results of long term measurements of HOMBPMs are presented in this paper. Besides, we also measured the polarization axes and the center of the dipole mode in each cavity.
In this paper we first give a brief overview of the HOMbased beam position diagnostics and then describe the measurement setup in Sec. II. The main data analysis methods including singular value decomposition (SVD) and signal fitting method are described in Sec. III. The results of the HOMBPM measurement are presented in Sec. IV. Section V gives the conclusion.

A. Higher order modes
As mentioned before, due to the cylindrical symmetry of the TESLA cavity, the wakefields excited by electron bunches can be expanded as a series of multipole modes. The transverse wakefields are dominated by the dipole modes. The amplitude of a specific dipole mode is proportional to three factors [10].
where q is the bunch charge, r is the transverse beam offset and R=Q is the normalized shunt impedance that characterizes the coupling of the mode to the beam. The linear relationship between the dipole mode amplitude and the transverse beam offset implies that the beam position can be determined by monitoring the beam excited dipole mode signals. These signals can be obtained from two special couplers mounted at both ends of the cavity with a span angle of 115°to ensure damping of all dipole modes [13]. An illustration of the TESLA cavity including the two HOM couplers is shown in Fig. 2. Apart from the HOM coupler ports, one can also see the ports for the power coupler and a pick up antenna. The horizontal (x) and vertical (y) planes are also defined in the figure.
Because of the nine-cell structure, nine modes form a pass-band. These modes have similar field geometry, but different longitudinal distribution along the cavity. According to their transverse field distribution, there are TM-like and TE-like modes. A typical transmission spectrum (jS 21 j) recorded with a network analyzer between the two HOM couplers of a cavity is shown in Fig. 3. Two dipole bands (TE111 and TM110) and one monopole band (TM011) are marked in the figure. The sixth mode of the first transverse electric dipole band, TE111-6, is one of the strongest dipole modes with an R=Q of 4.4 Ω=cm 2 [14].
The dipole modes exist in polarized doublets corresponding to the two transverse orthogonal axes. Due to the imperfections in the construction of the cavities and the asymmetry caused by the HOM couplers, the polarization axes may not be coincident with the horizontal and vertical planes, and the angle between them may deviate slightly from 90°. Besides, the imperfections also lead to a frequency split between the two polarizations. Figure 4 gives examples of two spectra of the TE111-6 mode recorded by a dedicated electronics, which will be described later, from two different cavities in the fifth accelerating module ACC5. The frequency of this mode is about 1.7 GHz with small variations from cavity to cavity. The frequency split is normally less than 1 MHz. This frequency split makes it possible to separate the amplitudes of the two polarizations of the dipole mode.

B. Experiment setup
The amplitudes of the two polarizations are linearly dependent on the offset from the two polarization axes. Therefore, by varying the beam trajectory systematically in the transverse plane, the relative strength of the polarization modes can be quantitatively calibrated. The determination of the transverse beam position in the cavity turns into a linear regression problem. Figure 5 shows the schematic drawing of the experimental setup for the HOM-based beam position measurement. All measurements were made in module ACC5. During the measurements, the beam trajectory is varied by a pair of steerers, one in the horizontal and the other in the vertical plane. By changing the current of the two steerers step by step, the beam position moves in a grid.
An upstream and a downstream BPMs record the transverse beam positions. A single bunch per pulse with a charge of 0.5 nC is used. The pulse frequency is 10 Hz. The energy of the beam is about 450 MeV. The rf is switched off and the quadrupole magnets between the steerers and the accelerating module are cycled to zero to ensure a drift space between these two BPMs. Therefore, the beam position in each cavity can be easily interpolated from the BPM readings. The reference trajectory is defined by the zero readings of the two BPMs. It is worth noting that, in addition to the beam offset, a tilt of the trajectory or of the bunch may also excite dipole modes [15]. However, the bunch length at FLASH is very short. Thus the amplitude excited by bunch tilt can be ignored. Also, compared to the beam offset, the trajectory tilt contributes much less to the dipole mode amplitude [16] and can be neglected. Therefore, the dipole mode amplitude can be seen in our case as only linearly related to the beam offset.
In order to align the grid scan area around the center of each cavity, we identify the trajectory, which minimizes the dipole mode signal, by using an online beam orbit optimizer named Ocelot [17]. This trajectory is set as the center of the scan.
The beam induced HOM signals are extracted by the HOM couplers from each cavity and then processed by the electronics available for all cavities in the first five modules at FLASH [18]. The block diagram of the electronics is shown in Fig. 6. The HOM signal is filtered at approximately 1.7 GHz with a 20 MHz bandwidth to select the TE111-6 mode. It is then down converted with a local oscillator signal at 1.68 GHz to a 20 MHz intermediate frequency (IF) signal and digitized at approximately 108.3 MHz. The raw data is then collected from the digitizer with the DOOCS control system [19].
An example of a waveform measured from cavity seven is shown in Fig. 7. The raw waveform is 19 μs in duration with 2048 samples. The dipole mode signal is excited when the beam enters the cavity. Before the signal starts, there is noise with an amplitude of about 10 bins. By setting a threshold of 20 bins, we can determine the signal start time as shown in the small window in Fig. 7. The first part of the signal is induced by the transient of the beam. The end part of the raw signal has a small signal-to-noise ratio (SNR) and hardly carries any information on the beam offset. Another perturbing effect may be the saturation of the digitizer like in Fig. 7, which occurs in case of a strong signal caused by a large beam offset. Therefore, we use a time window to select the useful part of the waveform (red bars in Fig. 7). The noise, the transient, the saturation and the end part of the signal are removed. The rest of the waveform is shifted to zero offset and used for further analysis.

A. SVD method
The SVD method explained hereafter was first described in [1]. For the extraction of beam position information from dipole mode signals, one analysis scheme is to construct waveforms measured from one HOM coupler with all beam pulses in a matrix X. Each row of X is a waveform for a different trajectory. The matrix can be decomposed into a product of three matrices utilizing the SVD method [1,3,20], where U and V are unitary and S is a diagonal matrix. V T is the transpose of V. The columns of U and V are orthonormal, called the left and the right singular vectors of matrix X. The diagonal elements of S, named singular values, represent the amplitudes of these vectors. The SVD expands the original data in a coordinate system where the covariance matrix is diagonal. We made a grid scan with 320 pulses. The data obtained from cavity four form matrix X. The first 40 singular values of this matrix are shown in Fig. 8. Generally, the transverse beam motion has four degrees of freedom (x; x 0 ; y and y 0 ) [1]. Therefore, at least the first four SVD modes should, in principle, be used for analysis. As we can see, the first two modes are the largest, which indicates a strong linear dependence between the dipole mode and the beam offset. However, there could also be additional SVD modes correlated to the dipole mode signal. The fifth singular value is close to the fourth. Moreover, a previous study shows that the SVD method works well with the first five modes for the HOMBPM calibration [21]. In our case, the RMS error of the calibration did not reduced significantly (no more than 3%) by using more than five modes. Therefore, we decided to utilize the first five modes. By removing these, the noise of the dipole mode signal can be estimated with the rest modes [2]. Figure 9 shows an example. This noise has an RMS of 0.021 kbins, which accounts for about 2% of the signal.
For each beam trajectory in the data set, matrix A SVD containing the amplitude of each of the SVD modes is calculated as follows: Note that the SVD mode amplitudes need to be normalized by the beam charge. Since the first five SVD modes carry the main information on the dipole mode signal, we preserve the first five columns in matrix A SVD and eliminate the others. For each cavity, this reduced matrix is then regressed against a matrix B consisting of the beam positions in x and y, where matrix M is the calibration matrix which maps the SVD mode amplitudes to the beam positions. In order to predict a new beam position, we first calculate the SVD mode amplitudes by the dot product of the waveform with the right singular vectors (matrix V). Then we multiply the mode amplitudes by the calibration matrix M.
The SVD method is a very effective way to calibrate the HOMBPM system. It does not require the knowledge of physical parameters, such as the frequency, amplitude and phase of the dipole mode [1,21,22]. In order to quantitatively compare dipole modes excited by different trajectories, all waveforms must be sampled at the same positions. However, when a phase shift occurs in the system, the digitizer samples the new waveform at different points. This causes an error in the SVD mode amplitudes calculation. Hence the HOMBPM calibration loses its accuracy for beam position prediction. An illustration of this effect can be seen in Fig. 10. The calibration data were measured on April 4, 2018. Another beam scan was made on May 14 to verify the calibration stability over a long time. We used the RMS of the difference between the calibrated beam positions and the interpolated beam positions from the two BPMs as a figure of merit to evaluate the HOMBPM calibration and prediction. The RMS error is 0.13 mm in x and 0.09 mm in y for the calibration, and 1.17 mm in x and 1.48 mm in y for the prediction data. As we can see, the RMS error has increased significantly over a month. The HOMBPM loses its accuracy for beam position measurement with the SVD method.
In an attempt to solve the phase drift problem, we also used the spectra instead of the waveforms for calibration [12]. The phase drift does not affect the spectrum because it only carries the information of the mode amplitude without phase information. However, the amplitude only represents the absolute value of the beam offset. We cannot distinguish between a positive from a negative offset. Additional signal phase information is required in order to predict the beam position in full range. This phase information can be retained by fitting the measured dipole mode signal, which is going to be presented in the next section.

B. Signal fitting method
The main idea of the signal fitting method is to get the dipole mode amplitudes and phases by fitting the waveforms. As mentioned before, each dipole mode has two polarizations. We define the polarization with lower frequency as polarization one and the higher one as polarization two. The dipole mode signal is the sum of these two components. The waveform from a given coupler can be fitted with the equation [15], x (mm)  where a 0 is the signal offset, t 0 is the time when the dipole signal starts (as shown in Fig. 7), a 1;2 are the mode amplitudes, ω 1;2 are the angular frequencies, φ 1;2 are the initial phases and τ 1;2 are the decay times of the two polarizations. The signal start time (t 0 ) is determined from the raw waveform as described in Sec. II B. The others are free parameters and are determined by a nonlinear least square fitting method. The merit function to be minimized is where S is the measured waveform, W is the fitting function based on Eq. (5), i represents the index of the sample and N is the length of the waveform. A MATLAB code based on the genetic algorithm, which is an effective way to find global minima for nonlinear problems, is used to solve the merit function [23]. Figure 11 shows a fitting waveform and its difference to the original signal measured from cavity four. The coefficient of determination (R 2 ) is over 0.99 and the RMS error of the difference waveform is 0.019 kbins, which is very similar with the signal noise estimated above by the SVD method. This validates the used fitting model. For a given cavity, the measured dipole mode signals have the same frequency and decay parameters. Therefore, we can optimize the fitting program by fixing these two parameters. To achieve this, we choose a trajectory which has moderate offsets from both polarization axes. Considering that ω 1;2 and τ 1;2 are free parameters in the fit in addition to a 1;2 and φ 1;2 , we repeatedly fit the waveform for this trajectory for dozens of times and then take the averages of ω 1;2 and τ 1;2 as the fixed frequencies and decay parameters in this cavity. The averages of φ 1;2 are defined as the reference phases. The RMS errors of ω 1;2 , τ 1;2 and φ 1;2 are about 0.10 MHz, 0.05 μs and 0.02 rad. For the other waveforms from different trajectories, only the amplitudes and phases need to be determined. We plot the normalized mode amplitudes and phases of the two polarizations obtained from HOM1 on cavity four, as illustrated in Fig. 12 and Fig. 13 respectively. The polarization axes thus can be clearly observed. These will be discussed in detail later in Sec. IV B. In Fig. 12, for two beam trajectories equally far from a polarization axis, on either side of it, the amplitude is the same. And in Fig. 13, the phase of the polarization has a jump of π across the axis, distinguishing between positive and negative beam offset with respect to the polarization axes.
As we can see, in a coordinate system consisting of the two polarization axes, the mode amplitudes determine the beam offset with respect to each axis and the phases determine that in which quadrant the beam is located. Therefore, we define the positive and negative amplitudes according to the phases:   where φ ref 1;2 are the reference phases. Then we calibrate the mode amplitudes and the beam positions by direct linear regression, where matrix A amp contains three columns, two columns of the mode amplitudes (ã 1;2 ) and an intercept term of I, in order to allow for an offset between the zero of the dipole mode amplitudes and of the beam position, matrix B is constituted by the beam positions interpolated from the BPM readings and matrix M is the resulting 3 × 2 calibration matrix. When a phase drift occurs, the shift of the measured signal in time (Δt) leads to a change in phase (Δφ) of the dipole mode, where f is the dipole mode frequency after downconversion. For the cavities in ACC5, the frequencies are in the range of 18.8 to 26.6 MHz. The signal is sampled by the digitizer with 108.3 MHz rate, which indicates a sampling time (t s ) of about 9.23 ns. The time shift can be divided in two parts, where n is an integer and p is a decimal number. In Eq. (5), n represents the change of the signal start time (t 0 ), and the fractional part indicates the change that occurs in φ 1;2 . In this way, the fitting method can determine any phase shift. As mentioned before, φ 1;2 determine the positive or negative coefficient of the polarization amplitude. The maximum phase shift of φ 1;2 is 2πf 1;2 t s . For all cavities in ACC5, the mode frequencies after down-conversion are all below 27.1 MHz, which result in a phase shift less than π=2. In this case, according to Eq. (7), the phase shift does not result in a change in the positive or negative coefficient of the polarization amplitude. The signal fitting method can eliminate the effect of phase drift and ensures the long-term stability of the HOMBPM system. The next section will present its applications to the accelerating module ACC5.

IV. MEASUREMENT RESULTS
A. HOMBPM

Stability
The HOMBPM measurement based on the fitting method was implemented in the accelerating module ACC5 at FLASH. The measurements of both polarizations from one HOM coupler are sufficient in this case. But these two couplers have a dissimilar sensitivity to the dipole doublet because of their different azimuthal orientation. Therefore, for each cavity, we excluded the one which couples too weakly or too strongly to the dipole modes. A weak signal is more easily disturbed by noise while a strong signal causes saturation of the digitizer, such that both cases result in a degradation in resolution. In our experiments, the signal measured from HOM2 on cavity three and HOM1 on the rest cavities was used for HOMBPM measurements. In the following, we will no longer indicate which coupler was used for a given cavity.
We had made four measurements at different times: February 5, April 4, May 14 in 2018, and January 23 in 2019. The data recorded on April 4 was used for HOMBPM calibration. The other three measurements were used to verify the stability of the HOMBPM system with the fitting method. In Fig. 14 The same calibration matrix was used to predict the beam positions for all measurements. The RMS errors for all cavities for the four measurements are summarized in Fig. 15. The RMS errors from the four measurements in each cavity are very close to each other. Please note that the values depend also on the measurement range. These measurements and analysis based on the fitting method by extracting the signal amplitude and phase sufficiently prove that the instability comes from the phase shift of the obtained HOM signals. Once the HOM signals are corrected, the HOMBPM holds its prediction ability stably over nine months.

Resolution
In order to estimate the resolution of the HOMBPMs, a method used for multiple BPMs was applied [24]. For this, data were taken from 130 pulses, without moving the beam with the steerers, using the natural transverse jitter of the beam. The resolution is then determined by correlating the reading of one HOMBPM in one plane against the readings of all the other monitors in the same plane. We use linear regression to correlate the HOMBPMs with each other. Figure 16 shows the results in the horizontal plane measured from cavity four plotted against the prediction from the other cavities.
We define the RMS resolution as follows: where x i is the HOMBPM reading, x p;i is the predicted beam position from the other cavities and n is the total number of pulses. The resolution of each monitor obtained for both the horizontal and vertical planes are illustrated in Fig. 17. For each cavity, a resolution better than 10 μm RMS has been obtained. The difference of the resolution in x and y is mainly caused by the dissimilar sensitivity of the polarizations to the coupler, such as cavity two and cavity three. We may also notice that the resolution in cavity six is relatively large in both planes. This is because the frequency split of the polarizations is very small. In this case, the error in obtaining the amplitudes of the polarizations by signal fitting method is larger.

Measurement during normal operation
The HOMBPMs are aimed at monitoring the beam orbit in the accelerating module during normal beam operation at FLASH, when the rf and the quadrupole magnets are on. In this case, the beam trajectory between the two BPMs is not a straight line anymore. According to the transport matrices for rf cavities [25], the beam trajectory in the TESLA cavities is very close to a straight line due to the high beam energy (about 550 MeV). In order to prove the reading of the HOMBPMs in this case, we made linear scans in the horizontal and vertical plane respectively. Figure 18    This measurement result demonstrates the ability of the HOMBPMs as a diagnostic tool for beam operation. We made them available for normal beam operation to monitor the beam orbit passing through the accelerating module ACC5. Figure 19 shows the beam positions measured by HOMBPMs in all eight cavities during normal beam operation. One observes a slight curvature of the trajectory. The error bars are determined by two primary sources: the measurement errors arising from the two BPMs and the errors due to the signal fitting. Different cavities have different performance in the signal fitting. For a given cavity, the beam trajectories with different offsets may also have different errors. Besides, a beam trajectory that is too far or too close to the polarization axis may result in a larger error.

B. Dipole mode center and polarization axes
As mentioned in Sec. II A, a dipole mode has two polarizations. These polarization axes form a new coordinate system. Due to the imperfections of the cavity and the asymmetrical positioning of the couplers, the origin of this coordinate system is usually not coincident with the geometric center of the cavity and each axis may be rotated by a different angle with respect to the horizontal and vertical plane. On account of the linear dependence between the dipole mode and the beam offset with respect to the polarization axes, the mode amplitude in Eq. (7) can be written asã 1 ¼ k 1ỹ andã 2 ¼ k 2x (as shown in Fig. 12), in which k 1;2 are linear coefficients. Based on the coordinate transformation, the offsetsx andỹ are related to the beam position in x and y by x where θ x and θ y are the rotation angles of the horizontal and vertical axis respectively, and ðx 0 ; y 0 Þ is the mode center offset with respect to the line defined by the zero readings of the BPMs. The calibration matrix M in Eq. (8) is then calculated as follows: The calibration matrix maps the mode amplitudes to the corresponding beam positions in x and y. The rotation angles of the axes and the dipole mode center can be obtained from the calibration matrix, and y, so that the polarization axes and the electric center are the axes and the center of the ellipse. The dotted line closer to the horizontal plane is namedx-axis and the solid line closer to the vertical plane is namedỹ-axis. The angles of the polarization axes with respect to the horizontal plane are listed in Table I. The two polarization axes are not orthogonal. The question remains, what determines the polarization axes in each cavity. This depends certainly on the geometry of the cavity as well as on the HOM couplers. An extensive study would be needed in order to answer this question. Figure 21 shows the transverse electrical cavity centers obtained with our method in ACC5 from two data sets, separated by about nine months. The centers with respect to the axis defined by the BPMs are plotted in the upper row. In our experiment, the reference longitudinal axis is defined by the zero readings of the BPMs. The transverse offset of the electrical center was obtained with respect to this axis. More interesting for the alignment of the cavities inside the accelerating module is to use the module axis, defined by the beam trajectory which results in the minimum power of the TE111-6 mode. The misalignment with respect to the module axis is plotted in the lower row.
The misalignment changed with respect to the reference axis over time, but remained the same with respect to the   defined module axis between the two individual measurements. The RMS alignments of the cavities with respect to each other in x and y are 0.238 mm and 0.408 mm. The misalignment of the cavities is more conspicuous in the vertical plane. This result does not reproduce the values of the previous measurement in ACC5 in 2006 [26] since this module had been replaced in 2007.

V. CONCLUSION
The amplitudes of the beam excited dipole modes in accelerating cavities are linearly dependent on the transverse beam offset. We utilized the TE111-6 mode to determine the transverse beam position in TESLA cavities installed at FLASH. A SVD-based method using waveforms has been applied in the past for this, which proved that the HOMs can be used for beam position measurements with good results. However, this method loses its ability for predicting the beam position over time.
In order to solve this problem, we applied a new method based on reconstructing the mode amplitudes and phases by fitting the dipole mode waveform captured via the HOM couplers. In the coordinate system defined from the two polarization axes existing for a dipole mode, the amplitudes linearly depend on the beam offset with respect to these axes, while the phases determine the quadrant and thus the sign of the beam offset. This new method was implemented for a whole accelerating module (ACC5) consisting of eight cavities. After carefully calibrating all HOMBPMs, we obtained an RMS error of less than 0.15 mm for all eight cavities with respect to the positions interpolated by conventional BPMs. Three additional measurements were performed within a time interval covering almost one year, which verified that the method provides consistent results over time not achieved before. The RMS errors of these three measurements are very close to the calibration results, which proves an excellent stability of our method. Moreover, all monitors have shown a resolution of less than 10 μm RMS. We implemented the fitting method for all cavities in ACC5 for beam orbit monitoring during normal operation.
The signal fitting method allows separating the two polarization planes of the dipole mode from each other, and therefore concurrently delivers the mode polarization and electrical centers of the cavities. Hereby the electrical centers are determined from the minimum amplitudes of the two polarizations. The resulting cavity misalignment within the cryomodule was 0.238 mm RMS in x and 0.408 mm RMS in y, and did not change over about nine months.

ACKNOWLEDGMENTS
We appreciate the support of the FLASH operational crew during our measurements. We also had many fruitful discussions with our colleagues, of which we would like to mention Kay Wittenburg and Bastian Lorbeer.