An interactive web-based learning platform for graduate-level radiation physics concepts, focusing on photon interactions with matter.
This project provides three comprehensive interactive web applications that help students visualize and understand fundamental concepts in radiation physics:
- 📸 Photoelectric Effect - Einstein's quantum theory of light-matter interaction
- 🔄 Compton Scattering - Quantum scattering of photons by electrons
- ⚡ Pair Production - Photon conversion to electron-positron pairs
- Real-time calculations with adjustable parameters
- Dynamic visualizations using Plotly and Matplotlib
- 3D geometry demonstrations for scattering processes
- Educational annotations and theoretical explanations
- Historical context and experimental evidence
- Interactive sliders for parameter exploration
- Multiple visualization types (plots, schematics, 3D models)
- Conservation law demonstrations
- Cross-section calculations
- Material property databases
- Streamlit-based web applications
- Modular architecture with shared physics utilities
- Real physics constants from CODATA 2022
- Responsive design for various screen sizes
RadPhysicsMPHY604/
├── main.py # Main navigation page
├── requirements.txt # Python dependencies
├── README.md # This file
├── shared/ # Shared utilities
│ ├── physics_constants.py # Fundamental constants
│ ├── physics_calculations.py # Calculation functions
│ └── plotting_utils.py # Visualization utilities
├── apps/ # Individual concept apps
│ ├── photoelectric/
│ │ └── photoelectric_app.py
│ ├── compton_scattering/
│ │ └── compton_app.py
│ └── pair_production/
│ └── pair_app.py
└── utils/ # Additional utilities
-
Clone the repository:
git clone <repository-url> cd RadPhysicsMPHY604
-
Install uv (if not already installed):
curl -LsSf https://astral.sh/uv/install.sh | sh -
Set up the project with uv:
# Install dependencies and create virtual environment uv sync # Or run the setup script ./setup.sh
uv run python run_apps.pyThis provides an interactive menu to choose which application to run.
uv run streamlit run main.pyThis launches the main page where you can choose which concept to explore.
You can also run each app directly:
# Photoelectric Effect
uv run streamlit run apps/photoelectric/photoelectric_app.py
# Compton Scattering
uv run streamlit run apps/compton_scattering/compton_app.py
# Pair Production
uv run streamlit run apps/pair_production/pair_app.pyOnce the project script is configured, you can also use:
uv run radphysics # Interactive launcher- Einstein's photoelectric equation (Eₖ = hν - φ)
- Work function for common materials
- Threshold frequency calculations
- Energy-frequency relationships
- Interactive wavelength converter
- Historical development and experimental evidence
- Compton wavelength shift (Δλ = λ₊(1-cosθ))
- Energy-momentum conservation
- Scattering angle dependence
- 3D geometry visualization
- Polar plot representations
- Recoil electron calculations
- Energy threshold (1.022 MeV)
- Nuclear field effects
- Conservation laws demonstration
- Cross-section calculations
- Process schematics
- Medical applications (PET imaging)
- Real physics constants (Planck's constant, speed of light, electron mass)
- Proper unit conversions (eV ↔ keV ↔ MeV ↔ Joules)
- Relativistic effects where applicable
- Conservation law verification
- Real-time parameter updates
- Multiple visualization modes
- Educational annotations
- Comparative analysis tools
Students using these apps will be able to:
- Visualize fundamental quantum processes
- Calculate physical quantities with real-time feedback
- Explore parameter dependencies and relationships
- Understand conservation principles in action
- Connect theoretical concepts with practical applications
- Analyze experimental data and theoretical predictions
- Medical Physics - Radiation therapy planning
- Nuclear Physics - Particle interactions
- Quantum Mechanics - Photon-matter interactions
- Health Physics - Radiation protection
- Parameter studies for experimental design
- Educational demonstrations for lectures
- Student projects and assignments
- Concept validation through visualization
This project welcomes contributions! Areas for improvement:
- Additional physics concepts (e.g., Rayleigh scattering, bremsstrahlung)
- More material properties and interaction data
- Enhanced visualizations (animations, VR support)
- Assessment tools and quizzes
- Multi-language support
This educational project is open-source and available under the MIT License.
- Physics constants from CODATA 2022
- Educational inspiration from classic physics texts
- Open-source libraries enabling interactive web applications
For questions, issues, or suggestions:
- Check the individual app documentation
- Review the physics calculations in
shared/ - Open an issue in the repository
Built with ❤️ for physics education using Python, Streamlit, and modern web technologies.