2025-stereograph
This repository contains pre-trained models, computed results, and analysis code for evaluating machine learning approaches (Random Forests, FCNs, and GNNs) on gamma-ray event reconstruction tasks.
Cite this software
Description
Models, results, and code for the study Stereograph: stereoscopic event reconstruction using graph neural networks applied to CTAO, Ali Messaoud et al 2026
Supplementary material of H. Ali Messaoud et al 2026. The paper compares three ways to reconstruct the energy, the gamma/hadron class and the direction of CTAO events from the parameters of each telescope: the ctapipe random forests (RF), a fully connected network (FC) and a graph neural network (GNN), on the same prod5b La Palma simulations.
Where to find what
| You want | Go to |
|---|---|
| the figures, with explanations, on a website | 2025-stereograph-9fa6dd.pages.in2p3.fr (source: book/) |
| the figures of the paper as PNG files | experiments/paper_figures/ |
| to rebuild these figures (a few seconds, no data needed) | experiments/paper_figures/README.md |
| how the results were produced: data, containers, configs, job scripts, checks | experiments/README.md |
| the IRFs and benchmarks behind the figures, per seed | experiments/multiplicity/results/ |
| the trained FC and GNN energy and classification models (5 seeds) and how to apply them to new data | experiments/FC/, experiments/GNN/ |
| the computing cost of RF, FC and GNN | experiments/FC/README.md, experiments/GNN/README.md, experiments/RF/README.md |
Everything in the paper comes from experiments/. The website is a Jupyter Book (book/) whose pages plot the figures from the results in the repository. The CI builds it on every push to main. To build it locally:
UV_PROJECT_ENVIRONMENT=.venv-docs uv sync --no-default-groups --group docs
cd book && PATH=../.venv-docs/bin:$PATH jupyter-book build --html --execute # needs Node.js; output in book/_build/html
Installation
Requirements: Python 3.10 and uv.
uv sync
source .venv/bin/activate
This environment is enough to rebuild the figures of the paper:
experiments/paper_figures/make_figures.sh
The final training, inference and IRFs ran on the LAPP HTCondor cluster, in the released containers listed in experiments/README.md (stereograph v4.1.0 for the GNN, FCStereo v1.0.0 for the FC, stereograph v4.1.1 with ctapipe 0.24 for the IRFs), not in the environments below.
Two ctapipe environments
The two ctapipe versions cannot share one environment:
| Environment | ctapipe | Created with | Used for |
|---|---|---|---|
.venv | 0.19.0 | uv sync | stereograph (stereograph==4.0.0 pins ctapipe==0.19.0) |
.venv-ctapipe024 | 0.24.0 | UV_PROJECT_ENVIRONMENT=.venv-ctapipe024 uv sync --no-default-groups --group ctapipe024 | ctapipe-compute-irf and the IRF scripts |
The two versions are declared as dependency groups in pyproject.toml and locked in uv.lock. Groups train and ctapipe024 are declared as conflicting, so uv never resolves them together. Check which one is active with python -c "import ctapipe; print(ctapipe.__version__)".
Code
- GNN: stereograph
- FC: FCStereo
Data
The study uses the CTAO prod5b simulations of La Palma (Prod5b_lapalma_alpha_zen020az180nsb01x_v0.19.3): alpha configuration (4 LST + 9 MST), 20° zenith, 180° azimuth, processed to DL2 with ctapipe 0.19. The files are listed in experiments/FC/settings.sh. They are not public.
Public CTAO simulations with lower statistics are available on Zenodo: https://zenodo.org/records/7298569
Other material
- The configs, models, IRFs and job scripts of the first version of the study are in the git history (before the removal of
configs/,models/,results/,notebooks/andscripts/*.sh) and in the earlier releases archived on Zenodo. docs/htcondor_tutorial.mdexplains how to run a stereograph experiment on HTCondor.
Contributing
Report issues with the issue tracker of this repository, or contact the authors.
License
Apache License 2.0, see LICENSE.