Skip to main content

IACTrace

Python License Checked with mypy Ruff codecov

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.11.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for iactrace 0.11.0
File Size Uploaded
iactrace-0.11.0.tar.gz 131.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for iactrace 0.11.0
File Interpreter ABI Platform
iactrace-0.11.0-py3-none-any.whl Python 3 none any Details

Total release size: 289.2 kB

Release files / iactrace-0.11.0.tar.gz

Download URL iactrace-0.11.0.tar.gz
Size 131.4 kB
Tags Source
SHA-256 checksum
How to use checksums
b14e926b18e50f16ade75fcddffcb589c398ca6ecfc5082cd675aa9bbb254044
BLAKE2b-256 checksum
How to use checksums
959700022eb6b493a7dcde0e99c46a1be872ab47adcafaf1cea5cd1a66467dd4
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 Sep 27, 2026.

Transparency log

Release files / iactrace-0.11.0-py3-none-any.whl

Download URL iactrace-0.11.0-py3-none-any.whl
Size 157.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a50d4819ab05d5c0dfbfec101db6f808422b6240fa6bbe2214a8bff41d8a64e0
BLAKE2b-256 checksum
How to use checksums
414e6516698ca6b10e3e820cc7392045296386c60f6f2b0294226687a1a3a69c
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 Sep 27, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.11.0 This release

2 release files

0.10.3

2 release files

0.10.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page