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.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.11.2
File Size Uploaded Provenance Actions
iactrace-0.11.2.tar.gz 131.3 kB With provenance Details for iactrace-0.11.2.tar.gz

Built distribution (wheel)

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

Total release size: 288.9 kB

Release files / iactrace-0.11.2.tar.gz

Download URL iactrace-0.11.2.tar.gz
Size 131.3 kB
Tags Source
SHA-256 checksum
How to use checksums
94f2627f22b579dc2b6be29dc9ae1aee3f6cf2b705919b73535c2252428678e1
BLAKE2b-256 checksum
How to use checksums
62a7c17b8e83825e659bbdc4d7625797ad29a5a8cc3bad0cfa2ae97809e2343a
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 7, 2026.

Transparency log

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

Download URL iactrace-0.11.2-py3-none-any.whl
Size 157.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3590196b92124b9847d25195023b05a2e1a2f893132d1f13d18744ead876054e
BLAKE2b-256 checksum
How to use checksums
d7fe14ad1992fd1cbf72a69d3e5044ad7f24723959e677f644b59abac271a644
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 7, 2026.

Transparency log

Security for iactrace 0.11.2

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.2.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 7, 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