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

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.10.2
File Size Uploaded
iactrace-0.10.2.tar.gz 123.2 kB Details

Built distribution (wheel)

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

Total release size: 266.3 kB

Release files / iactrace-0.10.2.tar.gz

Download URL iactrace-0.10.2.tar.gz
Size 123.2 kB
Tags Source
SHA-256 checksum
How to use checksums
9cb2d050285ca9c55d5e29b5cb6bbd791315d5f7e6e62683611cb7dc3ad4452f
BLAKE2b-256 checksum
How to use checksums
faf4bcdfd55b2dc1a7804b37ab3f14443bfb20fd0e5dfb580c3912165f69d5a1
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

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

Download URL iactrace-0.10.2-py3-none-any.whl
Size 143.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5448135522e411f95bc5f87051d3a0195c4bb2670f8937ced893c80260ce2713
BLAKE2b-256 checksum
How to use checksums
2f2be7206cb4aa1183a0586ba09ef040d65d5e8f45b656afc80c0f4addb27dfc
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

Release history Release notifications | RSS feed

0.11.0

2 release files

0.10.3

2 release files

This release

0.10.2 This release

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