High dimensional characterization of the longitudinal phase space formed in a radio frequency quadrupole

Modern accelerator front ends almost exclusively include radio-frequency quadrupoles for initial capture and focusing of the low-energy beam. Dynamics in the RFQ define the longitudinal bunch parameters. Simulation of the SNS RFQ with PARMTEQ seeded with a realistic LEBT distribution produces a 2.5 MeV, 40 mA H- beam with root-mean-square emittance of 130 deg-keV. In measurement, a detailed characterization of the longitudinal phase space is made, including a novel study of the dependence of longitudinal emittance on transverse coordinates. This work introduces a new virtual slit technique that provides sub-slit resolution in an energy spectrometer as well as an approach for visualizing 4D phase space data. Through simulation and measurement, the RFQ-formed bunch is confirmed to have significant internal correlated structure. The high-dimensional features are shown to be in qualitative agreement. However, the measured rms emittances are up to 30% lower than predicted, closer to the design value of 95 deg-keV.

Modern accelerator front ends almost exclusively include radio-frequency quadrupoles for initial capture and focusing of low-energy CW beams. Dynamics in the RFQ define the longitudinal bunch parameters. Simulation of the SNS RFQ with PARMTEQ seeded with a realistic LEBT distribution produces a 2.5 MeV, 40 mA H-beam with root-mean-square emittance of 130 deg-keV. A detailed characterization of the longitudinal phase space is made, including a novel study of the dependence of longitudinal emittance on transverse coordinates. This work introduces a new virtual slit technique that provides sub-slit resolution in an energy spectrometer as well as an approach for visualizing 4D phase space data. Through simulation and measurement, the RFQ-formed bunch is confirmed to have significant internal correlated structure. The high-dimensional features are shown to be in qualitative agreement. However, the measured rms emittances are up to 30% lower than predicted, closer to the design value of 95 deg-keV.

I. INTRODUCTION
Low-level beam loss is a fact of life in high-intensity accelerator facilities. Controlling and reducing losses to maintain a safe accelerator environment is achieved mainly through online empirical optimization. One tool currently missing from the arsenal is high fidelity simulation capable of predicting these losses. As high-intensity accelerators continue towards higher demands in beam power, the need for this capability becomes more accute [1]. A strong contributor for losses in a linear accelerator is beam halo [2,3]. As the beam distribution is both the source and driver of halo particles, loss-level simulation accuracy will require an equally accurate representation of the initial distribution.
There are two approaches for generating a realistic front-end initial distribution. One is a pure "end-to-end" approach, which applies self-consistent simulation of the entire beam transport system starting at or downstream of the ion source. This may include self-consistent modeling of the ion source/extraction electrodes, abstracting to an idealized distribution in the Low Energy Beam Transport (LEBT) section, or measuring the transverse phase space of the LEBT beam. The LEBT distribution is then propagated through the radio frequency quadrupole (RFQ). The longitudinal bunch is formed inside the RFQ, where dynamics are complicated by nonlinear focusing from both the vane structure and space charge. The complexity of the simulation may limit the accuracy of output bunch, as there is large potential for errors.
Previous work at Los Alamos [4,5], found that the bunch generated through simulation of the RFQ was not sufficiently accurate to model beam dynamics in a medium-energy transport line (MEBT). Particularly, transport with mismatched optics was seen to be very sensitive to the initial distribution. In this effort, cor- * ruisardkj@ornl.gov recting the simulated bunch by rescaling to match observed rms parameters was not sufficient to reach good agreement.
Alternatively, a bunch may be generated from measurements in the MEBT, after the longitudinal bunch is fully formed but at an energy where detailed measurements are still possible. Characterization of the beam in the MEBT circumvents the need to model the complex internal RFQ dynamics, and arguably results in more a representative bunch. However, internal correlations are neglected in this approach, which typically relies on 2D projections or Twiss parameters (for example, see [6,7]). Direct measurement of the 6D beam distribution has been demonstrated [8], but for now end-to-end simulation remains the most accessible option for generating fully-correlated particle coordinates.
Knowledge of the fully-correlated distribution is necessary to accurately portray a bunched beam. As this article will demonstrate, the bunch formed in the RFQ has non-trivial internal structure. The formation of the longitudinal phase space is mediated by the space charge force, which couples the three planes [8][9][10][11]. Observations reported here show how both the bunch shape and energy profile to vary with distance from the high-density core. As core mismatch is known to excite halo growth [3,12], it is almost certain that loss-predictive simulations will require knowledge of the realistic 6D structure.
Given that simulation is the most readily available source of fully correlated bunches, one may wonder to what extent simulation reproduces the true 6D structure. If there is discrepancy in the rms predictions, can one still trust the high-dimensional features? To begin addressing this question, a detailed characterization of longitudinal phase space is compared with predictions from RFQ simulation. While the primary metric is the rms emittance, it is applied to slice emittances rather than full emittance. By varying slice dimensionality and location, the dependence of longitudinal emittance on transverse coordinates is studied. This provides a method to visualize the high-dimensional features inside the RFQ bunch.

A. SNS Beam Test Facility
The SNS Beam Test Facility is a one-to-one replica of the SNS front-end, composed of 50 mA H-ion source, 65 kV LEBT, 402.5 MHz RFQ and 1.3 meters of MEBT quadrupoles. In addition, the BTF is equipped with extensive diagnostics enabling direct measurement of the 6D phase space distribution. This phase space diagnostic includes two pairs of vertical/horizontal slits for isolation of the transverse phase space coordinates, followed by an energy spectrometer comprised of a 90 • dipole and vertical slit. Finally, time-of-arrival measurement of secondary electron emission from a beam-intersecting wire serves as a bunch shape monitor. The energy spectrometer and bunch shape monitor are used for longitudinal phase space measurements described here.
Accelerator physics studies at the BTF are motivated by the goal of demonstrating halo-predictive simulation. Ongoing efforts have followed a three-pronged approach: extensive characterization of the initial MEBT beam distribution [8], deployment of high dynamic range phase space diagnostics for halo detection, and extension of the BTF MEBT to support studies of halo evolution [13]. The work described here falls in the first category, as it addresses the applicability of RFQ simulations to highfidelity simulation.

B. Emittance Convention
With the BTF apparatus for longitudinal emittance measurement, a dynamic range in excess of 10 3 has been demonstrated. As the rms parameters can depend heavily on the threshold, it is necessary to speficy the applied threshold. In order to standardize emittance values between simulation and measurement, we adopt the following metrics for reporting emittances: • 0.1% emittance, near dynamic-range limit of measurements, with a threshold applied at 0.1% of peak density, • 1% emittance, and • 10% emittance, representing the core of the beam.
In simulation it is common to report emittances based on percentage of enclosed particles, such as 90%, 99% emittances. This is distinct from the definitions here. However, the term "100% emittance" is still used to indicate inclusion of all simulation particles when no threshold is applied.
In plots of the longitudinal phase space, positive phase corresponds to positive time. The tail of the bunch, which arrives at a later time than the head, has φ tail > φ head . This phase convention matches the convention used in RFQ simulation. space. A slice of the cube can be made along one dimension (eg,z = 0, the green volume), two dimensions (z,x = 0, blue) or all three dimensions (z,x,ỹ = 0, red).
If the 1D and 2D slice volumes are projected onto the y, z plane, they will be indistiguishable, as the slicex is along a hidden (projected) dimension.

C. Dimensionality
In addition to threshold, the reported emittances will depend on the dimensionality of the phase space used for the calculation. Typically, emittances are calculated for the fully projected phase space. That is, the (φ, w) coordinates of every particle regardless of location in transverse phase space are included. The BTF longitudinal emittance apparatus is set up to sample phase space for a slice in the transverse coordinates. This is referred to as a partially projected phase space, and the resulting emittance a partial or slice emittance. It should be immediately clear that many unique partial projections of the longitudinal phase space are possible. Slices can be made in one or several or all of the transverse coordinates, and the slices can be taken at varying distance from the beam core. Figure 1 illustrates the slice concept in three dimensions. As slices are generally made on hidden (unplotted) dimensions, it is not explicitly apparent whether a phase space plot represents a full or n-dimensional partial projection.
Therefore, when discussing slice emittances, it is important to indicate both the dimensionality (how many slices) and the slice location. Here, f indicates the full 6D phase space density f (x, x , y, y , φ, w).f indicates a partial projection, where a slice is made in at least one dimension. A tilde is used to indicate a slice of finite width. Unless otherwise specified, the slice width is equal to the width determined by physical apertures in the measurement. If coordinates do not appear as arguments or slices off , the density along that coordinate is integrated. With this notation, a partially projected longitudinal phase space representing only the particles within a finite slice centered at x = 0, x = 0 is described asf (φ, w)|x ,x =0 .   The organization of this article is as follows. Section II defines the "expected distribution," as determined through RFQ simulation. After that, the measurement technique is introduced in Section III, including accouning for the dominant error sources. The largest error is shown to be through point spread in the phase coordinate. Correction of the point spread error is justified through simulation and application of a virtual slit measurement. The high dimensional characterization of longitudinal phase space is reported in Section IV. The results show the dependence of the longitudinal slice distribution on RFQ amplitude and transverse coordinates. Finally, Section V summarizes the comparison between the expected and measured distributions.

A. RFQ output distribution
Original design studies for the SNS RFQ used the Los Alamos code PARMTEQ [14]. The RFQ accelerates H − from 65 kV to 2.5 MeV, achieved with vane voltage 83 kV and 449 cells. Additionally, the design is constrained to produce ≤ 95 keV-deg at maximum current output. This goal was met with normalized input emittance 0.2 mm-mrad and simulation transmission > 90% [15][16][17]. In this paper, the PARMTEQ simulation is repeated with an input beam based on LEBT measurements.
The PARMTEQ space charge calculation uses the SCHEFF module with a cylindrical geometry. Saturation of the PARMTEQ simulation was judged by the rms Twiss parameters of the output bunch. 40,000 particles and a grid spacing of 10 radial segments and 20 longitudinal segments was sufficient. However, for the results reported here up to 5,000,000 macroparticles are used. The higher particle number was necessary for good statistics when calculating rms emittances for high-dimensional slices.
The input beam is initially mono-energetic with w ≡ T − T 0 = 0 for all particles, and initial uniform random phase. The transverse distribution is generated from measurements of the horizontal and vertical phase space distributions in the LEBT. These measurements were acquired in 2012 for ion source output of 50 mA. The measured distribution is transformed from the measurement plane to the RFQ entrance using a matrix equations. The resulting transverse phase space distributions are plotted in Figures 2a and 2b. The rms Twiss parameters are reported in Table I.
As the motivation of this study is to address the role of RFQ simulations in high-fidelity modeling, the measurement-based LEBT distribution is used to generate the expected distribution, under the assumption that this is the most likely to resemble the actual beam parameters. However, comparison to equivalent transverse FIG. 3: Dependence of calculated longitudinal emittance on width of the slice in coordinates (x, x ) centered at (0, 0). Width is expressed as fraction of particles that fall within the slice. Curves are normalized to the right-most point, which correspond to 100% emittances reported in Table II. A correlation-free 6D Gaussian is included to illustrate the effect of particle noise in the narrowest slices.
waterbag and KV distributions give an indication of possible spread in values due to uncertainty of initial distribution. Equivalent is defined as having identical rms Twiss parameters. Table II compares the rms Twiss parameters for the realistic LEBT distribution against equivalent 4D waterbag and KV distributions. For the realistic input distribution, the 100% rms emittance is z = 127.1 deg-keV. The rms widths of the fully projected distribution are φ rms = 10.6 • and w rms = 12.2 keV . The longitudinal distribution at RFQ exit for the realistic LEBT distribution is shown in Figure 2c. From this figure, it is apparent that the longitudinal phase space is very far from Gaussian and likely has complex internal structure as well. Figure 3 illustrates the relationship between slice and full emittance by plotting the dependence of the rms longitudinal emittance on the width of a transverse (x, x ) slice centered over the beam core. The narrowest slices (left-most points) have widths comparable to the measurement resolution,x = ±0.1mm andx = ±0.2mrad. The output bunch formed for three different intial distributions have very complex structure compared to a Gaussian beam, which would appear as a straight horizontal line. In the waterbag and KV case, the emittance of the core slice is 10% lower than the full emittance. In the realistic case, for which the initial bunch resembles a Gaussian with heavy, nonlinear tails, the core slice is very similar to the full emittance but there are still distinct features. For all distributions, the emittance of an arbitrary slice should not be assumed to be representative of the full emittance.  The BTF measurements are made with respect to a plane 1.36 meters downstream of the RFQ. The reference point is the location of the first vertical slit used in the phase space measurement. After this point, at least 98% of the beam is intercepted. In the remaining 2% "beamlet," there should be no contribution from space charge on the beam evolution, and downstream measurements can easily be mapped to this plane via matrix equations. For the purposes of comparison, it is considerably more straighforward to propagate the self-consistent 6D Parmteq distribution to the measurement plane than back-propagate the measured phase space. With this in mind, the expected distribution is defined as the output from Parmteq simulation seeded with the initial measured LEBT distribution at the plane of the first slit in the emittance apparatus.
Modeling of the MEBT is done with the particle-incell code PyORBIT [18]. Between the RFQ and the first slit, the MEBT contains four quadrupoles. A hard-edged model was used, with parameters listed in Table III. A stepsize of 1 cm is used for the space charge calculation.
The expected distribution at the measurement plane is plotted in Figure 4. For the fully projected phase space,  Dependence of rms quantities of expected distribution on dimensionality of phase space slice. All slices are centered over the beam core. rms values are calculated with 1% threshold applied. For these results, the RFQ simulation is seeded with 5,000,000 particles to obtain good statistics in high-dimensional slices. The slice widths are twice as large as in measurement for the same reason.
the 100% rms emittance is z = 131 deg-keV and the rms widths are 5.6 • and 24 keV. The phase width is reported for the "shear-corrected" frame, where the linear phase correlation has been subtracted. For comparison, the uncorrected phase width at this location is 43 • . The bunch has significantly different aspect ratio than at the RFQ exit (10.6 • and 12.2 keV) due to space charge driven debunching in the first 20 cm of transport [19]. This causes the energy spread to increase by ∼ 2× and the phase width to decrease by ∼ 2×. Table IV compares the 1%-thresholded emittance and rms widths for slices of different dimensionality in the expected distribution. The rms emittance does not have a strong dependence on the dimensionality of the slice. In the context of measurement, the variation in emittance values is comparable to the uncertainty in measurement, which will be shown to be around 10 − 15%. As such, the measured values of core-slice emittances are expected to be very near the fully projected emittance. Also apparent in Table IV is that the energy/phase aspect ratio increases with dimensionality. The space charge driven debunching is amplified in the high-density core, which is preferentially included in centered, high-dimensional slices. For this reason, the rms energy spread becomes larger and the rms phase spread smaller for core slices when compared to the fully projected phase space. Figure 5 shows the dependence of the expected energy profilef (w) = dφf (φ, w)| x on the dimensionality of a slice in transverse dimensions. This illustrates the increase of rms energy width reported in Table IV as well as the presence of very non-Gaussian internal structure. This structure strongly resembles with the initial observation of high-dimensional correlations reported in [8].

III. APPARATUS
The apparatus for longitudinal emittance measurement at the SNS BTF is a combination of an energy spectrometer and bunch shape monitor. This apparatus employs a dipole-slit system to isolate a narrow band of energy, followed by a bunch shape monitor to measure the phase distribution. The apparatus was first described in [8], where it was utilized in measurements of the full 6D distribution. Figure 6 shows the transverse optics used during measurements. Energy selection is made after a 90 • dipole, located around s = 3 meters in Figure 6. Upstream of the dipole, two vertical slits select thin slices in x and x . This ensures a very narrow beam enters the dipole, such that the horizontal spread at dipole exit is created mainly by the beam energy spread. A third vertical slit downstream of the dipole blocks all but a thin slice in the energy distribution. All slits are the same width. The width of the third slit is measured to be 0.17 ± 0.02 mm. The energy selected by the third slit is a function of the dipole current and the location of the upstream slits. This function is calculated via matrix transformation.
After energy is selected, the beamlet travels through an additional two quadrupoles to the bunch shape monitor (BSM). The BSM is comprised of a 200 µm-wide horizontal wire that intersects the beam. This wire emits secondary electrons, which are collected and focused onto a microchannel plate. Between the wire and plate, an rf deflecting field streaks the beam so that vertical position at the plate corresponds to time-of-arrival. The microchannel plate amplifies the electron signal which is then imaged via a phosphor screen and camera. The signal at the BSM camera is the partial phase distributionf (φ)|x ,x ,ỹ2 , representing the fraction of beam selected by the vertical slits and BSM wire. Thanks to the sensitivity of the BSM screen and the high bit depth of the BSM camera, a signal-to-noise ratio of 10 3.22 was achieved. The BSM concept is explained in more detail in [13,20,21].
By varying the energy selected by the third slit, the phase spacef (φ, w) can be reconstructed. The central slice emittancef (φ, w), which includes the peak density value, is shown in Figure 7. In this measurement, phase space is sampled with stepsize ∆w = 0.3 keV. The phase space ellipse is upright in the shear-corrected frame in which the linear φ − w correlation is subtracted. A. Dimensionality of measurement Due to selection by upstream slits and the BSM wire, the measuredf (φ, w) phase space is a partial projection based on only a fraction of the total phase space volume. As shown above in Figure 3, for the expected distribution the core emittance could be as much as 10% lower than the full rms emittance. The partial projection measured with BTF longitudinal emittance apparatus is: Notice that the vertical coordinates are in a frame y 1 , y 2 rather than the standard y, y . At the BSM location, the vertical slice that is selected isỹ = y wire ± ∆y. However, the horizontal coordinates are referenced to the location of the first vertical slit, which is upstream of the BSM wire by 2.2 meters, four quadrupoles and one 90 • dipole. The slice made by the BSM wire is rotated in the y, y phase space at the reference plane.  Figure 8 shows the vertical phase space of the beam at the first slit location, measured using a slit-scan approach. The shadow of the BSM wire is visible.
Because the longitudinal emittance apparatus images a 3-fold slice in the six-dimensional phase space, a fivedimensional scan is required to measure the emittance of the "full" beam. However, a five-dimensional scan with high dynamic range and reasonable resolution would have a very long duration. The measurements have an effective repetition rate of approximately 2.5 Hz, which is half the beam repetition rate. At each point in the camera image f (φ) is averaged for 20 shots in order to improve dynamic range. Sampling the phase space on a grid of size 14 x 14 x 14 x 40 in (y 2 , x, x , w) would take an estimated 9 days of continuous measurement. Instead, this paper takes the approach of conducting four-dimensional scans, iterating over coordinates (x, x , w). A 4D scan requires approximately 16 hours. The dependence on the fifth coordinate, y 2 , is explored by repeating the 4D scan over a range of BSM wire positions. The profiles plotted are obtained with a much wider slit (1 mm) than the standard 0.2 mm slit used for emittance measurements, and the phase profile nearly fills the camera frame. The heavy black line is the differential profile, which recovers two narrower profiles corresponding with the the two edges of the wide profile.
B. Accounting for point-spread increase to measured phase As noted in Section II B, space charge defocusing causes a narrowing in phase downstream of the RFQ. This brings the phase width close to the phase resolution of the measurement. The phase resolution is not limited by the resolution of the BSM, but by the point spread function originating from the finite slit widths.
Point spread is a systematic, asymmetric error that acts to inflate the measured rms values. While the total point-spread is the combination of the three vertical slits, BSM wire and internal BSM electron focusing, the dominant contribution is the width of the third (energy) slit, which affects measurement of both phase and energy. Table V summarizies the rms point spread widths, as well as systematic uncertainty originating primarily from uncertainty in calibration curves. As seen in Table  V, the rms phase point-spread is much larger than the uncertainty, and comparable to the expected rms width 5.6 • . The origin and calculation of errors are discussed in more detail in Appendix A.
The majority of the 3.3 • point-spread is due to the large φ − w correlation at the BSM plane. For the se-  Figure 7 is included, for which the "true" values are not known. The separation between emittance values at the same phase width is due to the difference in energy widths, which vary between 20 keV and 26 keV.
lected energy slice, the measured phase profile will be wider than the shear-corrected profile that the apparatus is intended to measure. In comparison, the effect of the energy point-spread is negligible, as the estimated 0.6 keV rms energy spread selected by the 0.2 mm slit is much smaller than the 23 keV expected width. While future improvement may be possible through installation of a narrower slit, given the present limitations of the apparatus it is necessary to estimate the correction to the point spread on the measured rms phase width. For a Gaussian distribution and point-spread function, the inflated rms values can be corrected through subtraction in quadrature, e.g. φ 2 = φ 2 meas. − φ 2 p.s.f. . However, both the expected distribution described in Section II B and the point-spread function have significantly non-Gaussian features. Therefore, in this analysis correction to the rms values is estimated on the basis of simulated and measured recovery of the "true" phase width, which suggest a much smaller correction than estimated through propagation of Gaussian errors.
In simulation, the point spread error is esimated by propagating the expected distribution through a PyOR-BIT model of the longitudinal phase space apparatus, including all three slits as shown in Figure 6. Details of the approach are included in Appendix B. In measurement, it is possible to obtain sub-slit phase resolution through application of a novel virtual slit method.
The virtual slit method requires collecting two phase profiles separated by a differential step in energy slit po-(a) Measured slice emittance compared to fully-projected simulation emittance. Both calculations apply 1% threshold.
(b) Measured vs. simulated transmitted current. As the RFQ has degraded transmission, and the ion source was producing less than 50 mA at the time of measurement, the simulated current is rescaled to saturate at the same output current. sition and subtracting one from the other. The difference waveform includes peak and an anti-peak aligned with the leading and trailing edges of the phase profile, as illustrated in Figure 9. The difference profiles correspond to the phase profile of a beamlet selected by a virtual slit of width equal to the step size. The technique is analagous to the use of scrapers in beam profile measurements, in which transmission is measured as a function of scraper position and differentiated to recover the spatial profile. As the technique doubles data collection time and reduces dynamic range, it is not applied to the measurements reported in Section IV. More details on the implementation of the virtual slit technique are discussed in Appendix C.
Comparison of the "true" to "measured" rms values in both simulated reconstruction and virtual slit measurement allows determination of an appropriate correction factor. In this case, a multiplicative correction to the rms phase, energy and emittance reduces the systematic, point-spread error to well within the uncertainty interval. As expected, the point-spread function has a relatively small effect on the near-flat-topped energy distribution: the "true" rms energy width was roughly 95% the raw "measured" width in both simulation and experiment. The correction to phase width is larger, as expected. Additionally, the required correction has a threshold dependence; as more tails are included in the rms calculation, the relative point-spread error is smaller. At 1% threshold, a correction factor of 87% minimizes the residual error in simulation and experiment. At 10% threshold, the corrected value decreases to 83% of the raw width. There is not enough dynamic range in simulation (limited by particle count) and measurement (limited by virtual slit method) to recommend a correction at the 0.1% threshold. For the analysis here, the same 87% correction factor is applied to the 0.1% threshold values. Figure 10 illustrates the magnitude of the rms phase and emittance correction against the "true" error. The one-sigma uncertainty interval is plotted as well; the uncertainty on emittance is estimated by Gaussian error propagation of Table V values under the assumption z ≈ ∆φ∆w. (This is valid in the upright, shearcorrected frame as apparent from rms values in Table  IV.) Applying the estimated corrections to the measured slice emittance shown in Figure 7 Here and in all further reported emittance values, the point-spread correction is explicitly stated.

IV. MEASUREMENTS
Measurements of the longitudinal emittance, which as described above represents a high-dimensional slice in the transverse phase spaces, are repeated many times to map the dependence on several parameters. First, emittance is measured over a range of RFQ voltages, which is a free parameter that may be set to obtain minimum output emittance. Second, a four-dimensional scan is used to map dependence of the emittance on the transverse dimensions. This is then integrated to reconstruct the lower dimensional partial projectionf (φ, w)|ỹ 2 . Finally, the 4D scan is repeated for several BSM wire locations, to measure dependence on the coordinateỹ 2 . Measurements

A. Dependence on RFQ amplitude
The longitudinal phase space is determined by the RFQ parameters. Particularly, the RFQ vane voltage may be tuned to produce the optimal (minimal) output emittance. For each voltage amplitude, the slice emittancef (φ, w)|x ,x ,ỹ2 is measured for a fixedx,x ,ỹ 2 slice. The slice center in each dimension is chosen to be near the peak density. Figure 11 shows the result of varying RFQ amplitude on longitudinal slice emittance as well as the transmitted current, measured on a Faraday cup positioned after two 90 • dipoles. The raw emittance values are corrected and uncertainty assigned according to the correction described in Section III B. Simulated values of the full emittance at the RFQ exit are included for comparison, for both the realistic LEBT and rms-equivalent waterbag initial distributions. For these simulations, 40,000 macroparticles are used.
While the simulated vane voltage is applied exactly, the test-stand voltage is not measured. Instead, the constant of proportionality between setpoint and vane voltage is chosen for maximum overlap with the simulated curves. Relative vane voltage is with respect to design value of 83 kV. The minimum measured emittance occurs at relative amplitude 0.96, corresponding to simulation amplitude 80 kV. The RFQ amplitude is set to relative amplitude 0.96 for the all measured results reported here. The simulated voltage is 83 kV unless otherwise indicated.
The measured 1% emittance is significantly lower than expected for most voltages, particularly near the setpoint with lowest emittance. The predictions of waterbagseeded distributions agree well with measurement for relative voltages near and below 1. However, the increase in measured emittance at high RFQ voltage is not reproduced in either simulation. There is agreement in the sharp emittance increase at low voltages, that coincides with formation of a low-energy tail.

B. Integrated 4D emittance
As described above, the technique for measuring longitudinal emittance requires making three slices of the 6D distribution in the transverse dimensions. Therefore, the measured longitudinal phase space represents a threeway slice in phase space,f (φ, w)|x ,x ,ỹ2 . In order to reconstruct the integrated emittancef (φ, w)|ỹ 2 , a 4D scan over variables (x, x , φ, w) is performed.
The 4D scan is programmed as a nested loop of the three actuators that select the three dimensions (x, x , w). These are the first two vertical slits and the dipole current: (x 1 , x 2 , I). The sliceỹ 2 was chosen to give the peak signal strength at the BSM, which corresponds to FIG. 13: Dependence of longitudinal emittance on position of BSM wire. The rms emittance is calculated for three threshold levels for both the 1D slicê f (φ, w)|ỹ 2 (shown with errorbars) as well as 3D slicê f (φ, w)|x ,x ,ỹ2 (square points without errorbars) at fixed locationx,x ∼ 0, y 2 ∝ BSM wire.
the BSM wire bisecting the core of the beam. Figure  12b illustrates the resolution of the 4D scan in transverse phase space by plotting the partial projectionf (x, x )|ỹ 2 . The minimally-processed 4D scan data is shown in Figure 12. Each sub-plot in Figure 12a is the phase spacê f (φ, w)|x ,x ,ỹ2 for a point in x, x , y 2 space, corresponding with the scatter points in Figure 12b. Figure 12c shows the same data integrated over x and x to construct the 1D partial projection,f (φ, w)|ỹ 2 . In addition to integration, significant processing of the data has been done, including thresholding, correcting for variation in microchannel plate response and slow drifts in phase and RFQ output current. The output current over the 15.3 hour scan duration was on average 20.5 ± 0.1 mA. The emittance of the 1D slice with 1% threshold is 121−20±12 deg-keV. This can be compared to the emittance for the central frame only, 126 − 22 ± 14 deg-keV. As expected from realistic simulations ( Figure 3, Table  IV), the emittance of a 3D core slice is very close to the emittance of the lower-dimensional 1D slice.

C. Dependence on vertical slice
The integrated 4D emitttance shown in Figure 12 is still a partial projection, due to the intersection of the BSM wire with the vertical phase space. Dependence on the BSM wire location is measured by repeating the 4D scan procedure at different wire positions. Figure 13 shows the resulting rms slice emittances forf (φ, w)|ỹ 2 andf (φ, w)|x ,x ,ỹ2 versus wire position. BSM wire position is reported in terms of distance from beam center at the plane of the wire. The center is determined to be the BSM wire position with the highest recorded signal intensity, with a precision ±0.25 mm.
There is a clear trend of lower emittances in the 1D y 2 slice near the core compared to edge slices. For the 0.1% and 1% emittances, the emittance of the high-  dimensional slicef (φ, w)|x ,x ,ỹ2 is within error-bars of the single-slicef (φ, w)|ỹ 2 emittance, reinforcing the observation that the core slice emittance has low dependence on slice dimensionality. This breaks down at the 10% threshold, where the high-dimensional 3D slice emittance is noticeably lower than the 1D slice and has a flat dependence on transverse position.

V. COMPARSON OF MEASUREMENT TO SIMULATION
The purpose of this study was to evaluate the degree of confidence that can be placed on predictions from "endto-end" acccelerator models that include RFQ dynamics. The method is to compare a measured beam distribution with output from RFQ simulations, using both rms values and internal structure as metrics. In general, the measured rms emittance was 20-30% lower than expected, a discrepancy that exceeds the 1σ uncertainty. This was illustrated in the previous sections in the comparison of RFQ voltage dependence ( Figure 11). In this case, RFQ simulation seeded with a "less realistic" waterbag distribution was a better predictor of the output emittance. More detailed comparison to the expected distribution, shown in Tables VI and VII, shows that this discrepancy persists at all threshold levels. This is FIG. 14: Dependence of measured (blue curve, with uncertainty interval) and simulated slice emittances (black curve) for slicex,x ,ỹ 2 = 0. The correction to point-spread error is applied to measured values.
visualized further in Figure 14.
Although the rms emittances were not reproduced, there was qualitative agreement of the internal, highdimensional bunch structure. In measurement, the emittance of a core slice in y 2 was shown to be lower than the edge slices by ∼ 30 deg-keV (shown in Figure 13). In analysis of the 4D scan data, the same convex dependence can be seen along coordinate x , but not x. Along x, the emittance monotonically decreases with distance from core. The same general behavior is seen in the expected bunch, as plotted in Figure 15. However, despite similar transverse rms parameters between simulation and experiment, the scale of this feature does not agree; while the width of the simulated feature is ∼ 2σ, in measurement it is closer to 0.5σ, where σ is the rms width in transverse coordinate.
As previously discussed, the rms emittance has a weak dependence on dimensionality. In addition, the shape of the high dimensional profiles are in qualitative agreement. Figure 16 compares the measured 1D and 3D partial energy projections against simulated distributions. The general shape is reproduced, particularly for the 3D slice profile which is lop-sided with a peak on the low energy side. Fine-tuning of the energy width can be done by adjusting the current in simulation, as the initial headtail deceleration is driven by space charge. However this effect cannot explain the emittance discrepancy, as this process does not lead to significant emittance growth.
Finally, one prominent feature not recreated in simulation is the tail trailing the main bunch. This feature is very visible, for example in Figures 7 and 12c. The tail is included in the 1% and 0.1% emittance calculations, but excluded when a 10% threshold is applied. This can be seen in the emittance curve in Figure 14, where a slight knee is visible just under the 10% threshold level. The amplitude of the tail diminishes with RFQ amplitude; it is possible this is an artifact of non-optimal RFQ voltage that may vanish completely at a higher setpoint. The left-most plot shows emittances for a 1D sliceỹ 2 . The measured points are the same as shown in Figure 13. The remaining two plots show emittance for the 3D slicẽ x,x ,ỹ 2 . In the middle, the center of slicex is varied while keepingx,ỹ 2 = 0. On the right, the center of slicex is varied forx ,ỹ 2 = 0. Distance from core is normalized to rms beam width, to account for difference in simulated and measured transverse beam size.
FIG. 16: Comparison of partially projected energy profile for measurement (solid lines) and simulation (dashed lines) for 1D (left plot) and 3D (right plot) slices. Here, y 2 ≈ y is approximated.

VI. DISCUSSION
The question driving this research is: what is the best strategy for defining an initial distribution, particularly when high accuracy for loss-level predictions is desired? As seen, the output bunch from the RFQ includes significant internal structure. The end-to-end simulation approach provides a high degree of information, both in terms of resolution and interplane correlations. However, the complexity of RFQ dynamics means that small errors may result in large discrepancy, as seen here with the rms emittance. A measurement-based approach avoids this drawback, but with the challenge of typically lower resolution and dimensionality.
In this study, the simulated longitudinal rms emittance was sensitive to the initial LEBT distribution, to a degree that exceeded the measurement uncertainty. Interestingly, the measured emittance was nearest the predictions from an idealized 4D waterbag. The "most realistic" PARMTEQ simulation, based on measured LEBT distribution, predicted rms emittances 20-30% larger than measured. This is consistent with errors typically seen in RFQ benchmarking (eg, [22,23]), and is an improvement on the 80% discrepancy found with independent measurements in the SNS MEBT [24], but is still unsatisfactory. Despite the discrepancy, the simulation qualitatively reproduced the observed high-dimensional structure.
The failure to achieve rms-level accuracy is likely due to errors in the simulation parameters, which may be amplified by nonlinear effects in the RFQ. The most likely source of error is the LEBT distribution, which was created from quite an old measurement. A better understanding of this distribution, particularly the variability during operation and between source changes, may allow for better agreement.
Another candidate is the simulated beam current, which operationally was significantly lower than the design value. The realistic LEBT distribution was measured at 50 mA, and this was used as the input current for PARMTEQ simulations. However, at the time of measurements, the LEBT current was measured to be near 40 mA. In addition, the transmission of the BTF RFQ is significantly lower than the design value. During these measurements it was operating around 60%, compared to ≥ 82% seen in simulation. Through combination of these effects, the measured current in the MEBT is about 50% less than the current of the expected bunch. While this discrepancy may account for some differences in the core structure, the simulated rms emittance was not seen to depend strongly on the input LEBT current. In MEBT simulations, the energy-phase aspect ratio increases with space charge but the rms emittance has a flat dependence.
Finally, as mentioned the RFQ vane voltage is not precisely known, and likely contributes a systematic error to the simulated value. As discussed in the previous section, a lower-than-optimal operating voltage can account for the presence of tails in the measurement. It is also possible operating at a higher RFQ voltage may also result in better agreement in rms emittance, as the measured voltage dependence shows an increasing trend at higher voltages. This will be addressed in future studies, through implementation a non-intrusive bremsstrahlung voltage diagnostic [25].
Another limitation of this study was the phase resolution, which is too low to accurately measure the beam phase profile. The system was originally designed on the basis of the output from RFQ simulations, which as shown in Section II A has nearly equal aspect ratio. However, due to space charge defocusing in the first meter of the MEBT, the longitudinal bunch rapidly elongates in phase space. At the plane of the BSM the phase profile is considerably narrower than at the RFQ exit. The experiment resolution can be improved by either decreasing the width of the energy slit or reducing the linear φ − w correlation at the energy slit location via installation of a rebunching cavity upstream of the BSM.
As beam halo mitigation becomes a more pressing matter for high-intensity accelerators, the demand for predictive accelerator models will grow. As such, the question of generating realistic and representative distributions needs to progress beyond rms equivalence and 2D characterization. For planned studies in halo evolution at the SNS BTF, agreement with dynamic range ≥ 10 4 is sought. The bunch produced via PARMTEQ simulation does not benchmark at the 10%-0.1% threshold level, and therefore is not trusted to deliver good halo predictions. Ongoing work is focused on generating an initial MEBT bunch on the basis of direct 6D measurement.
Full 6D characterization is still an impractical solution for wide application. As such, RFQ simulations will continue to be a powerful tool for generating fully-correlated distributions. From previous efforts, rescaling bunch coordinates to match measured rms widths may not be enough for predicting downstream evolution [5]. Looking forwards, the need for improved simulation accuracy will require more sophisticated strategies for generating distributions. This will entail reconciling simulated 6D coordinates with both low-and high-dimensional measurements, and extending the metrics for achieving agreement beyond rms equivalency.

A. Acknowledgments
The authors acknowledge the contributions of Brandon Cathey, who not only authored the initial high dimensional beam study [8] but also the data collection software used for the 4D characterization reported here. The authors are also grateful for the assistance of SNS operations, whose personnel monitored data collection during long study times. This manuscript has been authored by UT-Battelle, LLC under Contract No. DE-AC05-00OR22725 with the U.S. Department of Energy. This research used resources at the Spallation Neutron Source, a DOE Office of Science User Facility operated by the Oak Ridge National Laboratory. The United States Government retains and the publisher, by accepting the article for publication, acknowledges that the United States Government retains a non-exclusive, paid-up, irrevocable, world-wide license to publish or reproduce the published form of this manuscript, or allow others to do so, for United States Government purposes. The Department of Energy will provide public access to these results of federally sponsored research in accordance with the DOE Public Access Plan(http://energy.gov/downloads/doepublic-access-plan). There are many potential sources of error. These can be separated into four categories by origin, ordered by effect on the measurement: 1. Resolution in energy and phase, determined by the physical width of the three slits as well as the phase resolution of the BSM.
2. Calibration errors, which are applied in the calculation of energy and phase coordinates. This uncertainty is determined by the variance of a linear least squares fit of the calibration data.
3. Model geometry, including uncertainty in path length and strength of magnetic elements, used in the calculation of energy. This includes uncertainty in machine readbacks such as slit position and dipole current. largest term is the width of the third (energy) slit. The energy point-spread is relatively small: 0.6 keV compared to the rms width 23 keV of the expected distribution. However, for the phase coordinate the relative error is much larger. The main contribution to phase spread comes from two sources: the finite width of the energy slice and the electron optics in the BSM. The pointspread of the BSM can be directly measured by disabling the BSM RF deflector and recording the image of the BSM wire. The measured rms width of the internal BSM point-spread is 0.9 • .
The energy spread contributes to phase spread at the BSM through time-of-flight. For a collection of particles with rms energy spread 0.6 keV originating at the same phase in the plane of the energy slit, the phase spread at the BSM will be 0.5 • . However, there is an additional, larger point spread effect due to the fact that at the energy slit the bunch is already highly correlated. Therefore, the projected phase width is significantly wider than the phase width of a monoenergetic slice. This effect is illustrated in Figure 17, which is generated through PyOR-BIT simulation of the expected distribution to the energy slit. The 100% rms phase width is 5.8 • , but through projection of the correlated phase space, the apparent width increases to 6.6 • . Assuming Gaussian phase distribution and point spread function, the rms width of the pointspread from correlation is estimated to be 3.5 • . Adding the three sources of phase spread in quadrature, the total rms point-spread is 3.3 • , roughly half the expected width.
Calibration errors make the next largest contribution and dominate the calculation of systematic uncertainty. This includes calibration of dipole strength (−1.009 ± 0.006 mm/A relative to motion of the beam at the energy slit) and conversion of BSM camera pixels to arrival phase (0.167 ± 0.008 degrees/pixel). These uncertainties grow linearly with distance from the central phase and nominal dipole current. At the rms width of the expected distribution w = 23 keV, δw = ±0.4 keV and at φ = 5.6 • , δφ = ±0.6 • .
Finally, uncertainty in the model geometry used to calculate beam energy has a negligible effect on calculated errors. Variations in the BTF beam and measured signal also have a negligible contribution. The effect of jitter (item 5) is reduced through averaging, and the overall statistical uncertainty is low. Slow variations, including drifts in phase, RFQ output current ( Figure 18) and BSM micro-channel plate response, are corrected before emittance is calculated.
Assuming that the calibration errors are independent, they can be summed in quadrature to estimate the uncertainty in the measured emittance. The same can be done for the systematic error of the point spread function. In the approximation z ≈ ∆φ∆w, the error propagates as The analytic error estimate is based on the assumption that thef (φ, w) distribution and point spread functions are Gaussian, which is very much not true. In order to more carefully estimate the systematic error due to finite slit widths, the longitudinal emittance measurement was reproduced with PyORBIT simulation. The expected distribution from the RFQ is tracked to the location of the BSM wire, with slit apertures applied as in measurement. The first two vertical slits are centered atx = 0 ± 0.1 mm,x = 0 ± 0.2 mrad. The simulation is repeated for different positions of the third (energy) slit, at a spacing of ∆w = 0.25 keV. Just as in measurement, the emittancef (φ, w) is reconstructed by combining these phase distributions. The selection of vertical phase space at the BSM wire is not included, as should have a negligible effect on the point spread error.
The expected distribution, generated through RFQ simulation with 5,000,000 particles, is resampled back to 5,000,000 to after the first two slit aperatures. This number is chosen to maintain good particle statistics in phase space slices. For a slit positioned at the density peak, only about 2% of particles pass through. The resampling results in slight artifical growth of the longitudinal emittance at each slit (about 1% at each). This is smaller than the point spread effect.
The reconstructed distribution is compared to the longitudinal distribution in the plane of the first vertical slit in Figure 19. No significant space-charge influenced evolution of the longitudinal emittance is expected between this location and the BSM. The broadening of the distribution due to finite slit width is apparent, particularly in the phase width.
Appendix C: Sub-slit resolution with virtual slit As established, the largest error in the emittance measurement is due to the point spread associated with the finite width of the energy slit. However, it is possible to obtain a higher resolution that overcomes the physical limitations of the existing apparatus, without the need to manufacture and install narrower slits. This is done by creating a virtual slit from two phase profiles separated by a differential step in slit position. The step size must be smaller than the physical slit width for enhanced resolution. As in the typical emittance measurements, the dipole current is varied rather than actuating the energy slit. This is particularly beneficial for the virtual slit measurements, as the dipole current can be set with higher precision (±0.005 A, equivalent to 0.005 mm response at energy slit) than the slit actuator position (±0.02 mm). A virtual slit spacing of 0.05 A (0.05 mm) was found to be sufficient in both simulation and measurement. In application of the virtual slit reconstruction on simulated data, the recovered phase width plateaued for slit separations ≤ 0.07 was within 5% of the "base truth" phase width. In measurement, the recovered phase width appears to plateau at 0.05 A separation. Figure 20 compares the measured rms phase widths at 1% threshold for a range of energies (plotted as dipole current). Phase width is calculated both with and without application of the virtual slit technique. The reconstructed phase profiles are significantly more noisy, byt on average (for all profiles measured in this data-set), the reconstructed width is equal to 83% of the measured width without correction (shown in the figure as a solid line). Table VIII compares rms for a "typical" phase space measurement with the reconstruction using the virtual slit technique. Note that there is still uncorrected pointspread from the internal BSM optics, but at rms 0.9 • this leads to a much smaller error than from the energy slit.