Single-shot reconstruction of core 4 D phase space of high-brightness electron beams using metal grids

This paper details the development of a single-shot diagnostic technique for the 4D average and core phase space densities of low-charge, high-brightness electron beams, based on the analysis of shadow point-projection images of metal grids. This technique is similar to the standard pepper pot method, although it allows much greater transmission of the beam and therefore is more suitable for low-charge electron beams. Transverse coupling terms are included in the analysis, allowing the complete 4D transverse beam matrix to be reconstructed. The 4D beam phase space information is extremely important for the characterization of nonround beams. An analysis of the resolution limits and experimental benchmarking of the technique with pepper-pot emittance measurements are presented.

Using flat-beam transform techniques, it is possible to repartition the initial phase space volume with arbitrary ratios between the two transverse phase planes [12].In combination with longitudinal-to-transverse emittance-exchange beamlines [13], these phase space manipulation methods allow full control in tailoring the 6D beam phase space distribution to the intended application [14].Conversely, when round beams are desired, spurious field components in the gun or solenoids could introduce unwanted correlations in the beam phase space [15,16].These correlations, whether desired or not, mean that standard techniques of measuring projected emittances cannot be applied in these cases and a full 4D beam characterization is required instead.
In addition, distortions of the beam distribution are possible due to nonlinearities in the beam transport.In most cases the beam quality can vary greatly within the beam phase space, which is manifested in large differences between the rms beam brightness and the maximum of the core phase space density [17].For some applications, especially those requiring low charge, it is possible to intercept the beam with a cleaning aperture, significantly improving the beam quality.Therefore, a diagnostic able to measure the core phase space density can provide information on the ultimate brightness of the beam source, which is only affected by the photoemission physics and binary particle interactions such as intrabeam scattering and disorder-induced heating [18].
There are various ways to characterize the rms and core phase space density of a beam in the transverse phase space.Standard emittance diagnostics include the pepper pot [19] and quadrupole/solenoid scans [20].
Quadrupole/solenoid scans are based on scanning the strength of a quadrupole or solenoid through the focus on a screen placed downstream.The emittance can be obtained by fitting the initial beam matrix from the measured spot size on the screen using a known transport matrix.The disadvantages of this method are that it is multishot and can be limited by space charge effects.A lens scan directly yields the 2D rms beam matrices.In principle it can be used also to measure the core phase space density but this would require taking multiple phase space projections and then using tomographic reconstruction methods to retrieve the beam phase space [21,22].The reconstruction can also be accomplished in multiple shots of a fixed phase space with the double-slit scan method [23].A first slit selects the slice of the beam profile and a second slit is transversely scanned to measure the charge at different angles.However, only the reconstruction of the 2D projection of the beam phase space is obtained using this technique.
The pepper pot method uses a metal plate with an array of small holes.By imaging the transmitted beamlets on a screen downstream, the beam properties can be derived in a single-shot measurement.Only a subset of the beam is analyzed, which is assumed to have similar properties to the full beam.Typically, the 2D x and y emittances are calculated but, by extension of the analysis, the whole 4D beam matrix can be reconstructed, allowing the computation of the 4D emittance.This scheme has a clear advantage for space-charge-dominated beams as the mask blocks out the majority of the charge, leaving beamlets that are emittance-dominated.However, for very low-charge beams, the mask intercepts most of the beam, making the measurement signal noisy and less reliable.
An alternative technique for low-charge beams using a transmission electron miscroscopy (TEM) grid instead of a pepper pot mask was proposed in 2012 [24].TEM grids are thin arrays of metal bars that are usually used to hold a specimen in the beam path.In the scheme presented here, no specimen is used but rather the spatial distribution of the beam after the grids is used to retrieve the transverse properties of the electron beam at the sample plane.Compared to a pepper pot mask, a TEM grid has relatively large holes and thin bars, which allows a large (> 40%) portion of the beam charge to pass through.This technique is therefore best suited for low-charge beams, where it is not necessary to block out most of the particles as in the pepper pot mask to limit the effects of space charge.Regarding the analysis, the TEM grid diagnostic is analogous to the pepper pot although, rather than considering the positions of the beamlets, the positions and sharpness of the grid bars, as well as the intensity of the image, are used to retrieve the components of the beam matrix.Unlike custom-made pepper pot masks, TEM grids are easily available in a variety of sizes, pitches and materials.
This paper presents a complete analysis of this novel diagnostic technique as an effective and reliable single-shot 4D phase space diagnostics for the characterization of very low charge, ultrahigh-brightness electron beams.We describe in detail the extension of the analysis presented in [24] for the reconstruction of the full 4D phase space that allows for the evaluation of the ultimate brightness of the beam source in the presence of nonlinear and/or astigmatic beamline elements.This work is being conducted as part of a collaborative research effort between the Pegasus facility at UCLA [25] and the SINBAD facility at DESY [26].Simulations and experiments have been performed to test the technique and its resolution limits at the Pegasus accelerator.
The paper is organized as follows.The following section details the background theory and shows how the different elements of the 4D beam matrix can be obtained experimentally by imaging either a pepper pot mask or a TEM grid.Simulations of virtual measurements are then presented in Sec.III, which leads to a discussion of the factors affecting the resolution.In Sec.IV, benchmarking experiments carried out at Pegasus to test this technique are presented, and finally in the outlook and conclusion (Sec.V) we discuss a few relevant examples of future implementation both at the ARES beamline at SINBAD and at the UCLA Pegasus laboratory.

II. THEORY AND METHOD
The 4D beam matrix is given by hx 2 i hxx 0 i hxyi hxy 0 i hxx 0 i hx 02 i hx 0 yi hx 0 y 0 i hxyi hx 0 yi hy 2 i hyy 0 i hxy 0 i hx 0 y 0 i hyy 0 i hy 02 i where x and y are the horizontal and vertical coordinates respectively and x 0 and y 0 are their derivatives with respect to the longitudinal coordinate.Σ xx and Σ yy are two dimensional matrices that describe the beam properties in the x and y directions respectively and Σ xy reflects the correlation between the two planes.
The square root of the determinant of Σ xx gives the apparent emittance in the x plane: and similarly in the y plane.
The matrix in Eq. ( 1) can be expressed as where ϵ 1 and ϵ 2 are the intrinsic eigen-emittances and M is a symplectic matrix.ϵ 1 and ϵ 2 can be calculated with the relations [27] When all Σ xy terms are zero, the apparent and intrinsic emittances are equal.However, when there are xy correlation terms, the projections onto the x and y axes, which yield the apparent emittances, are not the same as the intrinsic emittances, and it can be shown that ϵ 1 ϵ 2 ≤ ϵ x ϵ y [28].
The 4D rms emittance is defined as the square root of the determinant of the beam matrix or, equivalently, ϵ 1 ϵ 2 , as the product of the eigenvalues is equal to the determinant of the 4D matrix.
Another quantity relevant in the characterization of the beam is the core emittance [29].This is because, as a consequence of Liouville's theorem [17], the phase space density at the core, also known as the core brightness, is invariant along the beam trajectory (neglecting stochastic effects, radiation emission or binary collisions) even in presence of nonlinear forces.
The core emittance is defined as the phase space volume occupied by a uniform distribution of particles with constant density equal to the core density.It can be expressed mathematically as [30] where F is the beam fraction enclosed by an hyperellipsoid of volume ϵðFÞ.A more detailed description of the core emittance and its associated brightness is provided in the appendix.In the following sections, it is shown how the pepper pot and TEM grid diagnostics can be used to reconstruct the beam phase space and evaluate the 2D and 4D core emittances.

A. Beam matrix reconstruction using pepper pot
The aim of this section is to provide the expressions needed to reconstruct the beam matrix in Eq. ( 1) and therefore both the apparent and intrinsic emittances when using the pepper-pot measurement technique.Standard formulas for the 2D beam matrix components are well established and widely used at accelerator beamlines for emittance measurements [19].Σ xy terms can be similarly derived and are presented here.
Holes in the pepper pot are assigned horizontal and vertical indexes i and j respectively.The positions of the hole centers in the pepper pot plane are denoted x ij and y ij , whereas the mean positions of the beamlets on the detection screen are denoted Xij and Ȳij .The mean local angular deviation of the beam can then be expressed as where L is the drift distance between the grid and the screen.The intensity I ij is proportional to the charge passing through the hole while σ x 0 ij represents the horizontal rms divergence of the beamlet passing through the ij hole, which corresponds to: where σ X ij is the rms beamlet size at the detection screen.
From the measurements of these quantities, we can reconstruct Σ xx as follows.Here, all x ij and x0 ij terms indicate deviations from the centroids of the entire distribution.
and similarly for Σ yy .By extension, the Σ xy terms can be estimated as hxyi ¼ hx 0 y 0 i ¼ where the σ x 0 y 0 ij terms indicate a possible correlation between the horizontal and vertical rms spot size of each beamlet in the detection plane.

B. Extension to TEM grid
This analysis can be extended in a straightforward way to the case of a TEM grid.The indices i and j now identify the bars rather than the beamlets.The positions of the grid bars are denoted x ij and y ij , whereas the positions of their shadows at the screen are denoted X ij and Y ij .
Figure 1 (top) shows an intensity plot of a sample image at the detector screen.The position of the minima are initially identified using a peak-fitting algorithm on the x and y projections.Note that large x − y correlations have the effect of skewing the image, so that the bars are no longer perpendicular to each other.In this case, a skew transform must be applied to the image so that the bars form a perpendicular grid before taking the projections and finding the minima [see Fig. 1 (middle)].The image is then divided up in both x and y into sections around each grid bar and a fitting function applied.Whereas in the pepper pot method σ x 0 ij can be found by calculating the rms size of the beamlets, in the grid method this information is retrieved from a fit of the edge profile, as shown in Fig. 2. Figure 1 (bottom) shows the points where the fit is applied.The very low signal at the halo of the beam may cause errors in determining the positions of the bars, however the influence in the beam matrix reconstruction is negligible.Equation ( 8) can then be used with these definitions to find the mean angular deviation at a given location.The intensity associated to each point I ij will then represent the charge that is blocked (or more accurately scattered at large angles) by the section of the bars in question.
In practice we use a fitting function for lineouts over small regions around each bar edge profile, which is derived assuming a Gaussian intrinsic angular spread and where we allow for a linear variation of the local background intensity around each bar: where the fit parameters are: the intensity I ij , the intensity gradient A across the bar, the position of the bar center Xij and the rms divergence σ x 0 ij at the bar location.The same analysis can be repeated for the y axis.The magnification from grid to screen is defined as M x ¼ ΔX=Δx and is set by the separation between adjacent minima in the projections, and a is the bar width.Note that a large signal-to-noise ratio is obtained by projecting the horizontal lineouts when integrating over the span of the grid bars.This allows a more accurate fit for very low charge beams compared to pepper pot technique in the analysis of the beam divergence.In the pepper pot case, in fact, an integration over multiple lineouts does not offer an advantage as the beam signal is confined in both dimensions due to the tiny hole.
A simulation of the particular phase space example from Fig. 1 with varying number of particles allows to compare the error of the σ x 0 ij fit when using a TEM grid and a pepper pot mask.Figure 3 shows that, as the beam charge increases, the error in the determination of the grid edge sharpness and the pepper pot beamlet size is diminished.Nevertheless at lower beam charges, this error is generally better for the TEM grid due to the higher charge transmission and the enhancement of signal-to-noise ratio resulting from the integration along multiple line-outs in the image.
With the fit quantities evaluated at each of the grid points in the projection, the components of the Σ 4D matrix can be calculated using Eqs.( 10)- (12).The last term in Eq. ( 12), σ x 0 y 0 can in principle be derived from a 2D fit of bar intersection region.However, the fit is computationally expensive and σ x 0 y 0 is retrieved with a large uncertainty.Usually, this term is low and can be neglected.
The technique could be further improved by associating the intensity of all pixels of the camera to a position (x i ), mean and rms angle ( x0 i and σ x 0 i ) by interpolating the values obtained across all bars, which reduces the error due to the discrete sampling with a finite number of bars of the beam phase space.

C. Trace space density reconstruction and core emittance
The analysis of images produced by a beam which passes through a pepper pot or TEM grid mask provides the set of parameters fx n ; x0 n ; σ x 0 n ; y n ; ȳ0 n ; σ y 0 n ; σ x 0 y 0 n ; I n g N b n¼1 , with N b the total number of pepper pot beamlets or TEM grid bars applied in the computation of the beam matrix elements.These parameters can also be used to retrieve the full charge-density distribution in the 4D trace space.In order to do this, we assume a Gaussian distribution in the angular subspace ðx 0 ; y 0 Þ with corresponding centroids ð x0 n ; ȳ0 n Þ and widths ðσ x 0 n ; σ y 0 n Þ.The angular correlation is taken into account by the correlation coefficient defined as: The overall density distribution can then be reconstructed by adding the contribution of every beamlet: where  is visible in some of the figures are due to the finite sampling in the spatial x-y subspace.
Once we obtain the density distribution in trace space, one can extract the core emittance by derivation of the core density.The normalized Mahalanobis distance [31] is defined with respect to the core as: where and r 0 corresponds to the center of the distribution.This normalized distance, defined in the range ξ ∈ ½0; þ∞Þ, represents a contour parameter of a 4D hyperellipsoid with the size and orientation given by the beam matrix Σ 4D .The contour corresponding to ξ ¼ 1 can be also seen in Fig. 4.
A cumulative density function FðξÞ can be defined as the fraction of particles comprised within such contour.The fractional emittance for different beam fractions is shown in Fig. 5.The core emittance is evaluated using Eq. ( 7).

III. SIMULATIONS
In order to understand the limits of applicability of this diagnostic, we performed virtual measurements using simulated phase space distributions and simple particle tracking from the grid to the detector screen.
A random particle distribution of 500 000 particles was generated in MATLAB with a desired beam matrix including correlations.This distribution was then propagated using a simple drift transport matrix.The grid was simulated by removing particles that would be intercepted by the TEM grid bars with 85 μm pitch and 31 μm bar width (corresponding to standard TEM300 grid dimensions).It is assumed that the large spread in angle resulting from scattering in the grid material results in a very small uniform background on the image which can be subtracted out.Electron beams with energies below 10 MeV experience an rms divergence greater than 80 mrad from the scattering from copper, 25 μm thick grids.This results in a uniform background at the detection screen when considering that typical low-emittance beams in these measurements have an rms divergence of less than 4 mrad.Previous Monte Carlo simulations showed that, for 3 MeV beams, less than 0.1% of particles are scattered in a cone within 2.5 mrad from the beam line axis [24].The scattering angle becomes comparable to the beam divergence (therefore limiting the applicability of this technique) for energies above 40 MeV.
In our example, the beam is focused to a small spot 0.2 m before the grid and the detection screen is placed 0.85 m downstream of the grid plane.This simulation was presented in Fig. 1 to illustrate the analysis procedure.Table I shows the beam matrix elements of the simulated beam along with the virtual measurement reconstructed values.Note that the reported emittance values are geometric emittances.
In practice, for a real measurement one would have to deal with the noise on the detector screen as well as shot-toshot fluctuations in the electron beam charge and profiles.In the virtual experiment, the systematic errors mostly  depend on the discretization of phase space sampling and on the approximation of linear dependence of the intensity in between two grid bars.The comparison with the starting values indicates an excellent agreement in terms of beam matrix elements, with the exception of the very small horizontal-to-vertical coupling terms where the absolute error is still small.There is also very good agreement in terms of the reconstructed emittances, even though the relative error is larger.This is because, as discussed in detail in the next section, the calculation of the emittance involves the subtraction of two terms which are relatively large compared to their difference [Eq.( 2)].

A. Space charge effects
The analysis of pepper pot and TEM grid images assumes a simple ballistic drift transport for the particles in between the grid and the detector.In principle a linear transport lattice could be included in the analysis, but nonlinear effects in the beam transport would compromise the validity of the algorithm.This is a concern especially for TEM grids since they transmit more charge than pepper pot masks.It is for this reason that the TEM grid method is considered better suited for low charge beams.
The space charge effects in the phase space reconstruction have been studied as a function of the total charge and energy of the beam that is intercepted by the grid.In a virtual experiment, we simulated the measurement for a given beam phase space with typical charges and energy values available in the Pegasus beamline.The transmitted beam distribution after the grid is inserted into the GPT tracking code [32] and is propagated to the detector plane taking into account space charge effects.The images are then fed to the phase space reconstruction algorithm to retrieve the beam emittances.Figure 6 shows that the horizontal emittance obtained from the algorithm converges to the true value, as expected, for lower bunch charge and larger energies.For 3 MeV electron beams, a maximum charge of around 3 pC can be considered as a safe value to get a reliable measurement from the TEM grid technique.This requirement becomes more stringent for lower energy beams.

B. Measurements of very low beam emittances
Normalized emittances of 20 nm have been demonstrated at Pegasus at 5 MeV energy [25] and there are plans to produce even lower emittance beams in the future [8].Measuring such low-emittance beams requires particular care to satisfy some key conditions when using the TEM grid technique.Table II summarizes the various requirements and corresponding constraints that must be applied to obtain a suitable image from which the emittance can be retrieved.
First, the choice of TEM grid dimensions determines the emittance range that can be measured according to the resulting images that are formed at the detector.The number of grid bars that are covered by the transverse beam profile specifies the sampling during the reconstruction of such distribution.This is expressed in the requirement (i) in which the beam size must be large enough compared to the size of the grid mesh.Commercial TEM grids are available in various mesh sizes, from a rough mesh of few hundreds of μm pitch to an very fine mesh of 12.5 μm.
It is important to keep in mind that the applicability of this emittance measurement method is strongly affected by the x − x 0 , y − y 0 correlations in the phase space of the beam at the grid plane.As listed in requirement (ii), adjacent beamlets separated by a bar of width a must not overlap on the image plane, otherwise fitting the intensity profile using Eq. ( 17) is not possible.At the same time, requirement (iii) results from the finite point spread function of the detector screen, which sets a limit on the smallest intrinsic divergence that can be measured.In order to satisfy these requirements, obtaining a magnified point-projection image of the grid is the only possible configuration using this technique to obtain the trace space  information.The magnification of the grid spacing is given by: where hx 2 i and hxx 0 i are the second moments at the grid position.The magnification needs to be large enough to satisfy requirement (ii) by making a strong correlation in x − x 0 subspace (i.e., large hxx 0 i) at the grid plane.
Reducing the distance L between the grid and the detector decreases the blurring at the screen due to the intrinsic beam divergence, but this eventually leads to limitations in resolving the bar edge profile due to the screen point-spread function [requirement (iii)].
Unfortunately, point-projection geometry with a large hxx 0 i has the drawback that in the calculation of the emittance using Eq. ( 2), the subtraction of the two large (and very similar) terms, hx 2 ihx 02 i and hxx 0 i 2 , leads to a very small one.This is due to the fact that we measure the phase space area of an extremely thin, tilted ellipse, as is shown in Fig. 4 (top).Consequently, the emittance computation is very sensitive to small errors in the beam matrix elements resulting in a large uncertainty of the emittance.
A final consideration in the emittance diagnostics setup is given by requirement (iv) which limits the magnification of the beam to the maximum beam size that the detector can accept.This entails an upper limit of the emittance that can be measured with a particular grid mesh size.
In order to satisfy these conditions one can adjust the beam optics before the grid, the distance to the downstream screen and even the actual grid mesh size with the goal of minimizing the beam divergence while still resolving the bar shadows.However, satisfying all these conditions, while achieving a low uncertainty on the emittance values is very challenging and indeed not feasible for sub-nm emittances.In these cases, a different approach can help to overcome some of the limitations of a point-projection geometry, as described in the next section.

C. The grid-lens scheme
The main problem in applying this technique to beams with sub-nm geometric emittances derives from the pointprojection requirement, which results in a particle distribution enclosed in a tilted ellipse with strong x-x 0 and y-y 0 correlation.In order to reduce these correlations (or equivalently to improve the accuracy of the determination of these correlations), it would be preferable to move the focus of the beam closer to the grid plane and have a smaller divergence at the waist.However, such a configuration would reduce the magnification for a fixed available beamline length, making it more difficult to avoid overlapping of adjacent beamlets and to resolve the profile of the grid bars.
A possible remedy consists of inserting a beam-focusing system in between the grid and the screen, as illustrated in Fig. 7.The grid-to-screen transport matrix R, including the lens, must be well-characterized with prior measurements in order to obtain a reliable reconstruction.For the case of uncoupled beam transport, the R 12 and R 34 elements play the same role as the drift length L in the standard grid technique, while the R 11 and R 33 elements represent the additional horizontal and vertical magnification of the grid pitch.A more general expression of the total magnification in Eq. ( 23) is When the screen is located at the plane where the imaging condition is satisfied, a magnified image of the grid with very sharp, in-focus bar edges is observed (just as in an electron microscope).In this case, the angular distribution of the phase space cannot be retrieved.However, by moving the screen off the imaging condition plane (i.e., adding a defocus in microscope language), the sharpness of the bar edges becomes a strong function of the beam emittance and therefore can be used to measure it.
A quadrupole triplet could be a good choice for the magnetic lens as it offers control of the magnification in both planes, allowing the resulting transverse beam profile at the detector to be optimized.In simulations using this setup, geometric beam emittances as low as 0.3 nm rad have been successfully retrieved [33].

IV. EXPERIMENTAL VERIFICATION
Emittance measurements have been performed with a TEM grid in the Pegasus ultrafast electron beamline at UCLA and the technique has been benchmarked with additional measurements using the pepper pot method.
A schematic of the beamline can be found in Fig. 8.The electron source consists of a 1.6-cell S-band photogun [34] with a maximum operational gradient of 100 MV=m.Electrons are pumped via photoemission from the copper FIG. 7. Schematic of the grid-lens configuration.Distances p 0 and q 0 satisfy the imaging condition 1=p 0 þ 1=q 0 ¼ 1=f for a lens of focal length f. cathode by a 100 fs-long (rms) UV-laser pulse.The laser can illuminate the cathode either at normal incidence through the beam port of the rf gun, which results in round electron beams, or at 72°oblique incidence through the laser viewport, which leads to elliptical beams.The emittance measurements described in this section were performed at normal incidence, and the laser rms spot size was 70 μm, measured in virtual cathode.By regulating the laser fluence using a polarizer, the total charge of electrons extracted from the photocathode and driven into the beamline can be controlled.Right after the rf gun, the beam is focused in a solenoid and an S-band linac further down the beamline allows the energy to be further controlled anywhere in the range 2-14 MeV [35].During the collection of experimental data, the linac was not powered and the final kinetic energy of the beam was fixed at approximately 3.0 MeV, corresponding to γ ≈ 6.9.
The experimental vacuum chamber is located after the linac, where a stepper motor system attached to a multidisk holder allowed the alignment of different masks with the beam for the experiment.Two masks were installed, which are shown in Fig. 9.The first sample was a commercial PELCO copper-made TEM grid 1GC300 (Ted Pella, Inc.), with an overall diameter of 3 mm, thickness of 25 μm, pitch size of 85 μm and bar width of 31 μm.The second sample was a custom-designed pepper pot with laser-drilled circular holes of 15 μm diameter and spacing of 85 μm, which corresponds to the pitch size used for the TEM grid.A second solenoid before the vacuum chamber focuses the beam just before the sample in order to obtain a large magnification at the detector screen, located 0.85 m after the target.An 8 mm diameter, 100 μm thick YAG scintillating screen was used, which was imaged by a Princeton Instruments ICCD PI-MAX camera with a resolution of 16.5 μm.Fig. 10 shows an example of an intensity image of a TEM grid and a pepper pot.
The quality of the measurements using a pepper pot mask is generally better at higher beam charges than the intended range of applicability of the TEM grid masks.For this reason, we have on purpose benchmarked the functionality of the analysis of the TEM grid method for a beam charge of 2.3 pC, in which the quality of the results with both methods are comparable.Emittance measurements of 20 beam shots were performed using both mask samples.Results of the 2D, 4D, rms, and core emittance are summarized in Table III, together with the statistical fluctuations of the set of measurements.Both techniques show good agreement in the reconstruction of the beam matrix elements and the projected 2D and 4D rms emittances.This indicates the validity of the algorithm using TEM grids that is analogous to the pepper pot technique.The trace space density reconstruction is also in good agreement when comparing the results of the 2D and 4D core emittances using both techniques.Figures 11 and 12 show the 4D trace space density reconstruction and core emittance of one beam shot of this set of measurements using a TEM grid.The nonlinearity of the transverse phase spaces and some residual x-y coupling can be clearly observed.

V. OUTLOOK AND CONCLUSION
In the near future, we are planning to use this technique to test the flat-beam transform technique at the Pegasus beamline and for gun commissioning at the ARES linac.
ARES is a photoinjector and linac, currently under construction at the SINBAD facility at DESY [26,36,37], with the aim of producing low-charge (few pC to sub-pC) electron bunches with 100 MeV energy, fs and sub-fs duration and excellent arrival time stability.These bunches will be used in the future to test novel acceleration techniques, including dielectric structures [38] and laser plasma wakefield acceleration [39,40].
Due to the very low bunch charges aimed at, the TEM grid technique will be an ideal candidate diagnostic for gun commissioning, along with solenoid scans.The layout of the photoinjector gun section is very similar to that at Pegasus, although the grids will be placed closer to the gun and so just one solenoid will be used for focusing before the grids.The screen station used for imaging will be 1.4 m downstream of the grids.At Pegasus it is under investigation the possibility to use flat beams for slab-geometry dielectric laser acceleration experiments [8].In this case, the sensitivity of the grid diagnostics to the x − y coupling can be exploited to  fine-tune the flat-beam transform skew quadrupoles.For a complete single-shot 4D phase space measurement after the transform though, the challenge is set by the extreme aspect ratio of the beam in the two orthogonal directions.Rectangular grids, or stigmatic optical transport from the grid to the detector (for the grid-lens scheme discussed in this paper) will be required in order to allow a high resolution single shot measurement of the 4D phase space in this configuration.
In conclusion, a new diagnostic technique involving imaging a TEM grid has been studied.This technique allows the beam matrix to be reconstructed and thereby gives a way to calculate both the projected and intrinsic emittance, as well as the core 4D emittance.The analysis procedure is analogous to that involving a pepper pot, however instead of analyzing the beamlet expansion from point sources, the position of the bars and the spread in intensity between them is used to obtain the beam matrix components.
Results from this method have been compared in simulation to the actual values of the beam matrix, as calculated from the particle distribution.In addition, experiments were performed on the Pegasus beamline to test that the analysis procedure can be successfully applied to real noisy images and the results compare well with a benchmark pepper-pot measurement.
Finally measuring ultralow (sub-nm) emittances with this technique is challenging due to a number of constraints associated with point projection imaging and limitations related to the geometry of the setup and an alternative approach using a beam-focusing system has been proposed in this paper.

APPENDIX: BRIGHTNESS DEFINITIONS IN 2d-DIMENSIONAL PHASE SPACE
Analytical expressions for the average and core brightness (i.e., phase space density) in terms of the rms and core emittances are derived here for two particular distributions in 2d-dimensional phase space, where d is a natural number used to denote the projected 2D phase space (d ¼ 1), the transverse 4D phase space (d ¼ 2) or the full 6D phase space (d ¼ 3).
Since the phase space density ρðrÞ is a local quantity that can vary across the beam distribution, it is helpful to quantify the beam quality to define the average brightness, ρ avg , and the core brightness, ρ core .The average brightness (normalized) can be expressed as [29,41]: while the core brightness is the peak density at the core of the beam.The core emittance is equivalent to the rms emittance when all of the beam particles are uniformly distributed in the 2d phase space with a constant density equal to the core density.

Uniform distribution
The probability density function of a normalized uniform distribution is written as where is the volume of a unity 2d-dimensional ball and is the gamma function.In this case the average and core brightness are obviously the same: The cumulative density function of this distribution is: The fractional emittance is defined as where is the covariance matrix of the fraction of particles within the contour jrj ≤ ξ.Given the symmetry of the distribution, the fractional emittance can be written as where hr 2 i ξ is the variance of the radial component q .For the uniform distribution that we have considered, this variance is given by: Substituting this into Eq.(A9) yields the fractional emittance: The rms emittance (in this case equal to the core emittance) is obtained for the limit ξ → ∞: The brightness of a uniform distribution can be written in terms of the rms emittance: This expression is valid for a uniform density distribution with an arbitrary 2d-dimensional ellipse shape.

Gaussian distribution
Consider an arbitrary density distribution ρðrÞ with peak density ρ core at the core.The core emittance may be derived by finding the contour ξ 0 that encloses the same number of particles in a uniform distribution with constant density ρ core , i.e.F u ðξ 0 Þ ¼ 1: Solving this equation for ξ 2d 0 and substituting into Eq.(A11) gives the core emittance of the arbitrary distribution: The Gaussian distribution is often used to model beam charge distributions.A general formulation of the density distribution is where Σ is the covariance matrix and the rms emittance is given by An analytical expression for the cumulative density function can be found by solving Eq. (A6): where γðd; xÞ is the lower incomplete gamma function defined as: The fractional emittance can also be evaluated by solving Eq. (A9) and is given by: Table IV summarizes the analytical formulas of the cumulative density function and the fractional emittance applied to the 2D, 4D, and 6D Gaussian distributions.With the density distribution in Eq. (A16), the core brightness is Using Eq. (A15), the core emittance of the Gaussian distribution can be written as The ratio between the core and rms emittances for the particular 2D, 4D and 6D Gaussian distributions are also shown in Table IV.The average brightness can be evaluated by solving Eq. (A1) and can be written both in terms of the rms and core emittances:

FIG. 1 .
FIG. 1. Top: intensity plot of a sample image at the screen, generated from the output of a simulation (details in Sec.III) of an electron beam masked with a TEM300 grid.Axis labels of the image are in pixels and the pixel size is 15 μm.Middle: sheared image with horizontal and vertical lines showing detected minima of the projections onto the axis.These projections are also shown as red lines on the image.Bottom: screen intensity profile showing points where the fits are done.

FIG. 3 .
FIG. 3. Relative error of the rms divergence σ x 0 ij fit from the simulations of a fixed phase space distribution, as a function of the number of particles in the beam, intercepted by one bar of a TEM grid (85 μm pitch, 31 μm bar width) and one hole of a pepper pot mask (15 μm hole diameter).

2 FIG. 5 .
FIG.5.Solid blue line represents the fractional emittance of the particle distribution comprised in different fractions of the beam, obtained from the reconstruction of the 4D trace space density of the simulation in Fig.1.The solid green line shows the tangent line to the reconstructed curve at the core to linearly extrapolate the core emittance.The dashed pink line is the analytical curve of a 4D Gaussian distribution with the same rms emittance.

FIG. 6 .
FIG.6.Space charge effects on the reconstruction of the horizontal emittance of a geometric phase space distribution in different energy and charge scenarios.
This work has been partially supported by the Center for Bright Beams, National Science Foundation under Grants No. 1549132 and No. PHY-1734215 and the Department of Energy under Award No. DE-SC0009914.

TABLE I .
Beam matrix elements and the projected and intrinsic geometric emittances for the TEM grid simulation.

TABLE II .
Requirements and constraints when making a measurement of a low-emittance beam with the TEM grid technique.L is the drift length from grid to screen; d is the grid bar spacing; a is the grid bar width; M x is the horizontal magnification; σ PSF is the screen point-spread function; and r screen is the screen radius.hx 2 i refers to the beam size at the grid.Terms given in terms of x are equally valid in terms of y.

TABLE III .
Results of the beam matrix elements and the projected, intrinsic and core emittances measured at the Pegasus beamline using TEM grid and pepper pot (PP) techniques for a 2.3 pC beam.The associated errors are calculated from the statistical variation between the different beam shots.

TABLE IV .
Analytical expressions of the cumulative density function, F g ðξÞ, and fractional emittance, ϵ g ðξÞ, of a 2D, 4D and 6D Gaussian distribution characterized by a rms emittance ϵ g;rms .The ratio between the core and rms emittance is also included.