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

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.1
File Size Uploaded Provenance Actions
iactrace-0.11.1.tar.gz 131.2 kB With provenance Details for iactrace-0.11.1.tar.gz

Built distribution (wheel)

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

Total release size: 288.8 kB

Release files / iactrace-0.11.1.tar.gz

Download URL iactrace-0.11.1.tar.gz
Size 131.2 kB
Tags Source
SHA-256 checksum
How to use checksums
da60d01b930da16cde51807dffca802bf9c6dac3e14f46b3f469a8a2069187c4
BLAKE2b-256 checksum
How to use checksums
391d6fb8ddaf176848deca055e5d45737eec8bcb799b4e46a7bc7cbfe01e5f58
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 6, 2026.

Transparency log

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

Download URL iactrace-0.11.1-py3-none-any.whl
Size 157.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5710121a1f9883afbf08458bf0342f799bda37ff4f4efbc725b626286ac2d925
BLAKE2b-256 checksum
How to use checksums
c9fb15534c60a487ec4b2bf809f0db7d2b5d312bfa21862dfcd8a6a4a36d4d91
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 6, 2026.

Transparency log

Security for iactrace 0.11.1

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for iactrace-0.11.1.tar.gz

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 Nov 6, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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