This repository contains a GUI application built with PyQt5, designed to calculate the beam profile from images captured with a streak camera at VEPP-4M, NovoFEL, and VEPP-2000. The tool allows users to visualize images, analyze beam profiles, and generate data plots to study the energy spread and beam characteristics based on synchrotron radiation data.
The Beam Profile Analysis GUI provides an intuitive interface for beam diagnostics by leveraging streak camera images captured at Russian research facilities, including VEPP-4M, NovoFEL, and VEPP-2000. Using these images, the tool extracts the beam profile and calculates key parameters such as beam length and energy spread, crucial for synchrotron radiation analysis. The GUI simplifies complex operations, offering researchers a flexible and interactive platform for real-time data visualization and analysis.
- Facilities: VEPP-4M, NovoFEL, VEPP-2000
- Techniques: Streak camera imaging, PyQt5 for GUI, and synchrotron radiation analysis
- Purpose: Facilitate beam energy spread measurements and provide visual profile data for further research in nuclear and particle physics.
- Image Import: Supports standard image file formats and
.npy
files for compatibility with diverse data sources. - Image Visualization: Display images of streak camera captures with adjustable contrast for faint or dark images.
- Beam Profile Calculation: Plot both vertical and horizontal beam profiles, yielding Gaussian-like curves to determine beam width and other parameters.
- Energy Spread Calculation: Computes energy spread using the synchrotron radiation frequency.
- File-Based Analysis: Handles multiple formats, such as
.png
,.jpg
, and.npy
, ensuring flexibility in input file handling. - Webcam Integration: Connects to a webcam for image capture, allowing real-time visualization and analysis.
-
Clone the Repository
git clone https://github.com/yourusername/beam-profile-gui.git cd beam-profile-gui
-
Set Up the Virtual Environment (optional but recommended)
python3 -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install Dependencies
pip install -r requirements.txt
-
Run the GUI Application
python main.py
- Launch the application using
python main.py
. - Use the file upload feature to select a streak camera image.
- Choose the type of analysis (horizontal or vertical profile) you wish to perform.
- Adjust visualization settings for faint images.
- View the calculated beam profile, which can be saved or further analyzed.
beam-profile-gui/
├── main.py # Entry point for the application
├── gui/ # PyQt5 GUI elements and layout files
├── images/ # Sample images for testing
├── utils/ # Utility functions for calculations and processing
├── data/ # Folder to store output profiles and logs
├── requirements.txt # List of dependencies
└── README.md # Project documentation
Contributions are welcome! If you’d like to add new features or improve existing ones, please follow these steps:
- Fork the repository.
- Create a new branch for your feature (
git checkout -b feature-name
). - Commit your changes (
git commit -m "Add new feature"
). - Push to the branch (
git push origin feature-name
). - Submit a pull request.
This project is licensed under the MIT License. See the LICENSE
file for details.
Thank you for using the Beam Profile Analysis GUI! For any issues or suggestions, feel free to open an issue on GitHub or reach out.