mirror of
https://github.com/jwinterm/geant4-radiation-labs.git
synced 2026-10-17 05:41:25 +02:00
a9f82765f6d356de7a562a7a6e0877cbe68156e2
Both Edep and PET-spectrum distributions span several orders of magnitude because of the huge zero-deposit / Compton-continuum populations. Linear y compresses the structure to a single spike at zero; log y exposes the photopeak, full-energy peak, and tail features. Updated: - lab3 analyze_basic.py: single-panel hist - lab3 analyze_advanced.py: panels 1 & 2 - lab3 compare_particles.py: all 4 panels (3 individual + density overlay) - lab4 analyze_spectrum.py: PET energy spectrum Regenerated PNGs and committed alongside the .qmd updates.
Geant4 Radiation Labs
A four-lab series taking you from a fresh Linux install to a working PET-scanner simulation, using Geant4 for the physics and Python (pandas, matplotlib) for analysis.
Read the labs at: https://jwinterm.github.io/geant4-radiation-labs/
Labs
| Title | Topic | |
|---|---|---|
| 1 | Setting Up Linux and Building Geant4 | Ubuntu VM + Geant4 build with Qt visualization |
| 2 | First Simulation: Building and Running B1 | Compile B1, run interactively + via macros, vary particle/energy |
| 3 | Acquiring and Analyzing Simulation Data | Patch B1 to write CSV via G4AnalysisManager; analyze in Python |
| 4 | Medical Physics Application: A PET Scanner | Use B3a PET example; identify 511 keV photopeak; reconstruct lines of response |
Building locally
This site is built with Quarto. To preview locally:
quarto preview
To regenerate a single lab as PDF:
quarto render lab1_setup/lab1.qmd --to pdf
Authors
John Murphy and Steven Carlson
Languages
Python
100%