IACTrace
JAX-based optical ray tracing for Imaging Atmospheric Cherenkov Telescopes
IACTrace is a differentiable ray tracing library for simulating the optical properties of IACT (Imaging Atmospheric Cherenkov Telescope) systems. Built on JAX and Equinox, it supports automatic differentiation for optimization and inverse problems.
Features
- Differentiable ray tracing with JAX
- Multi-stage optical systems: segmented primaries, secondary mirrors, lenses and windows
- Square and hexagonal sensor arrays with per-pixel light concentrators (Winston / Okumura cones)
- Physical photodetectors: PMTs, SiPMs can be connected in-line with concentrators
- Aspheric, Zernike and freeform surfaces, plus error models (roughness, misalignment, figure errors)
- Obstruction modeling (cylinders, boxes, spheres, oriented boxes, triangles)
- YAML-based telescope and camera configuration
- Response matrix calculation
Installation
pip install iactrace
Or straight from the repository:
pip install git+https://github.com/GerritRo/iactrace/
For development:
git clone https://github.com/GerritRo/iactrace.git
cd iactrace
pip install -e ".[dev]"
Quick Start
Telescope and camera are configured with separate YAML files and loaded independently.
import jax
import jax.numpy as jnp
from iactrace import Telescope, Camera
# Random key for Monte Carlo ray sampling.
key = jax.random.key(0)
# Load the telescope (optics + camera frame) and the camera (sensor layout).
telescope = Telescope.from_yaml("configs/HESS/CT3.yaml", n_samples=256, key=key)
camera = Camera.from_yaml("configs/HESS/HESS1U.yaml")
# Simulate an on-axis astronomical source (parallel light).
directions = jnp.array([[0.0, 0.0, -1.0]])
values = jnp.array([1.0])
# render() traces rays through the optics and returns a lazy ray bundle;
# camera.image() folds it into the pixel image.
ray_bundle = telescope.render(directions, values, source_type="parallel")
image = camera.image(ray_bundle)
See the Quick Start guide for point sources, off-axis geometry, and visualization.
Documentation
Full documentation and examples are available at: https://gerritro.github.io/iactrace/
Building Documentation Locally
pip install -e ".[docs]"
cd docs && make html
License
BSD-3-Clause License - see LICENSE for details.
Citation
If you use IACTrace in your research, please cite this repository.
Metadata
Release files for iactrace 0.10.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| iactrace-0.10.3.tar.gz | 124.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| iactrace-0.10.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 268.9 kB
Release files / iactrace-0.10.3.tar.gz
| Download URL | iactrace-0.10.3.tar.gz |
|---|---|
| Size | 124.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2f7285cb5a38ded7880776e7a5dc743541e7bc3193755c647e0f354de5c5c101
|
|
BLAKE2b-256 checksum How to use checksums |
579d8cc8e49a6e60042234f1144a46782ce947d77e183e0ee2416d34d918661d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 19, 2026.
Transparency logRelease files / iactrace-0.10.3-py3-none-any.whl
| Download URL | iactrace-0.10.3-py3-none-any.whl |
|---|---|
| Size | 144.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
831cc8e2d6f6ca5e5bb5017b18f9cd745c85b859ba79e2e981e5a93fdea16900
|
|
BLAKE2b-256 checksum How to use checksums |
daaa135efef90731c84ba06bf2568a38e4fdcfa8e44e4028124f9c66824b6405
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 19, 2026.
Transparency log