This repository implements MENT, an algorithm to reconstruct a distribution from its projections using the method of maximum entropy. The primary application of this algorithm is to phase space tomography in particle accelerators.
A probability distribution is constrained, but not determined, by a finite set of its projections. MENT finds the distribution
where
MENT uses the method of Lagrange Multipliers combined with a nonlinear Gauss-Seidel relaxation method to solve the constrained optimization problem. There are two equivalent ways to run the algorithm. The first, called "reverse mode", uses numerical integration; the second, called "forward mode" uses particle sampling, i.e., MCMC. Numerical integration is the best choice in low-dimensional problems, while particle sampling is the better choice in high-dimensional problems.
This repository contains both a forward-mode and reverse-mode implementation of MENT. In forward mode, one must sample particles from an unnormalized distribution function. An accurate grid-based sampler is included for problems of dimension
Each projection is defined as a sum over one or more axes after a transformation of the coordinates. The only requirement on the transformations is that they must be deterministic and one-to-one. The code is set up to take arbitrary transformation functions as inputs. This allows straightforward integration with particle tracking codes.
We also include routines to fit an
(An experimental version using automatic differentiation is here.)
git clone https://github.com/austin-hoover/ment.git
cd ment
pip install -e .
To run examples using built-in plotting functions:
pip install -e '.[test]'
Several examples are included in the examples folder. These examples demonstrate convergence on a variety of 2D, 4D, and 6D distributions, for both synthetic and real data from particle accelerators.
[1] G. Minerbo, MENT: A Maximum Entropy Algorithm for Reconstructing a Source from Projection Data, Computer Graphics and Image Processing 10, 48 (1979).
[2] G. N. Minerbo, O. R. Sander, and R. A. Jameson, Four-Dimensional Beam Tomography, IEEE Transactions on Nuclear Science 28, 2231 (1981).
[3] J. C. Wong, A. Shishlo, A. Aleksandrov, Y. Liu, and C. Long, 4D Transverse Phase Space Tomography of an Operational Hydrogen Ion Beam via Noninvasive 2D Measurements Using Laser Wires, Phys. Rev. Accel. Beams 25, 042801 (2022).
[4] A. Hoover, Four-dimensional phase space tomography from one-dimensional measurements of a hadron beam, Physical Review Accelerators and Beams 27, 122802 (2024).
[5] A. Hoover and J. Wong, High-dimensional maximum-entropy phase space tomography using normalizing flows, Physical Review Research 6.3, 033163 (2024).
[6] A. Hoover, N-dimensional maximum-entropy tomography via particle sampling, arXiv preprint arXiv:2409.17915 (2024).