6 April 2009 JLAB-TN-09-021 First Results of Transverse Phase Space Tomography in the Jefferson Laboratory FEL Upgrade Driver C. Tennant and Y. Roblin Abstract In this note we present the first results of horizontal phase space tomography measurements at the Jefferson Laboratory FEL Upgrade Driver. Data was taken using a scanning quadrupole and a downstream viewer and the phase space was reconstructed using a maximum entropy algorithm. Tomography measurements were performed for several different machine configurations. Preliminary analysis shows good agreement between normalized emittances computed from fits of the reconstructed phase space and using the standard quadrupole scan technique. 1. Introduction We give a brief overview of tomography in general and of the specific challenges for applying this technique to charged particle beams. It turns out that in addition to the quality of the actual measurement, the choice of reconstruction algorithm used is vitally important. The primary purpose of this note, however, is to document the experimental procedure for taking measurements and to present initial results. There is good agreement between the results and simulation which leads to confidence in the measurement for future use. 2. Tomography Overview Simply stated, tomography allows the reconstruction of an object in n-dimensional space using a sufficient number of projections in (n1)-dimensional space. This technique is widely used in medical imaging; however it can also be invaluable diagnostic for characterizing charged particle beams. The premise is to reconstruct the (x,xʹ) or (y,yʹ) phase space at a specific location along a beamline using spatial projections measured at various viewing angles. These angles are generated by rotating the phase space using a variable strength lens (i.e. quadrupole). Mathematically this is expressed in terms of the Radon transform, ∞ ∞ (𝑥′) = ∫−∞ ∫−∞ 𝜇[𝑥, 𝑦]𝛿(𝑥 cos + 𝑦 sin − 𝑥′)𝑑𝑥𝑑𝑦 (1) where is a projection from the distribution [x,y] for a given angle, , taken along the path described by the delta function. Essentially, tomography is concerned with inverting Eq. (1) and recovering [x,y] from a set of projections, . An ideal measurement consists of projections that span a full 180˚. 1 6 April 2009 JLAB-TN-09-021 Applying this principle to charged particle beams, it can be shown that the Radon transform of a measured projection can be obtained through simple scaling relations [1]. A typical measurement consists of an observation point, a variable lens (either quadrupole or solenoid) and a downstream monitoring device (wire scanner or viewer). For a measured spatial projection of the horizontal phase space consisting of f(x) counts at each position, x, the required scaling is 𝑓(𝑥) → 𝑠 × 𝑓(𝑥⁄𝑠) (2) where 2 2 𝑠 = √𝑀11 + 𝑀12 (3) and the corresponding angle of the projection is given by 𝑀 𝜃 = tan−1 (𝑀12 ) 11 (4) The matrix elements M11 and M12 describe the transport from the observation point to the monitoring device. For this example we have assumed a measurement of the horizontal phase space. Equations (3) and (4) are valid for a vertical phase space measurements as well, with M34 and M33 replacing M12 and M11, respectively. With scaled projections in hand, the attention shifts to inverting the Radon transform to recover the original phase space. Some of the options available are discussed in Section 2.2. Before making a tomography measurement, two questions have to be answered: (1) how will the phase space rotations (the different “viewing angles”) be generated? (2) how will the data be reconstructed? The following two sections will give a brief survey of some possible options to answer these questions. 2.1 Generating Rotations There are at least three methods for generating phase space rotations. Ultimately, we used the third option discussed which utilizes a quadrupole scan. From scanning the available literature, it appears that the majority of other tomography measurements of charged particle beams use this method as well. Distributed Observation Points The first option is to measure projections at several fixed locations along a well defined beamline, such as a FODO channel [2]. The result is an extremely limited number of measurements. Apart from having a perfect Gaussian distribution, the resulting projections will be insufficient to reconstruct the phase space with any accuracy. Given the complex structure we observe on beam spots in the FEL Upgrade, this is not even an option. 2 6 April 2009 JLAB-TN-09-021 Phase Space Rotation The second option is to generate a pure rotation of the phase space. As a given beam distribution is transported along a beamline, the phase space not only experiences a rotation, but in general will also expand (or contract) and shear [3]. It is possible, however, to design a beamline that generates a pure rotation, preserving the shape of the phase space. Consider the general form of a unit matrix using the Twiss parameterization and equating it to a rotation matrix cos 𝜃 − sin 𝜃 ( cos ∆ + 𝛼 sin ∆ 𝛽 sin sin 𝜃 )=( ) −𝛾 sin cos ∆ − 𝛼 sin ∆ cos 𝜃 (5) From inspection it is clear that a pure rotation is achieved when 1 and = 0. If such a beamline is used, no scaling of the projections is necessary since Eq. (3) is unity if the above conditions are met. To evaluate the effectiveness of such a scheme, a beamline comprised of 10 quadrupoles was simulated that generated a full 180˚ rotation of the transverse phase space [4]. However the operational complexity involved in achieving the correct match into the beamline, among other issues, made this method undesirable. Quadrupole Scan The third and final option is to use a quadrupole scan. The setup for such a measurement was alluded to in the previous section. Typically a single quadrupole between the observation point and the monitoring device is not sufficient to generate enough rotation of the phase space to make accurate reconstruction feasible. Often a triplet is utilized, with the middle quadrupole being scanned. A schematic of this setup is shown in Fig. 1. Using this configuration in the FEL Upgrade it is possible to generate upwards of 150˚ of rotation which, together with an appropriate algorithm, is sufficient to reconstruct even fine structure in the phase space [5]. Unlike the previous method, the phase space will experience a rotation, expansion and shearing as the quadrupole is scanned. However, using the scaling relation given in Eq. (2), the rotation-only projection is obtained. (As an aside, it should be mentioned that in the low energy regime – such as an injector beamline – solenoids can be used effectively to generate appropriate rotations for tomography measurements [6]). Figure 1: Schematic of quadrupole scan setup. We use the middle quadrupole of a triplet (blue) to scan the phase space. The principle is similar to an emittance measurement. 3 6 April 2009 JLAB-TN-09-021 2.2 Reconstruction Algorithms There exist essentially two main categories of reconstruction algorithms. The first is the so-called filtered back projection method and the second are iterative algorithms. Filtered Back Projection / Fourier Techniques Filtered back projection (FBP) is a straightforward method for finding the inverse of the Radon transform it is simply a matter of “turning the crank”, so to speak [7]. In medical tomography hundreds of projections are measured over a full 180˚ range which ensures that the Radon transform gives a unique inverse. The filtered back projection method is perfectly suited for such situations. However in accelerator applications, generating a full 180˚ is difficult. Furthermore, to be useful as a diagnostic device the tomography measurement should not require a significant amount of beam time. Consequently it is desirable to keep the number of required projections to a reasonable number (e.g. less than 35). To make matters worse, when FBP is applied to an insufficient number of projections, tell-tale streaking and other artifacts appear in the reconstructed phase space. Iterative Methods Iterative methods refer to algorithms that adjust the values of the pixels in the reconstructed image until it most closely resembles the measured projections. The solution is not unique, however, and one must establish criteria for testing convergence. There are a number of such algorithms that exist. Exploring the details and relative merits of each is beyond the scope of this paper. For the results presented in Section 4 we have chosen to utilize the Maximum Entropy (MENT) algorithm [8]. The premise of the MENT algorithm is to find a reconstructed phase space “… that of all the possible distribution functions (x,y) that satisfy the observed constraints, the most reasonable one is to choose is that one that nature can produce in the greatest number of ways, namely, the distribution having maximum entropy” [9]. The algorithm is incredibly robust and ensures adequate reconstruction of fine features within the distribution even with a small number of projections and a limited range of “viewing angles” (rotations). 3. Experimental Procedure For these initial measurements, we made a deliberate choice not to automate many of the following steps. Until we felt confident with the workflow, we wanted to have control over the data at each step of the process. Note that the steps listed in this section pertain specifically to the FEL, although they can be easily generalized for a machine such as CEBAF. 4 6 April 2009 JLAB-TN-09-021 3.1 Pre-Measurement Before taking data it is important to simulate the scan and verify that a large enough rotation can be generated from a single quadrupole. Ideally the measurement would use a quadrupole in which modest changes in the strength would scan a wide range of angles. It is equally important to take into account the quality of the viewer used to measure the beam spots. (The FEL uses only viewers, but in principle wire scanners can be used to measure the projections directly). We note in passing that a quadrupole scan is not well suited for locations where the beam exhibits large energy spread as chromatic effects during the scan can result in data that is not well suited for reconstruction. We also note that if the beam is space charge dominated in the region of the measurement (i.e. the injector) then extra care must be taken as linear transfer matrices are no longer adequate to describe the transport from observation point to the viewer. Successful tomography measurements of intense beams in the presence of strong space charge forces have been made [10]. However in this note we assume space charge forces are negligible. The tomography measurements reported in this note were all taken in the 3F region backleg region of the FEL Upgrade (see Fig. 2 for machine schematic). The 3F region is comprised of 6 FODO cells thereby providing several ideal locations to do the measurement. The superior quality of the ITV3F09 viewer, however, was the driving factor for scanning the quadrupole at 3F08. Thus our observation point is immediately upstream of the 3F07 quadrupole, we scan the quadrupole at 3F08 and use the viewer downstream of the quadrupole at 3F09 to measure spot sizes (refer to Fig. 1). Simulations show that with relatively small variations (±2000 G) from the nominal setpoint of the quadrupole strength (3500 G), we can generate a significant rotation of the phase space. The ultimate goal is to span 180˚. However by employing powerful, iterative reconstruction algorithms this requirement is relaxed. Using the aforementioned parameters, we can generate an angular coverage in the horizontal plane of 157˚ (only 5˚ is generated in the vertical). Figure 3 shows the results of simulating the scan. Figure 2: Schematic of the 10 kW FEL Upgrade Driver. The tomography measurements discussed in this note were all taken in the 3F region. (Quadrupoles are represented in red. In the 3F region the leftmost is denoted as QX3F01 and continues through QX3F12). 5 6 April 2009 JLAB-TN-09-021 Figure 3: Scale factor (black) and angle (blue) for a simulated quadrupole scan using QX3F08 in the FEL Upgrade. Black markers denote nominal quadrupole strength. Note that even modest changes in the strength leads to large changes in the angle, making this an ideal measurement. 3.2 Measurement Once an adequate location and range of quadrupole strengths has been determined, the measurement with beam is straightforward and takes only several minutes (depending on the number of projections being measured). 1. Operate with tune-up beam (250 s long macropulses with a 4.678 MHz bunch repetition rate every 2 Hz) and mask the beam loss monitors. 2. Insert the 5F insertable dump to prevent the second pass beam from entering the linac. 3. Insert appropriate ITV3F09 viewer and view with the Beaminizer software (see Fig. 4) [11]. 4. Take the quadrupole off-loop and scan over the range determined during the “pre-measurement” phase while observing the beam spot: a. Verify that the entire spot remains on the active area of the viewer and is not clipped (particularly at large quadrupole offsets). b. Check that the beam does not move appreciably during the quadrupole scan. If this is not the case, the beam may require some steering upstream to center in the quadrupole. c. Check that the image does not saturate (note flat top on projections). If the image does saturate, reduce the micropulse repetition rate. 5. When the quadrupole is at the highest strength, put it through hysteresis. 6. Start measurement by saving the image (make sure no background is being subtracted on Beaminizer). 7. Reduce quadrupole strength by 100 G. 8. Repeat Steps 6 and 7 until scan is complete. 6 6 April 2009 JLAB-TN-09-021 Figure 4: Screenshot of the Beaminizer software which is used extensively in tomography measurements, both to acquire and process spot size data. 3.3 Off-line Analysis As with any new measurement, the majority of work is done off-line analyzing the data. Listed below are the major steps required in transforming the 2D arrays given by the Beaminizer describing the measured beam spots to projections that are suitable as inputs to the MENT program. 1. Extract a projection from each beam spot measurement. This is done using the Beaminizer software. In principle this step could be automated (using the SDDS Toolkit for instance), however given the importance of the initial projections on the quality of the reconstructed image, we feel it best to examine each measurement individually rather than blindly batch process the whole lot [12]. a. Load a saved beam spot measurement into Beaminizer. b. Select an appropriate background value to subtract from the image (i.e. enough to clearly define the beam but not so much so as to remove part of the beam). c. Verify that the correct scaling (i.e. m per pixel) is entered in for the particular viewer. In the FEL each viewer has been calibrated and these numbers are well known. d. Use the cursors to select a region of interest. This region should include the entire beam. The Beaminizer software then computes the projection for the selected region. e. Save projection as an .sdds file (with appropriate header) to allow easy analysis with SDDS Toolkit. The file will contain two columns, the first is the position along the viewer and the second is the counts at each location. 7 6 April 2009 JLAB-TN-09-021 2. Compute the centroid of each projection. (In the SDDS Toolkit use the command: “sddsprocess -process=center”). 3. Clip profiles of areas with no data. The beam spot measurement is written to a 2D array 640 rows by 480 columns. In most locations in the machine, the beam only appears as a small fraction of the viewer area. By reducing the number of pixels of the projections, the MENT algorithm speeds up considerably. (In the SDDS Toolkit use the command: “sddsprocess –filter”). 4. Convert each projection file to a .txt file, retaining only the counts column. (In the SDDS Toolkit use the command: “sdds2plaindata”). 5. Compute the transfer matrix for the appropriate plane (horizontal or vertical) between the observation point and the viewer for each value of the quadrupole scan. This requires accurate measurements of drift lengths between quadrupoles as well as the distance from the last quadrupole to the viewer. (There are a myriad of ways this can be done, but we note that this is a relatively easy task in Elegant using the “vary_element” command [13]). Create a .txt file with the relevant matrix elements (i.e. M11, M12, M21, M22 for horizontal phase space reconstruction). Some reconstruction algorithms require the user to pass the scale factor and angle associated with each projection (see Eqs. (2) and (3)). The MENT algorithm, on the other hand, uses transfer matrix elements to scale the projections. At this stage, we have all the information that the MENT program requires: 1. A (processed) projection for each quadrupole strength 2. The centroid offset for each projection (i.e. how much it needs to be shifted to be centered) 3. The 4×4 transverse matrix (horizontal for our measurements) for each projection At this point, all that is left to do is run the MENT program. In its current state, the program is unwieldy to use at best. Therefore, until modifications have been made to make it more user-friendly, we will refrain from offering up a step-by-step guide on how to run it. Suffice it to say that there are a number of variables that are set by user which, in the future, will be replaced with a GUI interface will allow these to be parameters to be passed rather than having to directly modify the code. The time to complete a reconstruction is a function of the number of projections used, the number of data points in each projection and the number of iterations requested. Due to the way that the algorithm is written, for a reasonable processing time, only a maximum of 30 projections can be used for any one reconstruction. Typically, projections from our measurements have 250 points. Using 10 iterations requires roughly 1 hour to reconstruct the phase space. However, we feel that this can be made considerably faster and more efficient given time to modify the code. 8 6 April 2009 JLAB-TN-09-021 4. Reconstruction Results In this section we present the results of four tomography measurements, all made in the same location, but with the machine configured in different ways. The first two measurements were performed with the injector providing the nominal injection energy (9 MeV) while the second two were performed with a lowered injector energy (5 MeV). 4.1 Injector Setup A: 8.95 MeV/c Reconstruction Before Miniphase The first tomography measurement was taken after the machine was turned on and operation with beam established, but before the “miniphase” procedure was performed [14]. The injector was set to deliver beam at the nominal 8.95 MeV/c with the linac providing acceleration to 110 MeV/c. Figure 5 shows the results of reconstruction using 30 different projections as the input and allowing MENT to iterate 50 times. The plot on the left shows the reconstructed phase space while the plot on the right shows the corresponding contour plot and the appropriate axis units. There is some evidence of a momentum tail most easily seen in the contour plot. A two-dimensional Gaussian was fit to the data and the emittance was calculated to be 15.4 mm-mrad. The Twiss parameters are also readily calculated and give a horizontal beta function of 0.5 m and alpha of 1.1. (Fitting a two-dimensional Gaussian in this instance is probably not unreasonable. In the future however, we hope to utilize more sophisticated emittance analysis techniques, such as SCUBEEx [15]). Figure 5: Reconstructed horizontal phase space as given by MENT in units of pixels (left) and the associated contour plot with appropriate scaling and cropped for appearance (right). The computed normalized emittance is 15.4 mm-mrad. 9 6 April 2009 JLAB-TN-09-021 Reconstruction After Miniphase The measurement was then repeated after the miniphase procedure was complete. The reconstructed phase space is shown in Fig. 6. Interestingly the extracted emittance increased slightly to 16.7 mm-mrad. The horizontal beta function is calculated to be 0.4 m with an alpha of 0.7. If the beam were matched into the 3F region to generate a perfectly matched FODO lattice, then one expects that prior to a defocusing quadrupole (which corresponds to the location of our observation point) the beta function to be 0.9 m with an alpha of 0.4. The extracted values are in the ballpark, particularly since we did not take the time to see how well matched we were into the 3F region. Later during the shift we measured the emittance in the 2F region using the standard quadrupole scan technique and after analysis with several different pieces of software, determined the normalized horizontal emittance to be (13.616.2) mm-mrad [16]. (The source of the discrepancy between the methods of analysis is not yet clear). Nevertheless, we have some level of confidence that similar emittance values were obtained using two different measurement techniques. Figure 6: Reconstructed horizontal phase space as given by MENT in units of pixels (left) and the associated contour plot with appropriate scaling and cropped for appearance (right). The computed normalized emittance is 16.7 mm-mrad. 4.2 Injector Setup B: 4.97 MeV/c The second set of tomography measurements occurred during a period of dedicated beam studies time in which the machine was configured to operate with an injection energy of 5 MeV. 10 6 April 2009 JLAB-TN-09-021 Reconstruction: Day 1 Figure 7 presents the reconstructed phase during the first day of this new machine setup. The calculated emittance is 15.8 mm-mrad and the computed beta function is 3.4 m with an alpha of 4.2. The presence of a long tail on the distribution is clearly visible. Manifestations of this tail were evident in the peculiar structure observed on 3F09 beam spot images (i.e. in xy space) as shown in Fig. 8. Figure 7: Reconstructed horizontal phase space as given by MENT in units of pixels (left) and the associated contour plot with appropriate scaling (right). Note that the contour plot has not been cropped due to the long tail. The computed normalized emittance is 15.8 mm-mrad. Figure 8: Beam spot (“cow-nosed ray” [17]) on ITV3F09 as viewed with the Beaminizer with nominal strength for the scanning quadrupole (3F08). Note the elongation in the horizontal dimension due to the tail on the distribution. 11 6 April 2009 JLAB-TN-09-021 Reconstruction: Day 2 After the initial rough setup, the following day was dedicated to cleaning up the match (both transverse and longitudinal) around the machine. After a first cut at cleaning things up, we repeated the tomography measurement with the results displayed in Fig. 9. The computed emittance is 10.2 mm-mrad and the beta function is 2.7 m with an alpha of 1.0. However, most importantly, the distribution has been cleaned up considerably. We had the opportunity to take emittance measurements (via a quadrupole scan) in the region upstream of the first arc entrance and using the SDDS Toolkit and Igor Pro, found the emittance to lie in the range (10.811.2) mm-mrad. These values are in excellent agreement with the results from the tomography measurement. Figure 9: Reconstructed horizontal phase space as given by MENT in units of pixels (left) and the associated contour plot with appropriate scaling and cropped for appearance (right). The computed normalized emittance is 10.2 mm-mrad. 5. Comparison with Simulation The 3F region is an ideal place to do our first measurements, particularly when it is setup as a matched FODO lattice, since the Twiss parameters can be computed analytically. So for example, at the entrance to QX3F07 (or any horizontally defocusing quadrupole) the matched beta and alpha are 0.9 m and 0.4, respectively. Using this information, along with emittance measurements we had made the same day as the tomography measurements (using a quadrupole scan), one can define a Gaussian distribution to describe the beam we observed in the machine. We then used Elegant to scan the quadrupole at 3F08 and look at the beam spot (xy phase space) at the location of the ITV3F09 monitor. We can then compare this simulated measurement with real data (see Fig. 10). The Beaminizer software is particularly useful for analysis like this since we know the calibration for each individual viewer in the machine (i.e. the length per pixel). In this way the image can be cropped to exactly the same scale as the plots from simulation. Examination of Fig. 10 shows that while the real beam exhibits more detailed 12 6 April 2009 JLAB-TN-09-021 structure than a simple Gaussian distribution, the agreement in size, shape and orientation is quite good. The final check is to plot the phase space we expect to recover using tomography. The simulated horizontal phase space at our observation point is shown in Fig. 11 which should be compared to the measurement results displayed in Fig. 6 (it is not clear whether we had a matched FODO lattice for the machine configured for 5 MeV injection). Figure 10: Measured spot sizes (top) compared to simulated spot sizes in Elegant of a perfectly matched FODO period (bottom) for several strengths of quadrupole 3F08. Figure 11: Simulated horizontal phase space at the observation point of the tomography measurements. This exhibits reasonably good agreement with the tomography results shown in Fig. 6. 13 6 April 2009 JLAB-TN-09-021 6. Summary The first results of transverse phase space tomography at the FEL Upgrade have been presented with encouraging results. The emittance extracted from the reconstructed phase space agrees well with complimentary methods of measuring the emittance. The simulated (ideal) phase space also shows good agreement with measurement. This technique provides a view of a phase space that is not captured by conventional diagnostics. Having this capability to further probe the full 4D transverse phase space is of particular interest at the FEL where the beam often shows very unique structure. Experimental studies of coherent synchrotron radiation, in particular, would benefit from this measurement. We look forward to utilizing tomography at other locations in the FEL and perhaps in the CEBAF injector as well. We have demonstrated that all the pieces are in place to do transverse tomography measurements, however to call the system “user-friendly” at this stage would be a gross exaggeration. In the future we hope to make the code more efficient, particularly in the way that it allocates memory. Additionally, we are working to streamline the measurement process. Now that we have a good understanding of the off-line analysis that needs to be performed, we are working to automate several of the steps outlined in Section 3.3. Acknowledgements We wish to thank Dave Douglas, Pavel Evtunshenko and Fay Hannon for many useful discussions regarding work presented in this note. References [1] C. McKee, P. O’Shea and J. Madey, Nuclear Instruments and Methods in Physics Research A 358, pp. 264-267 (1995). [2] G. Asova et al., Proceedings 9th International Computational Accelerator Physics Conference, pp. 194-197 (2006). [3] D. Xiang et al., Phys. Rev. ST-AB, 12, 022801 (2009). [4] Beamline design by D. Douglas (2007). [5] C. Tennant, unpublished. [6] F. Hannon, Ph.D. Thesis, University of Lancaster (2008). [7] W. Swindell and S. Webb, in The Physics of Medical Imaging, edited by S. Webb (IOP, London), pp. 98-127, (1992). 14 6 April 2009 JLAB-TN-09-021 [8] J. Scheins, TESLA Report 2004-08 (2004). [9] C. Mottershead, IEEE NS 32, 1970, (1985). [10] D. Stratakis et al., Phys. Rev. ST-AB, 9, 112801 (2006). [11] The Beaminizer software is a LabView based tool developed and maintained by P. Evtunshenko (evtushen@jlab.org). [12] SDDS Toolkit is available for download from Argonne National Laboratory. [13] M. Borland, "elegant: A Flexible SDDS-Compliant Code for Accelerator Simulation," Advanced Photon Source LS-287, September 2000. [14] The miniphase procedure is performed several times per day at the FEL and its purpose is to re-establish those phases in the machine that typically drift from their nominal setpoints. Among these phases are the drive laser phase, the phases of the buncher and two cavities in the injector quarter cryounit and the linac gang phases. David Green has written up the procedure which can be viewed at: http://opsntsrv.acc.jlab.org/ops_docs/online_document_files/FEL_online_files/Mi niPhase_Procedure.pdf [15] M. Stockli, R. Welton and R. Keller, “Self-consistent, Unbiased RootMeansquare Emittance Analysis” Review of Scientific Instruments, 75(5), 1646– 1649 (2004). [16] The emittance data was analyzed using software developed in Mathcad by P. Evtunshenko, in Igor Pro by C. Tennant and using the sddsemitproc procedure developed by M. Borland as part of the SDDS Toolkit. [17] T. Powers, private communication. 15