Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Beam Phase Space Reconstruction - MENT Algorithm #287

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

otavio-silveira
Copy link
Contributor

Description

This pull request adds a script to perform tomographic reconstructions of the transverse phase space of electron beam using the maximum entropy method (MENT) described in:
J. J. Scheins. Tomographic Reconstruction of Transverse and Longitudinal Phase Space Distributions using the Maximum Entropy Algorithm. DESY, May 10, 2004.

Objective

The goal is to reconstruct the beam's phase space at the end of the LINAC, using quadrupole scans and the emittance measurement screen.

Implementation

Script ment_reconstruction.py
The script reconstructs two-dimensional distributions from their one-dimensional projections. It includes the following main classes:

  1. ScreenProcess
    Responsible for processing screen images. It provides functionalities such as scaling, cropping, and extracting projections from images.
  2. ConvexPolygon
    Defines a grid of convex polygons constructed from the intersection of lines derived from the projections bins and transformed by transformation matrices
  3. DistribReconstruction
    It performs the reconstruction of the beam distribution using the provided projections and applying MENT algorithm.

Additionally, the script includes auxiliary functions to facilitate visualization such as plot_lines, plot_convex, paint_convex.

Script trans_matrices.py
This script implements typical two-dimensional matrices used in ConvexPolygon to transform projection bins.

Notebook reconstruction_from_grid.ipynb
It demonstrates the method's implementation, using a simulated two-dimensional gaussian distribution

Testing, Validation and Next Steps

Initial tests were performed with simulated data in the notebook. The results indicate that the method successfully reconstructs gaussian distributions. The method are being used to reconstruct images from LINAC's screens.

@fernandohds564
Copy link
Contributor

Very nice @otavio-silveira. Please, put the notebook in the examples folder, in the root directory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants