Propagation of partially coherent radiation using Wigner functions

Undulator radiation from synchrotron light sources must be transported down a beamline from the source to the sample. A partially coherent photon beam may be represented in phase space using a Wigner function, and its transport may use some similar techniques as is familiar in particle beam transport. We describe this process in the case that the beamline is composed of linear focusing and defocusing sections as well as apertures. We present a compact representation of the beamline map involving linear transformations and convolutions. We create a 1:1 imaging system (4f system) with a single slit on the image plane and observe the radiation downstream to it. We propagate a Gaussian beam and undulator radiation down this sample beamline, drawing parameters from current and future ultra low emittance light sources. We derive an analytic expression for the partially coherent Gaussian case including passage through a single slit aperture. We benchmark the Wigner function calculation against the analytical expression and a partially coherent calculation in the Synchrotron Radiation Workshop (SRW) code.


I. INTRODUCTION
Synchrotron radiation sources, either storage ring or FEL-based, require optical beamlines to transport the radiation to the experimental sample. As performance of these sources is being pushed to lower emittance and higher coherence, the beamline performance and modeling must be accordingly improved [1].
Models of radiation transport through the beamline elements exist in a hierarchy of levels of accuracy and complexity. At the simplest level, one can use analytical formulae to propagate beam sizes, divergences and coherence lengths through an idealized beamline (see [2]). At the next level is the geometric optics description using a ray-tracing approach (e.g. SHADOW [3]). At a higher level of complexity, one may use a physical optics approach which requires wavefront propagation software (e.g. SRW [4]). The wavefront propagation allows the inclusion of diffraction effects in coherent optics, but is more computationally intensive than the ray-tracing approach.
To go beyond fully coherent optics, accurate representation of radiation requires the model include partial coherence resulting from considerations of statistical optics [5,6]. For synchrotron radiation, this partial coherence results from the finite electron beam size causing randomness in the phase of the emitted radiation. In the wavefront propagation method, this may be taken into account by propagating multiple initial wavefronts, either via a sampling of the phase space of initial electron beam [7] or by a coherent mode decomposition [8][9][10].
Another approach to treating partially coherent radiation involves the use of Wigner functions. The Wigner * bnash@radiasoft.net; function formalism for synchrotron radiation was pioneered by K.-J. Kim [11]. The Wigner function was originally developed in quantum statistical mechanics [12][13][14], as an alternative phase-space representation to the density operator. In an optical context, the Wigner function may represent the types of systems described in statistical optics, where multiple wavefronts are simultaneously present with random phase relations between them. The properties of Wigner functions and the relation between the quantum mechanics and optics context are described by Bazarov et al. [15].
Although Wigner functions for fully and partially coherent synchrotron radiation have been computed, they have not been widely used in the propagation down beamlines. In this paper, we demonstrate propagation of the fully and partially coherent Wigner functions through a simplified beamline. We compute beamline maps that may be applied to any initial condition Wigner Function without having to be recomputed. We limit ourselves to linear maps, (so-called ABCD matrix, in the optics literature [16,17]) under which the Wigner function transforms in a straightforward manner. We will also consider physical apertures, focusing on the case of single slits, an important element in most x-ray beamlines. We assume separable radiation such that we may work with 2D Wigner functions [15,18]. The extension to higher dimensionality is straightforward. Including non-linear elements, such as spherical aberrations in a lens, will be a topic of future work.
As the size of the electron beam increases, the Wigner function becomes dominated by the Gaussian electron beam and the coherence decreases. To understand this transition, we consider Gaussian initial Wigner functions. We are able to derive an analytic expression for the diffraction of a partially coherent Gaussian through a single slit. We may thus validate our algorithms for linear transport and passage through an aperture. In addition, we may compare the analytical Gaussian result to the case of undulator radiation and gain understanding as to when the Gaussian result may be adequate in simulation. Finally, we validate our undulator radiation transport using our simplified Wigner function map method to a partially coherent SRW calculation.

II. X-RAY BEAMLINE MODELING
The goal of X-ray beamline modeling is to take an initial radiation field and propagate that field through a complex series of elements to accurately predict what the wavefront will look like when it reaches the sample. There are several methods of approaching this: we survey physical optics in the Appendix A, for example. We start with a summary of the properties of the radiation Wigner function. Next, we provide a brief discussion of linear geometric optics including apertures. Finally, we show how to evolve the Wigner function under the action of a matrix-aperture beamline.
Consider an optical ray and attribute to it a wavelength λ following a trajectory starting at position s = 0 where the radiation is created and ending at S = L at the end of the beamline. This trajectory will in general not be straight due to reflections off of mirrors and gratings and passing through other optical elements. At each position s, along the trajectory, we assign transverse phase space coordinates, z, where x and y are transverse coordinates, θ x and θ y are corresponding angles with θ x = dx ds and θ y = dy ds . 1

A. Radiation Wigner functions
We represent the radiation along the trajectory by means of a Wigner function W ( z).
Many of the properties of Wigner functions have been reviewed by Bazarov [15]. We mention several of them so that our treatment here is self-contained. First, the Wigner function is normalized: 1 Note that we will ignore the longitudinal phase space coordinates in this work. A 6D phase space treatment would include the longitudinal position and relative wavelength deviation. In particular we ignore pulse length effects and assume a monochromatic beam.
We adopt this normalization for clarity of presentation and close connection to the corresponding quantum mechanical formalism. The Wigner function is related to the brightness (or brilliance) function B by means of an overall factor of the radiation flux φ: Thus, as the radiation moves along the beamline, progressing in s and passes through absorbing elements (such as apertures that we consider here), the flux φ will reduce, but the normalization of W ( z; s) will remain constant. Now, suppose we know the Wigner function at s = 0, W 0 (x, θ x , y, θ y ). We will assume that W 0 is separable; that is that W 0 obeys 2 In the examples we consider, the Wigner function remains separable throughout the beamline, and thus we may consider propagation of the components separately. We thus refer to W x (x, θ x ) or W y (y, θ y ) simply by W (x, θ). Now, suppose that W (x, θ) represents fully coherent radiation. Then, there exists an electric field E(x) such that (5) We may write this equation in an operator form: where we refer to W as the Wigner transform operator, or W (x, θ) as the Wigner function associated with E(x). In the case of fully coherent radiation, the electric field may be reconstructed from the Wigner function as follows [15] Now, in the case where W is partially coherent, there does not exist a single, well-defined wavefront associated with the Wigner function. Rather, there exists a whole sequence of fields E j (x) with j = 1 . . . ∞. The Wigner function is given as the (infinite) sum of the Wigner transforms associated with the E j : The decomposition of a given partially coherent Wigner function into a set of underlying modes E j is not generally unique. The process of finding an astute choice of such modes is known as "coherent mode decomposition." The modes are often taken to be orthornormal (see section 4.7 in [19]). However, in the case of synchrotron radiation, one may also consider the single electron modes as a form of coherent mode decomposition also satisfying Eqn. (8).
From the Wigner function, one may compute the quantity, µ, known as the degree of coherence via the following expression.
In the fully coherent case where W may be derived from an electric field, we find µ = 1. For the partially coherent case, µ < 1.

B. Linear Geometric Optics
Along an X-ray beamline, there are optical elements which the radiation will interact with. We include these in our model by including a varying optical path difference, that is, a phase and amplitude modulation, as a function of the Cartesian coordinates (x, y; s). This optical path length difference is often a function of the index of refraction n(x, y; s) for transmission elements. In addition we will include physical apertures, which allow radiation within a certain transverse region to pass unimpeded, and absorb all radiation outside of that region. The aperture elements may be described by transfer functions t(x, y) which describe the region where rays may pass, and where they are absorbed. In fact, we may allow more general aperture elements with values between 0 and 1 in which the intensity of the ray may be reduced but not fully absorbed. Now consider another ray, starting at a different initial condition Z 0 . The evolution of this ray down the beamline may be described by the action of the following Hamiltonian with θ x and θ y playing the role of momenta, and with position along the trajectory s as independent variable. n(x, y; s) is the local index of refraction that the radiation is passing through. The result of this Hamiltonian formulation for geometric optics is that the offset ray will follow Hamilton's equations: with summation over the repeated index j implied and the dot representing d ds . For 4D phase space (in the case that we ignore variation in the z and δ coordinates), the matrix J is given by If we allow arbitrary index of refraction n(x, y) in our model beamline, then the equations of motion will be non-linear. For the purposes of this paper, we will restrict to the approximation that the index of refraction varies quadratically, leading to linear equations of motion for the ray tracing. In particular, as our model for the index of refraction n(x, y; s), we will assume it to be constant along the optical axis and then to fall off quadratically in the transverse directions. Thus, we parametrize it as follows 3 : Expanding the Hamiltonian for small angles, to quadratic order, we find (14) As mentioned, this Hamiltonian will lead to linear equations of motion. The solution may thus be expressed in matrix form as One may solve these equations and produce a linear map for a given beamline section. All the optical elements (excluding the apertures which we deal with separately are thus captured in the transfer matrix M (s) varying along the beamline. Because the ray tracing dynamics are derived from a Hamiltonian, we are assured that the resulting transfer matrix is symplectic. That is: for all s along the beamline. The matrix J is given in Eqn. (12).
Although we have formulated this section in terms of a Hamiltonian theory to bring out some of the formal properties of the propagation, the transfer matrix may also be computed for realistic beamlines using ray tracing software. See [20] for an example of this calculation for a KB mirror system.
In the next section, we describe the evolution of the Wigner function under the matrix M . This covers both the fully coherent and partially coherent case. In the fully coherent case, a different formalism is possible for the propagation: that of the linear canonical transform (LCT). We outline this in Appendix A.

C. Partially coherent propagation with Wigner function
The evolution equation for the Wigner function is given as follows [13] ∂W (x, θ x , y, θ y ; s) ∂s where the Moyal bracket is defined for arbitrary phase space functions f and g as and the Moyal star is given by with the arrows representing action of the derivative, either to the left or right, depending on arrow orientation. Fortunately, in the case of a quadratic Hamiltonian, evolution of the Wigner function is much simpler and more intuitive. The Moyal bracket reduces to the Poisson bracket giving classical evolution (again using the quantum/classical mechanics analogy). One finds that the motion in phase space is a linear transformation. These considerations allow us to formulate our approach. In particular, consider a beamline where the geometric optics is defined by a transfer matrix M acting on the phase space vector z: The Wigner function evolves along this beamline according to We may describe this transformation with the operator, U M , defined as By performing a change of variables, one may show that the degree of coherence µ is conserved under linear transport U M . That is, The degree of coherence is not conserved after passing through an aperture, which we now describe.
We would now like to consider the way in which Wigner functions are impacted by physical apertures. As described by Bazarov, for the electric field, the effect of the aperture is given by where t( x) is the transmission function of the aperture.
In terms of the Wigner function, the action of the aperture is given by the partial convolution (in the angular variable) of the aperture Wigner function: The aperture Wigner function W t is given by applying the Wigner transform to the aperture transmission function. That is, we apply Eqn (5) where the aperture transmission function t(x) plays the role of the electric field.
Since an aperture results in absorption of radiation, the normalization of the Wigner function would change after passing through. As given in Eqn. (3), the Wigner function is related to the brightness by a factor of the total flux. For simplicity, we will ignore the changing value of flux along the beamline and consider Wigner function to be consistently normalized throughout. Thus we normalize the transmission function according to Eqn. (B2) and thus W(t j ) will be normalized according to Eqn. (B7). Because of the different normalization, the Wigner transform of a transmission function could be considered as a sort of filter that acts on the incoming radiation Wigner Distribution Function (WDF). Thus, part of the work of propagation of WDFs through beamlines including apertures involves the calculation of the Wigner filter functions. We will give an example of this function for the single slit aperture in a later section. A substantial part of the understanding about diffraction effects can be gleaned by examination of these Wigner filter functions.

D. Matrix-aperture beamlines
Consider the beamline schematic as shown in Fig. 1 consisting of an undulator source with an electron beam and subsequent sections which may be described by matrices, M j , and apertures with transmission function, t j (x). An electron beam with distribution f e ( z) passes through an undulator producing synchrotron radiation. Let E 0 ( x) be the electric field produced by a single electron as it appears at the center of the undulator. We may now construct the multi-electron Wigner function for the undulator radiation as will be described in Section IV-A (see Eqn. (44)).
We consider an axial ray coming from the center of the undulator and proceeding along the beamline until the final observation plane located at position s n . We note that the optical axis described by this axial ray is not necessarily a straight line. In particular, mirrors will cause angular deviations from the central trajectory and at each point, the transverse coordinates are relative to the direction of the central ray. Along the beamline, there are apertures located at positions s 1 through s n−1 which are represented by transmission functions t 1 through t n−1 . For the purpose of our simplified beamline, non-linear aberrations will be ignored and we will assume that the transport between apertures j − 1 and j may be represented by the matrix M j .
Following Eqn. (22), we find an operator for this beamline section given by U Mj that simply transports the phase space by applying the matrix M j . We have thus defined the operator for propagation through sections of linear transport, U Mj , that may include mirrors, lenses, and other elements when remaining close to the optical axis. Likewise, the apertures may also be represented by operators, A tj , as given by Eqn. (25). The operator for the entire simplified beamline may then be given by Then the fully coherent and partially coherent simulations can be simply written as respectively.

III. EXAMPLES -GAUSSIAN RADIATION
We consider Gaussian radiation (GR) and undulator radiation (UR) propagating through a simple matrixaperture beamline doing a 1:1 imaging of the source with a horizontal slit at the image plane and observing the radiaion downstream to it. A schematic for this beamline is depicted in Figure 2 and the corresponding source and beamline parameters are provided in Table I.
We first illustrate many of the useful properties of radiation Wigner Function Distribution (WFD) propagation with the example of Gaussian radiation. The one-to-one imaging section preserves the coherence properties 4 and thus the first element to consider is the single slit aperture. Propagation through the aperture and subsequent propagation through free space allows us to observe the impact of decreasing coherence on the WFD and corresponding intensity pattern. As the divergence becomes sufficiently large, the oscillations in θ in the aperture Wigner filter are washed out, and coherent diffraction effects are seen to be destroyed. The GR case has the advantage of exploiting the analytical expressions previously derived for benchmarking our numerical WFD transport methods. We then explore the more complex case of UR propagating through this beamline. Changing the electron beam emittance allows us to control the degree of partial coherence. At small electron beam emittances, the WFD is dominated by the single electron WFD, but as the electron beam emittance increases, this structure becomes less relevant and the WFD asymptotically reduces to the GR case. In order to confirm the accuracy of our calculations, we have set up the same beamline model in SRW. Due to the separability of the horizontal and vertical components, we are able to demonstrate a direct comparison between SRW and our own partially coherent WFD based propagation results.
Although our WFD based methods are substantially less time-consuming than full multi-electron partially coherent calculations, significant computational issues remain present regarding memory and runtime. Due to the complexities in the radiation and aperture WFD patterns, sufficient resolution is required to obtain accurate results. Often times this runs into conflict with memory and runtime requirements for the calculations. For this reason, we report the grid sizes (n x number of points in position and n θ points in angle) used in each numerical calculation.
We first consider a Gaussian beam propagating through the simple matrix aperture beamline where we can compare our numerical results to the analytical expression given by Eqn. (40).

A. Analytic calculation for Gaussian radiation with single slit aperture
In this section, we derive an analytic expression for the propagation of a Gaussian Wigner function through a single slit aperture of width a. We are able to find an analytic expression for the radiation immediately after the slit as well as the radiation after having drifted some distance beyond. The aperture is described by the transmission function The corresponding Wigner function is given by [21] W ss (x, θ) = rect x a 2 sin 2πθ Plots of the single slit aperture transmission function and corresponding WFD are displayed in Figure 3.
Let us consider a partially coherent Gaussian Wigner function given by Let us write the relationship between the position and angular spreads as where m 2 is the beam quality factor known in the laser optics literature 5 . In the case that m 2 = 1, the Wigner function represents a coherent wavefront 6 . For m 2 > 1, this Wigner function represents partially coherent radiation.
To propagate the Wigner function through the slit, we perform a convolution of the Gaussian with Eqn. (31) in the θ variable. That is: with 5 The beam quality factor is typically represented by a capital M . We have used a lower-case m here so as not to confuse this quantity with the transfer matrix, M 6 We note that for non-Gaussian wavefronts, in the coherent case, the product σxσ θ exceeds λ 4π . For undulator radiation, one has approximately λ 2π . See e.g. [22][23][24][25] . This integral may be performed (see Appendix D for de-tails) with the result where Im represents taking the imaginary part of the argument andQ = Qσ θ andθ = θ/σ θ . Writing it all out explicitly to see the x and θ dependence, and adding the drift following the aperture, we have: where L d is the drift length following the single slit aperture. From Eqn. (9), and using the Gaussian Eqn. (34), we find the expression for degree of coherence, µ, before passing through the slit to be µ = 1 m (41) Figure 4 shows the WFDs resulting from the convolution of GR with the aperture Wigner filter function displayed in Figure 3 (b). This calculation was performed on a discrete grid of size n x = 4000 by n θ = 4000. Because the analytic expressions are available in the GR case, we are free to increase the resolution to a very fine level without incurring excessively large runtimes and memory demand. These results demonstrate the diminishing coherence effects for a fixed beam size and increasing divergences corresponding to increasing m values. Figure 5 shows the intuitive strength of the WFD method by illustrating the mechanism of diffraction in which the oscillations in θ give rise to interference effects following the drift. Before the drift, the oscillations of the Wigner functions in θ will cancel when performing a projection, but following the drift, they result in a large dip at the center of the intensity distribution which can be seen in Figure 5 (b). In Figure 5 (b), results are shown for increasing values of m 2 , showing how this interference effect disappears with decreasing coherence. In order to demonstrate the validity of our numerical computations, Figure 6 compares the spatial projections of the drifted GR WFD at m 2 = 3 calculated numerically and analytically. Because the numerical result must be redeposited onto the initial grid, one tends to truncate the calculation within a smaller range. The WFD was computed numerically by first constructing a discrete Gaussian along with discrete representation of the single slit aperture WFD. These two functions were then convolved in θ to compute the result following the aperture. Finally, this WFD was drifted for 10 cm by application of the drift transfer matrix and redeposition upon the original grid using the method as first reported in [26]. before the aperture. We note that following propagation through the aperture, the degree of coherence has increased which is to be expected since a more coherent subset of the radiation has been selected by the aperture. In addition, we confirm that the degree of coherence is invariant under the final free space propagation which is predicted by Eqn. (23).

IV. EXAMPLES -UNDULATOR RADIATION
A. Partially coherent undulator radiation As an example of transporting a partially coherent Wigner function, we will consider the case of undulator radiation resulting from a beam of electrons in a synchrotron light source.
A single electron with initial phase space coordinates z 0 passing through the undulator will produce a coherent wavefront E u (x). The electron will be drawn from a distribution of electrons, f e ( z 0 ), that are circulating in the electron storage ring. This distribution generally takes on a Gaussian form resulting from an equilibrium between the damping and diffusion effects from synchrotron radiation [27,28]. Due to differences in the longitudinal coordinates of the emitting electrons, the radiated wavefronts will add incoherently and produce partially coherent radiation.
We assume that the radiation will satisfy where Under these conditions, the multi-electron Wigner function W me may be related to the single electron Wigner function via convolution with the electron beam distribution: Next we note that the convolution of the single electron Wigner function with the electron beam distribution may be postponed until the first aperture by applying the following identity.
where the transfer matrix, M 1 , represents the propagation from the source to the first aperture. Recall the discussion in section II-D for the definition of the operator U M1 . This identity is known as the "emittance convolution theorem" attributed to K.-J. Kim (see e.g. discussion in [29] and references therein). This theorem allows us to use coherent optics until the first aperture where we then need to construct the partially coherent Wigner function via convolution with the electron beam phase space distribution that has been propagated to the same position via the transfer matrix of the first section M 1 . The fact that apertures are represented by only a partial convolution prevents us from extending this identity and applying the convolution beyond the first aperture. As an example of UR, we consider the undulator and electron beam with parameters defined in Table I.
The software package Synchrotron Radiation Workshop (SRW) [30] 7 is used for the initial wavefront calculation that will be used to construct the corresponding WFD. We compute the radiation at the first optical element and progress it through the lens and drift such that we achieve the one-to-one focusing yielding the radiation as it would appear at the center of the undulator. Figure 8 (a) and (b) display the real and imaginary parts of the electric field and in (c) and (d) we have projected these fields onto the horizontal axis and normalized them according to Eqn. (B2). Note that since our planar undulator has a vertical magnetic field, we have selected the dominant polarization component which is horizontal. The UR WFD is constructed from the electric field projections and is displayed in Figure 9 (a). Figure 9 (b) displays the electron beam distribution corresponding to the APS Upgrade parameters given in Table I. The convolution of the single electron UR WFD and the electron beam distribution results in the multi-electron WFD given in Figure 9 (c). In this case, we can see that we are near the diffraction limit as the electron beam size is of the same order as the UR single electron radiation beam size. The finite emittance result shows properties of both the underlying UR WFD and the Gaussian electron beam distribution 8 . This WFD is then propagated through the example beamline and the results from both our WFD transport method and SRW are detailed in the following section.

B. Comparison with multi-electron SRW simulation
We now report the results from transporting the UR through the single slit aperture and subsequent drift. The multi-electron WFD is computed by convolution with the electron beam and propagation through the single slit aperture is performed by means of convolution in θ with the aperture WFD. The free space drift is performed as done in the Gaussian case with the same linear transport algorithm used in the preceeding section. We note that this transport algorithm may be applied to any WFD.
This numerical result was benchmarked against a partially coherent SRW calculation wherein the same example beamline was used. The multi-electron SRW calculation requires running the coherent calculation many times for different macro-electrons. In this case of 42pm emittance, we found we could achieve convergence with 5000 macro-particles. Larger emittance, such as 4nm requires larger numbers of macro-electrons: up to 50,000. The results shown here for 42pm used the more conservative value of 50,000 macro-electrons, though this was not strictly required.
These results are shown in Figure 10. Figure 10 (a) displays the final numerically computed WFD. We note similarity to the Gaussian case being dominated by the structure of the single slit aperture Wigner filter function. In Figure 10 (b), the spatial projections of the final WFD have been calculated and used to benchmark our numerical method against the computationally intensive multi-electron SRW calculation. The partially coherence reflects the effect of the electron beam distribution which, as mentioned, has been drawn from the APS Upgrade beam parameters. We note that the 42.2 pm emmittance electron beam, if representing directly a Gaussian WFD, would correspond to an m 2 value of 1.33. Recall Eqn. (35). Figure 11 provides a comparison between the propagated Gaussian and Undulator radiation for the cases of fully and partially coherent radiation. For the Gaussian radiation, the second moments have been taken from adding in quadrature the undulator σ x and σ θ with those of the electron beam. We note that for the fully coherent case (single electron), there is not perfect agreement between the two calculations, with the Gaussain case having a larger central dip from diffraction. In the case of the 42 pm emittance, however, the Gaussian result quite adequately reproduces the more complex undulator radiation calculation.

V. CONCLUSION
We have described a new, unified method for transporting coherent and partially coherent radiation through a beamline of linear optical elements and apertures. This approach relies on transporting the Wigner distribution of the radiation wavefront in a manner akin to single-particle tracking in particle accelerators. In contrast with physical optics modeling, the formalism is the same for fully coherent and partially coherent radiation, and has the same computational time and complexity. The matrices in the matrix-aperture beamline we have defined may be computed with ray tracing, in the general case, or analytically for simplified beamline models. We thus show how ray tracing may be unified with wave optics, at least within this linear approximation.
We have demonstrated this approach by transporting both a gaussian wave front and an undulator radiation wavefront through drift space and a single slit aperture. In the case of the gaussian wave front, we find excellent agreement between an analytical result, the Wigner distribution approach, and a the well-established SRW physical optics code. For the undulator radiation, we have excellent agreement between the Wigner distribution approach and multi-electron SRW calculations. Finally, we have seen that for large enough emittance (even as small as 42pm horizontal emittance), the Gaussian results approximate the undulator radiation to a high degree of accuracy.
Future work will extend this technique to nonlinear optical elements, which will allow us to account for optical aberrations. We have briefly described the formalism for nonlinear optical elements in Appendix C. Extension to the non-linear case will raise new issues, for future exploration. See e.g. [31] for some understanding of the potential resulting complications.

VI. ACKNOWLEDGMENTS
The authors would like to thank A. Wojdyla for valuable discussion and for alerting us to the literature on Linear Canonical Transforms, including reference [32]. This material is based upon work supported by the U.S. FIG. 11. Spatial projections of Gaussian and undulator radiation propagated through single slit aperture and 10 cm drift via WFD method. In the legend, se denotes single electron (fully coherent) and me denotes multi-electron (partially coherent). For the latter, the photon beam has been convolved with the APS-U electron beam given in Table I Here we describe, for completeness, the approach used for propagating a radiation wavefront through a beamline using physical optics techniques. The propagation of this wavefront through an optical beamline is the goal of physical optics software such as SRW and XRT [33,34]. In these codes, there exist a variety of numerical implementations of propagators to transport the wavefront through free space, lenses, mirrors, gratings, and other optical elements.
We begin with a complex electric field E 0 (x, y, s = 0) at the entrance of the beamline. Optical transport beamlines in synchrotron radiation facilities can often be represented with the scalar paraxial optics approxima-tion [35,36]. For example, the near-field Fresnel integral for free-space propagation can be written as a convolution: A thin lens may be traversed via with k = 2π λ , n is the index of refraction, and f is the focal length [37].
The combination of drifts, lenses, and focussing mirrors together can be combined to create a symplectic transport matrix M for the geometric ray optics as given in Eqn. (15). Knowing M (s), one may propagate the wavefront through the linear beamline down the channel via Linear Canonical Transformation (LCT) [32]. Explicitly for 4D phase space, the transfer matrix is written in the form The transformed electric field E f ( x) is given by and where the subscripts f and i represent initial and final. We point out here, that in addition to use of analytical expressions for beamline elements to determine the Hamiltonian, and thus find the transfer matrix M (s), one may also use a ray tracing code, set up the beamline, and by tracking a series of rays offset from the central trajectory, derive the transport matrix numerically along the beamline.
The effect of the apertures, represented by the transfer functions t j (x, y) on the wavefront simply by multiplication: E(x, y; s ) = t j (x, y)E(x, y; s) (A8)

Appendix B: Normalization of wavefronts and Wigner functions
In this paper, we will assume electric fields which satisfy the separability condition E(x, y; s) = E 0 E x (x; s)E y (y; s), where E 0 is a constant with units of electric field. We normalize the separate electric field components in 1-D such that Following Bazarov [15], we have normalized the electric field in the same way as wave functions are normalized in quantum mechanics. The second moments of the field distribution in coordinate and angular representations may now be calculated as We now introduce the Wigner function defined from the electric field, E(x), as follows λ φθ dφ, (B6) where W (x, θ) will be normalized as The Wigner function can be thought of as a probability distribution in phase space except for the fact that it may become negative. The second moments are given simply as  2m + V (x) for the Quantum Mechanics case of a particle in a potential. We have used a different Hamiltonian for the optics case. The problem of general transport of the Wigner function remains. The evolution equation for the Wigner function under a general Hamiltonian is given as follows [13] ∂W (x, θ x , y, θ y ; s) ∂s where the Moyal bracket is defined for arbitrary phase space functions f and g as and the Moyal star is given by with the arrows representing action of the derivative, either to the left or right, depending on arrow orientation.

Appendix D: Analytical Calculation of a Gaussian Wigner Distribution Through a Single Slit
The passage of a Gaussian Wigner distribution through a slit can be evaluated in terms of the integral It is convenient to normalize all the variables to σ θ , so thatθ = θ/σ θ ,τ = τ /σ θ , andq = σ θ q, so that the integral becomes: This integral can be rewritten as the imaginary part of an indefinite integral with respect to q, (D3) Expanding the Gaussian argument brings a Gaussian θ envelope out front: