TARTARUS: A High-Performance Python Code for Ray Tracing in Curved Spacetimes
Abstract
The recent observations of the supermassive black holes M87* and Sagittarius A* by the Event Horizon Telescope collaboration (EHT) have shown the need for robust, efficient, and accessible numerical tools to model light propagation in strongly curved spacetimes. Comparing theoretical accretion models with observational data relies heavily on ray-tracing algorithms that calculate the trajectories of photons traveling from a source plasma to a distant observer. In this paper, we present TARTARUS (Tracer for Astrophysical Ray Trajectories Around Relativistic Ultra-compact Sources), a new, highly modular, and extensible Python-based framework for computing null geodesics around compact objects. By leveraging Just-In-Time (JIT) compilation via Numba, TARTARUS bridges the gap between Python's high-level accessibility and the execution speed of compiled languages like C++ or FORTRAN. The code supports multiple native solvers (including adaptive embedded Runge-Kutta pairs, a Bulirsch-Stoer extrapolator, and a Verlet scheme), event-detection mechanics for handling structural intersections (e.g. event horizons and accretion disks), and support for both analytical and numerically generated background metrics. We demonstrate the code's physical accuracy and computational efficiency through some tests, including the evaluation of the Hamiltonian constraint conservation and ray-tracing of the shadow and the Novikov-Thorne thin accretion disks around a Kerr black hole.
Related
- Color-Kinematics Duality and the Double Copy in Curved Spacetimes
- GPUPHOT: A Python Framework for High-Performance GPU-Accelerated Photometry and Distributed Astronomical Data Reduction
- Relativistic Spherical Accretion in Nonrotating Black Hole Spacetimes: Astrophysical Implications
- IViS: Interferometric Visibility-domain inversion Software. A GPU-accelerated Python framework for joint deconvolution with ASKAP
- Tracing gas outflows in molecular gas-rich galaxies with the SKA
BibTeX
@misc{bambague2026tartarus,
title = {{TARTARUS: A High-Performance Python Code for Ray Tracing in Curved Spacetimes}},
author = {David F. Bambague and Alexis Larrañaga},
howpublished = {arXiv},
year = {2026},
month = sep,
doi = {10.48550/arxiv.2609.08989},
eprint = {2609.08989},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/2609.08989},
}
RIS
TY - UNPB
TI - TARTARUS: A High-Performance Python Code for Ray Tracing in Curved Spacetimes
AU - David F. Bambague
AU - Alexis Larrañaga
PY - 2026
DA - 2026/09/08
PB - arXiv
DO - 10.48550/arxiv.2609.08989
UR - https://arxiv.org/abs/2609.08989
AB - The recent observations of the supermassive black holes M87* and Sagittarius A* by the Event Horizon Telescope collaboration (EHT) have shown the need for robust, efficient, and accessible numerical tools to model light propagation in strongly curved spacetimes. Comparing theoretical accretion models with observational data relies heavily on ray-tracing algorithms that calculate the trajectories of photons traveling from a source plasma to a distant observer. In this paper, we present TARTARUS (Tracer for Astrophysical Ray Trajectories Around Relativistic Ultra-compact Sources), a new, highly modular, and extensible Python-based framework for computing null geodesics around compact objects. By leveraging Just-In-Time (JIT) compilation via Numba, TARTARUS bridges the gap between Python's high-level accessibility and the execution speed of compiled languages like C++ or FORTRAN. The code supports multiple native solvers (including adaptive embedded Runge-Kutta pairs, a Bulirsch-Stoer extrapolator, and a Verlet scheme), event-detection mechanics for handling structural intersections (e.g. event horizons and accretion disks), and support for both analytical and numerically generated background metrics. We demonstrate the code's physical accuracy and computational efficiency through some tests, including the evaluation of the Hamiltonian constraint conservation and ray-tracing of the shadow and the Novikov-Thorne thin accretion disks around a Kerr black hole.
ER -