Overestimation of thermal emittance in solenoid scans due to coupled transverse motion

The solenoid scan is a widely used method for the in-situ measurement of the thermal emittance in a photocathode gun. The popularity of this method is due to its simplicity and convenience since all rf photocathode guns are equipped with an emittance compensation solenoid. This paper shows that the solenoid scan measurement overestimates the thermal emittance in the ordinary measurement configuration due to a weak quadrupole field (present in either the rf gun or gun solenoid) followed by a rotation in the solenoid. This coupled transverse dynamics aberration introduces a correlation between the beam's horizontal and vertical motion leading to an increase in the measured 2D transverse emittance, thus the overestimation of the thermal emittance. This effect was systematically studied using both analytic expressions and numerical simulations. These studies were experimentally verified using an L-band 1.6-cell rf photocathode gun with a cesium telluride cathode, which shows a thermal emittance overestimation of 35% with a rms laser spot size of 2.7 mm. The paper concludes by showing that the accuracy of the solenoid scan can be improved by using a quadrupole magnet corrector, consisting of a pair of normal and skew quadrupole magnets.

The solenoid scan is a widely used method for the in-situ measurement of the thermal emittance in a photocathode gun. The popularity of this method is due to its simplicity and convenience since all rf photocathode guns are equipped with an emittance compensation solenoid. This paper shows that the solenoid scan measurement overestimates the thermal emittance in the ordinary measurement configuration due to a weak quadrupole field (present in either the rf gun or gun solenoid) followed by a rotation in the solenoid. This coupled transverse dynamics aberration introduces a correlation between the beam's horizontal and vertical motion leading to an increase in the measured 2D transverse emittance, thus the overestimation of the thermal emittance. This effect was systematically studied using both analytic expressions and numerical simulations. These studies were experimentally verified using an L-band 1.6-cell rf photocathode gun with a cesium telluride cathode, which shows a thermal emittance overestimation of 35% with a rms laser spot size of 2.7 mm. The paper concludes by showing that the accuracy of the solenoid scan can be improved by using a quadrupole magnet corrector, consisting of a pair of normal and skew quadrupole magnets.

I. INTRODUCTION
The solenoid scan is one of the most commonly used methods for the in-situ measurement of the thermal emittance of a photocathode in an electron gun. [1][2][3][4][5][6][7][8][9]. The measurement has a simple experimental configuration: an rf or dc photocathode gun followed by a transport line consisting of a solenoid and a drift. The photoelectron beam exits the gun at relatively high energy after which it immediately enters the transport line where it is focused by a solenoid onto a screen located at the end of a drift. The thermal emittance of the photocathode is obtained by measuring the beam's transverse size on the screen as a function of the solenoid focusing strength and then fitting these sizes according to the linear transfer matrix of the transport line.
Driven by the desire for high brightness electron sources, the thermal emittance of both metal and semiconductor cathodes has been intensively investigated with measurements in the past few decades [2,3,[6][7][8]10]. Some of these measurements have deviated significantly from the theoretical predictions. For copper cathodes illuminated by a 266 nm laser, the theoretical thermal emittance is 0.5 mm mrad/mm [11] while the measured values vary from 0.57 mm mrad/mm [10] to 1.17 mm mrad/mm [3]. For cesium telluride cathodes and a 262 nm laser, the thermal emittance is predicted to be 0.9 mm mrad/mm [11] while the measured values vary from 0.54 mm mrad/mm [10] to 1.2 mm mrad/mm * dych@mail.tsinghua.edu.cn [8]. These discrepancies are only partially explained by actual increases of the thermal emittance (due to surface roughness and/or impurities) [3,12] so the remainder of the discrepancies must be due to the measurement method itself.
Accurate measurement of the thermal emittance via the solenoid scan method depends on three factors: (1) accurate beam size measurement at the screen (2) accurate knowledge of the transfer matrix and (3) reduction of the sources of emittance growth so that only the thermal emittance remains. The first factor can be improved by employing a high sensitivity CCD camera [3] and a thin YAG:Ce screen [5]. The second factor requires accurate knowledge of the fields of the beamline elements and the distances between the elements. Finally, in the third category, there are a number of well-known factors that increase the emittance of the beam thus leading to an overestimation of the thermal emittance. Inside the gun, these known factors include the nonlinear effects from space charge (SC) [4,8] and rf effects that increase the projected emittance. SC effects are mitigated by using low charge beams while rf effects are reduced by using short beams. After the gun, the solenoids spherical and chromatic aberrations [13,14] will also induce growth of the rms emittance. Both of these aberrations scale with the square of the transverse beam size. In theory, these effects can be mitigated by keeping the beam size small inside the bore of the solenoid but in practice the beam often becomes large inside the solenoid during the scan. The chromatic aberration scales with the beam's energy spread and can therefore be mitigated by operating with a short bunch at low charge -consistent with mitigation of rf and SC effects in the gun. In summary, the traditional solenoid scan method uses a bunch with low charge and short length to reduce the SC, rf, and chromatic sources of emittance growth. This paper presents a previously overlooked source of emittance growth due to coupled transverse dynamics aberration that leads to an overestimation of the thermal emittance measured via the solenoid scan. The work presented in this paper was inspired by the recent publication by Dowell et al. [15]. Whereas the reference focused on the sources of emittance growth due to the coupled transverse dynamics aberration and its elimination, here we are focused on the impact of this aberration on the thermal emittance measurement via the solenoid scan which arises inescapably because the scanning solenoid itself is the source of the aberration. This situation was not addressed in Ref. [15] so this paper presents a systematic study of the thermal emittance overestimation from the coupled transverse dynamics aberrations using the solenoid scan technique. This aberration arises when the beam motion in the x − x plane becomes correlated with y − y plane causing an emittance growth in the 2D phase space. Two aberration sources (thoroughly explained in the reference [15]) exist in the measurement beamline: (1) an rf quadrupole field, in the rf gun, followed by a rotation in the solenoid, and (2) a constant quadrupole field, inside or before the solenoid, followed by a rotation in the solenoid. In the remainder of this paper, these are referred to as the gun quadrupole and the solenoid quadrupole.
This paper is organized as follows. Section II describes the gun and solenoid quadrupole focusing in the solenoid scan beamline. Section III discusses the emittance growth due to the coupled transverse dynamics aberration in the solenoid scan beamline. In section IV, the thermal emittance overestimation due to the aberrations in the solenoid scan technique is studied both analytically and numerically. In section V, the overestimation is experimentally verified using an L-band 1.6-cell photocathode rf gun with a cesium telluride cathode. Finally, we propose a flexible and compact quadrupole corrector in section VI to minimize the coupled transverse dynamics aberrations so as to improve the accuracy of the solenoid scan measurement to thermal emittance .

II. QUADRUPOLE FOCUSING IN THE SOLENOID SCAN BEAMLINE
In this section we derive transfer matrices for the quadrupole focusing that arises in the solenoid scan beamline. The layout of the beamline is shown in FIG. 1. Here the cathode of the rf gun, the solenoid entrance, the solenoid exit and the YAG screen are marked as Position 0 to 3 respectively. In this section only the beamline from the cathode (position 1) to the solenoid exit (position 3) are used. Undesired quadrupole fields often exist in rf photocathode guns and, to the best of our knowledge, always exist in the solenoid field of all fabricated solenoid magnets used with rf guns. The quadrupole fields can be aligned either normally or rotated about the z-axis. The focusing due to quadrupole components is presented for three cases: the rf gun alone, the solenoid alone, and simultaneously in both the gun and solenoid. Quadrupole fields often exist in rf photocathode guns due to the asymmetric geometry of the cells due to openings in the side walls: rf coupling ports, pumping ports, laser ports, etc. Recent rf guns have eliminated the quadrupole field by using racetrack [16] or four-port [17][18][19] geometries in the cells. However, many older rf guns, without these symmetrizing features, are still in operation since the redesign, fabrication, and commissioning of a new gun is time-consuming and expensive. The gun used in our study (the drive gun [20] at the Argonne Wakefield Accelerator (AWA) facility) is of the older style and has only one rf coupling port and a small vacuum port on the opposite side of the cell, as illustrated in FIG. 2(a). This gun has a strong quadrupole field, as illustrated in the CST Microwave Studio simulation [21] shown in FIG. 2(b). The AWA rf drive gun has a normal quadrupole com-ponent due to the location of its rf coupling port and vacuum pumping port in the vertical direction. The normalized transverse momentum due to the gun quadrupole can be expressed as [19] where p ⊥ is the transverse momentum and p z is the longitudinal momentum. a is the parameter characterizing the relative strength of the quadrupole field to the monopole one, α is the normalized rf field strength, L is the full cell length, and ϕ 0 is the phase when the electron arrives at the full cell entrance. The beam trajectory in the trace space x and x after the gun quadrupole is given by where f g is the equivalent focal length of the gun quadrupole. Based on Eqn. (1) and (2) and assuming x 0 = 0, the slope of the trajectory after the gun quadrupole should be x = px pz = −2aαL sin ϕ 0 x 0 = − x0 fg . Therefore, the focal length due to the gun quadrupole is and the transfer matrix due to the normal quadrupole focusing in the rf gun can be expressed as B. quadrupole focusing from the solenoid The AWA solenoid has quadrupole fields due to the asymmetry of the solenoid's yoke and/or coil windings. While its quadrupole field has not been measured via a rotating wire, it should be similar in character to the LCLS solenoid shown in FIG. 2 of Ref. [15] where the solenoid field was measured to have a rotated quadrupole component at the entrance and exit of the solenoid. (This assumption is validated in Section V where the angle of the rotated quadrupole is measured using a beam-based method.) We only need consider the quadrupole located at the solenoid entrance since the focusing followed by the rotation is the source of the coupling between the transverse planes as explained above. Let the rotated quadrupole field in the solenoid have strength f s and rotation angle η, then its transfer matrix can be written as When both quadrupole fields are present, the above two transfer matrices of the gun and the solenoid quadrupoles can be easily combined as where the combined focusing strength f c and rotation angle θ of the combined transfer matrix (Eqn. 6) is given by

III. EMITTANCE GROWTH DUE TO THE COUPLED ABERRATIONS IN THE SOLENOID SCAN BEAMLINE
In this section, we present an analytical estimate of the emittance growth due to the coupled transverse dynamics aberration present in the solenoid scan and verify the estimate with numerical simulations. The transverse coupling aberration in the solenoid scan beamline is generated when the quadrupole focusing first focuses the beam to an elliptical shape, the beam is rotated in the solenoid which results in the transverse coupling. We analyze the emittance growth for the same three cases outlined in the previous section; once again only the beamline from the cathode (position 1) to the solenoid exit (position 3) is used here.
The emittance of the beam, after passing through the gun and solenoid, is given by where ε therm is the thermal emittance, ε coupled is the emittance growth due to the transverse coupled dynamics, and ε other is the emittance growth due to space charge, rf, spherical and chromatic aberrations, etc.
Therefore, to estimate ε we need separate estimates of its three components. In the ideal solenoid scan case the final emittance is equal to the thermal emittance so the second and third terms of Eqn. 8 should be zero. This is true for the last term, ε other , since the solenoid scan parameters are chosen to minimize it as described in section I, so ε other ≈ 0 for our analytical estimate. However, we show below that the middle term is, in general, not zero and this term causes a growth of the final emittance. The thermal emittance ε therm , is estimated with the three-step model. It can be expressed as = σ l 2E K 3mec 2 , where σ l is the rms laser spot size and m e c 2 is the electron rest energy [23]. The excess energy of the cesium telluride cathode can be expressed as 4π 0 βE c is the barrier reduction by the applied electric field due to the Schottky effect [24]. The typical cathode barrier E g + E a of the cesium telluride is reported to be 3.5 eV [8,11]. By assuming the field enhancement factor β = 1 and using 248 nm UV laser (φ l = 5 eV), the theoretical thermal emittance should be 1.05 mm mrad/mm. In the numerical simulation and during the experiment, the initial electron beam spot size has a uniform transverse distribution with 12 mm diameter (rms spot size 3 mm). Therefore, the estimated rms thermal emittance is 3 mm×(1.05 mm mrad/mm), or 3.15 mm mrad.
The coupled emittance estimate after passing through the solenoid, according to Ref. [15], is given by where K = eB0 2βγmc , L, KL, and B 0 , denote the strength, the effective length, the Larmor angle, and the peak magnetic field of the solenoid, respectively. Therefore, the analytical estimate of ε has a minimum value of 3.15 mmmrad due to ε therm added in quadrature to the sinusoidal oscillation term of ε coupled given in Eqn. 9.
To verify the analytic estimate of the emittance growth, an ASTRA [25] beam dynamics simulation was performed. In the simulation results below, the cathode gradient is 32 MV/m, corresponding to a maximum acceleration phase of 37 • and an ideal solenoid is used (i.e. one without quadrupole focusing) with peak field is fixed at 0.1974 T corresponding to a Larmor angle KL of -30 • .
To minimize ε other in the ASTRA simulation, a short pulse, low charge bunch is used. The rf emittance growth due to the phase-dependent rf kick [19] was minimized to 1.4% by the use of a 1.5 ps FWHM pulse length. The emittance growth due to space charge is zero since the charge is set to zero during the ASTRA simulations. This was done to speed up the simulations but we also confirmed that a sub-picocoulomb charge has less than 1% contribution to the final emittance. Note that this short pulse, low charge combination also minimizes the chromatic aberration of the solenoid.
A. emittance growth due to the gun quadrupole For the first case, only the gun quadrupole is taken into consideration while ignoring the one in the solenoid. In the ASTRA simulation, a 3D rf field map was used for the gun (exported from CST Microwave Studio) and an ideal 1D field map (exported from POISSON) for the solenoid. The total simulated emittance after the ideal solenoid as a function of the laser injection phase is shown in Figure  3. This simulation result can be compared to the analytic one by setting f c = f g , f s = 0, ε therm = 3.15 mm mrad. The emittance growth due to the coupled aberration can be found by substituting Eqn. 3 into Eqn. 9 which will be zero when ϕ 0 = 0 • . This corresponds to a laser injection phase of 49 • which was found by simulating the electron travel time from the cathode to the full cell. The minimum total emittance is close to the thermal emittance value (3.15 mm mrad) when the laser injection phase is 49 • , which demonstrates good agreement between the simulation and analytic results.

B. emittance growth due to the solenoid quadrupole
For the second case, only the solenoid quadrupole is taken into consideration while ignoring the one in the gun. In the ASTRA simulation, a 1D rf field map in the gun is used instead of the 3D field map and, once again, an ideal 1D field map (exported from POISSON) for the solenoid. To model the solenoid quadrupole, a quadrupole element was added to ASTRA at the same location as the solenoid. Its longitudinal field profile is the same as the ideal solenoid and its strength is set to 77 Gauss/m based on the experimental study introduced in Sec. V. The simulated emittance after the solenoid/quad location (position 2) as a function of the rotation angle of the solenoid quadrupole η is shown in FIG. 4. Comparing this simulation result to the analytic expression in Eqn. (9) (by setting f c = f s , f g = 0, ε therm = 3.15 mmmrad) we see the emittance oscillates sinusoidally with θ = η which again demonstrates good agreement between the simulation and analytic results. C. emittance growth due to both the gun and in the solenoid quadrupole For the third and final case, both the gun quadrupole and the solenoid quadrupole are taken into consideration. In the ASTRA simulation, a 3D rf field map was used for the gun (exported from CST Microwave Studio), an ideal 1D field map (exported from POISSON) for the solenoid and a quadrupole element was added to the beamline as described above. The laser injector phase is fixed at 43 deg which produces negative ϕ 0 = −6 • and the fitting of the rms beamsize and the solenoid strength, ε f it , is an overestimation of the thermal emittance. Further, ε f it , is approximately equal to the quadrature sum of the thermal emittance, ε therm , and the emittance growth due to the transverse coupled aberration, ε coupled .

A. Solenoid scan formalism
First we present the formalism for the normal solenoid scan, i.e. without any aberrations. Similar to the previous section, ε other ≈ 0 since the solenoid scan parameters are chosen to minimize it as described in section I. The solenoid scan beamline begins at the solenoid entrance and ends at the YAG screen; i.e. from positions 1 → 3 (FIG. 1). Its transfer matrix is given by the linear transfer matrix for the solenoid R sol and the drift R d successively (quadrupole components are not considered in the normal solenoid scan) and their matrices can be expressed as where S ≡ sin(KL), C ≡ cos(KL), and where L d is the length of the drift. Therefore, the x-beam size squared at the end of the drift is where the transfer matrix of the solenoid scan beamline without aberrations is R ≡ R d R sol ; x 1 2 , x 1 x 1 , and x 1 2 are the beam moments at the solenoid entrance. (For simplicity's sake we forgo the equivalent expression for the y-beam size but all the results in this section apply to both transverse planes. For the remainder of this section we drop of the subscript x unless otherwise noted.) Also, note that the solenoid scan method requires prior knowledge of R to find the beam moments and thus the emittance. Substituting in the values from the transfer matrices we obtain an analytical expression for the expected x-beam spot size squared at 3,

B. Measured spot sizes on the screen
In this section, we simulate the measured spot sizes on the screen by propagating the initial beam moments (Position 1 in FIG. 1) through the solenoid scan beamline transfer matrix M (which now includes aberrations) to the YAG screen (Position 3) for different solenoid strength settings K. This beamline is the same as the one in Sec. IV A except that a thin quadrupole lens is now placed at the solenoid entrance (Position 1). For simplicity, let the thin quadrupole lens have a normal rotation angle with focal length of f , so its transfer matrix can be expressed as and the transfer matrix of the solenoid scan beamline with aberrations is M ≡ R d R sol R f . The initial beam is characterized by the beam sigma matrix at the solenoid entrance (position 1 in FIG. 1). In order to keep the analysis simple, we assume the initial beam has zero-emittance, uniform transverse distribution, with the same beam size squared in both x and y directions ( x 1 2 ), and perfectly parallel rays. The initial beam matrix and initial emittance at the solenoid entrance (Position 1 in FIG. 1) can be expressed as Eqn. 15 completely specifies the initial beam conditions. The beam sigma matrix at the screen (Position 3 in FIG. 1) can be expressed as so that the measured x-beam sizes squared at the screen σ 2 scr as a function of the solenoid strength K can be expressed as

C. Fitting
To retrieve the emittance measured by the solenoid scan, the x-spot sizes squared at the screen (Eqn. 17) are compared to the analytical expectation of the beam sizes squared (Eqn. 13) in order to obtain the fitted beam moments at Position 1: Note that if the solenoid scan beamline had no aberrations then the fitting routine would retrieve the initial beam moments (Eqn. 15); i.e. x f it 2 = x 1 2 , x f it x f it = x f it 2 = 0, and the measured (fitted) emittance ε f it = 0. However, as we will show this is not the case due to the transverse coupled aberration. The fitted beam sizes squared σ f it 2 as a function of the fitted beam moments can be expressed as and the goal of the fitting routine is to minimize σ f it 2 − σ scr 2 to retrieve the fitted beam moments x f it 2 , x f it x f it and x f it 2 and thus the fitted emittance.
The next step is to scan the solenoid strength K in order to generate a series of spot sizes on the screen σ 2 scr (Eqn. 17) and then fit them to σ 2 f it (Eqn. 18). A Taylor expansion method is used to scan K about its value at the beam waist (k 0 ). During the solenoid scan, the maximum beam size at the screen is typically limited to about twice the minimum beam size (at the waist) to ensure accuracy [22]. As a result, the range of the solenoid strength K during the scan is small compared to k 0 . For example, the range only varies by 5.1% during the solenoid scan introduced in Sec. V. Therefore, the solenoid strength K can be expanded about k 0 K = k 0 + ∆k (19) where k 0 is the solenoid strength that focuses the beam to the waist, and ∆k k 0 in the range. The relationship between k 0 and the drift length L d is given by To obtain the Taylor series expansion of the screen beam spot size squared (σ 2 scr ) we substitute Eqn. 19 and Eqn. 20 into Eqn. 17 give to second order in ∆k where s ≡ sin(k 0 L) and c ≡ cos(k 0 L). Similarly, to obtain the Taylor series expansion of the fitted beam spot size squared (σ 2 f it ) we substitute Eqn. 19 and Eqn. 20 into Eqn. 18 By comparing of the coefficients of each ∆k power ex-ponents in Eqn. 21 and Eqn. 22, the fitted beam moments can be solved for as Finally, using these fitted beam moments, we can calculate the measured (fitted) emittance at Position 1 as which is, in general, not equal to actual emittance at Position 1, ε 1 = 0.
FIG. 6 compares the measured (fitted) emittance from the solenoid scan ε f it (Eqn. 24) to the final emittance at the end of the solenoid scan beamline ε 3 = ε coupled (Eqn. 25) for the special case of zero initial emittance. Let x 1 2 =1.7 mm and L=0.4 m, then f it and 3 are plotted as a function of the Larmor angle k 0 L and focal length f in FIG. 6 and show good agreement. The difference between them is relatively large when the Larmor angle k 0 L is very small and f is large, which are not common for realistic beamline parameters. This plot shows that the measured (fitted) emittance ε f it is equal to the emittance after the solenoid beamline ε 3 for realistic beamline parameters. In this specific case of zero initial emittance (ε 1 = 0), the final emittance is equal to emittance growth from the coupled aberration, ε 3 = ε coupled . As we show next for the general solenoid scan case having ε 1 = ε therm , then the measured (fitted) emittance ε f it is still equal to the final emittance but it is now quadrature sum of ε therm and ε coupled . Next, the above analytic results for the solenoid scan are verified with numerical simulations using ASTRA but now will include a non-zero initial emittance. The beamline layout and the parameter settings used in this simulation are the same as in the experiment introduced in Sec. V. The initial emittance is equal to the thermal emittance at the cathode, ε 0 = ε therm . The CST 3D field map containing quadrupole field is used for the gun and a quadrupole component is added to the solenoid. The longitudinal field profile of the solenoid quadrupole is the same as the solenoid, and the solenoid quadrupole strength is proportional to the solenoid field strength.
In the ASTRA simulation of the solenoid scan measurement, the solenoid strength is scanned and a series of spot sizes at the screen are generated for the four different solenoid quadrupole settings shown in Table I. The emittance measured by the solenoid scan is calculated with the fitting method of Eqn. 18 and the ASTRA screen spot sizes. The simulation results are listed in Table I, which include the initial emittance 0 , the actual emittance on the screen 3 , and the measured (fitted) emittance by solenoid scan f it . The variation of the actual emittance at the screen 3 is due to the dependence of 3 on the solenoid and solenoid quadrupole strength according to Eqn. 9. The results prove that the measured (fitted) emittance from the solenoid scan f it is very close to the quadrature sum of ε therm and ε coupled . Therefore, the coupled transverse dynamics aberration can lead to an overestimation of the thermal emittance in the solenoid scan method.

V. THERMAL EMITTANCE MEASUREMENT
The thermal emittance of a cesium telluride photocathode was experimentally measured with the solenoid scan method at the Argonne Wakefield Accelerator (AWA) facility to experimentally demonstrate the overestimation of the thermal emittance due to the coupled transverse dynamics aberration. The layout of the beamline is shown in FIG. 1. An L-band rf gun with a cesium telluride photocathode is illuminated by a 248 nm UV laser. The transverse profile of the laser is homogenized with a micro-lens array [26]. The cathode gradient is 32 MV/m and the laser launch phase with respect to rf is 43 • resulting in a beam energy of 3.2 MeV. The bunch charge is kept below 1 pC to make the space charge effect negligible. A PI-MAX Intensified CCD (ICCD) camera [27] with 100 ns shutter gating is employed to capture the beam images on the YAG screen with 40 µm/pixel calibration, which yields an approximate resolution of 60 µm.

A. thermal emittance in the linear regime
The measured thermal emittance (i.e. the fitted emittance from the solenoid scan) for different laser spot sizes is shown in FIG. 7. The measured results can be classified into two regimes: a linear regime where the rms spot size is (<0.75 mm) and a nonlinear regime where the spot size is (>0.75 mm). In the linear regime, the measured emittance has a linear relationship with the spot size and the slope of this line (1.05 ± 0.04 mm mrad/mm) can be used to extrapolate an accurate measurement of the thermal emittance from the fitted values. This slope is in good agreement with the theoretical value of the thermal emittance of a cesium telluride photocathode illuminated by 248 nm laser as introduced in Sec. III. In the nonlinear regime, the data deviates from the linear fit due to the coupled transverse dynamics aberrations. The deviation from the linear fit and the data is the overestimation of the thermal emittance and it becomes larger with increasing laser spot size, reaching 35% at the largest laser rms spot size of 2.7 mm.
These results show that the thermal emittance can be measured with the solenoid scan method as long as one is able to extrapolate the measurements into the linear regime. In our example of the AWA L-band (1.3 GHz) rf photoinjector we achieved an accurate measurement of the thermal emittance when the laser rms spot size is less than 0.75 mm. However, this becomes more difficult to do at higher frequency since the quadrupole fields in the gun and the solenoid become relatively stronger. Therefore, accurate measurements of the thermal emittance in rf photoinjectors are more difficult at S-band (2.856 GHz) and even more so for X-band (11.424 GHz). If we assume that the size of the beamline elements scale as the inverse of the frequency, then the laser rms spot size should be less than 0.34 mm for S-band photoinjectors and less than 0.085 mm for X-band photoinjectors to eliminate the coupled transverse dynamics aberrations to get an accurate measurement of the thermal emittance using the solenoid scan. From this we can conclude that lower frequency rf photoinjectors are preferred for accurate measurements of the thermal emittance. The strength and rotation angle of the effective solenoid quadrupole term can be inferred by using the solenoid scan in the nonlinear regime. This method can be used in lieu of the measurement of the actual solenoid quadrupole term with a rotating wire when it is not practical to remove the solenoid from the beamline. Note that the strength and rotation angle of the gun quadrupole are known from the 3D gun field map.
A large laser spot size (diameter=11 mm or rms=2.7 mm) is used in the following measurements to determine the solenoid quadrupole. Figure. 8 shows a series beam spots on the screen (Position 3) for various solenoid currents. The top row corresponds to the solenoid current flowing in one direction while the current has been flipped in the bottom row (hereinafter these directions are referred to as counterclockwise (ccw) and clockwise (cw)). The images of all the electron beams are elliptical for both the ccw and cw directions, however, the tilt angles are different for the two current directions. Notice that the beam images in the top row are tilted and therefore have a strong x-y correlation while the bottom row has beams that are nearly normally oriented and therefore have a weak x-y correlation. Since the coupled aberration is due to the x-y correlation we expect that when the solenoid current is in the cw direction (bottom row) the emittance growth should be less. This is indeed the case as we show below.  Figure 9 shows the x and y rms beam spot size as a function of the solenoid strength during the scan for both directions of the solenoid current. While the theoretical thermal emittance is 2.835 mm mrad, both solenoid scan fits yield higher emittance values as expected from the coupled aberration. Note that the emittance overestimation is larger for the ccw direction than the cw direction; as expected. To estimate the strength and rotation angle of the effective solenoid quadrupole an ASTRA simulation of the experimental results is performed. The simulation uses the 3D rf gun field map (therefore the gun quadrupole is assumed known), an ideal solenoid, and an ASTRA quad element to model solenoid quadrupole. The AS-TRA quadrupole element has: (i) length equal to the solenoid and (ii) strength proportional to the solenoid current. Two variables of the quadrupole element, its strength and rotation angle, are numerically scanned to fit the simulation to the experimental results of Figure 9. The best fit of the simulation is shown in FIG. 10 . 11. For the ccw current direction, the solenoid field is -0.1974 T, the corresponding Larmor angle is 15 • , and the rotation angle of the quadrupole is 12 • . For the cw current direction, the solenoid field is 0.1974 T, the corresponding Larmor angle is −15 • , and the rotation angle of the quadrupole is −78 • . The emittance growth contributed by the gun quadrupole is constant regardless of the change of the solenoid current direction, so the difference of the emittances between the two solenoid current directions is determined by the quadrupole in the solenoid. According to Eqn. 9, the emittance growth due to the solenoid quadrupole is proportional to |sin 2(KL + η)|. For the parameters shown in FIG. 11, |sin 2(KL + η)| = 0.809 and 0.1045 for the ccw and the cw current direction respectively, which explains the larger emittance overestimation for the ccw current direction. In summary, this beam based method shows that the AWA solenoid quadrupole has strength 77 Gauss/m and rotation angle 12 • for the ccw direction and −78 • for the cw direction.
x x y y The ccw current direction The cw current direction IG. 11. Left: The solenoid field is in the −z direction for the ccw solenoid current direction, and the rotation angle of the solenoid quadrupole is 12 • . Right: The solenoid field is in the +z direction for the cw solenoid current direction, and the rotation angle of the solenoid quadrupole becomes −78 • . The rotation angle is defined as the angle between the quadrupole focusing direction and the x-axis.

VI. QUADRUPOLE CORRECTOR
To eliminate the emittance growth due to the coupled transverse dynamics aberration, several types of quadrupole correctors have been proposed. A quadrupole corrector is useful for the specific case of improving the solenoid scan fidelity but also for the more general case of reducing emittance growth [15,[28][29][30]. A dedicated quadrupole corrector has also been designed for use at the AWA to cancel the emittance overestimation in solenoid scan, as shown in FIG. 12. The corrector consists of a pair of normal and skew quadrupoles in order to obtain a quadrupole with variable strength and rotation angle. The quadrupole corrector will be installed at the solenoid exit. An ASTRA simulation is employed to study the correction effect. The solenoid quadrupole used in this simulation is in the ccw direction as described in Sec. V. The laser spot is uniform in the transverse direction with a rms spot size of 2.7 mm. The other parameters are kept the same as in the experiment. Since the scan range of the solenoid strength is small in the solenoid scan (5.1% of the solenoid strength), a constant strength of the quadrupole corrector is sufficient to cancel the emittance growth. Figure 13 shows the measured emittance as a function of the quadrupole corrector strength and rotation angle. The figure clearly shows that the amount of the emittance overestimation due to the coupled transverse dynamics aberration depends on the strength and rotation angle of the quadrupole corrector. Moreover, the emittance measured by the solenoid scan can be made equal to the thermal emittance if the quadrupole corrector setting is chosen appropriately.  Simulated emittance correction by scanning the strength and rotation angle α of the quadrupole corrector. The emittance is normalized by the laser spot size.

VII. CONCLUSION
The overestimation of the thermal emittance due to the coupled transverse dynamics aberration in solenoid scan has been systematically studied in this paper. Two sources of aberrations that lead to emittance growth were analyzed: the quadrupole field in the rf gun followed by a solenoid, and the quadrupole field of the solenoid. Analytical expressions and beam dynamics simulations demonstrated that the emittance measured by solenoid scan is an overestimation which is very close to the quadrature sum of the thermal emittance and coupled emittance.
The overestimation effect in the solenoid scan was demonstrated with a thermal emittance measurement experiment at the AWA facility. The experiment measured the thermal emittance of a cesium telluride photocathode in the AWA drive gun, as L-band 1.6-cell rf gun. Elliptical beam images were observed on the YAG screen indicating the existence of quadrupole components in the beamline. A nonlinear curve of the measured emittance as a function of the laser spot size is observed, which shows a thermal emittance overestimation of 35% with a 2.7 mm rms laser spot size. A beam based method was used to measure the solenoid quadrupole by flipping the solenoid current direction and matching the simulation with the experimental results. Its strength is found to be 77 Gauss/m with a solenoid field of 0.1974 T and its rotation angle is discovered to be 12 • and −78 • with the two opposite solenoid current directions, respectively.
A compact and flexible quadrupole corrector is proposed to be installed at the exit of the solenoid, which will fully eliminate the overestimation effect due to the coupled transverse dynamics aberrations so as to improve the thermal emittance measurement accuracy by the solenoid scan method.