OCTOPUS: A Versatile, User-Friendly, and Extensible Public Code for General-Relativistic Ray-Tracing in Spherically Symmetric and Static Spacetimes
Shiyang Hu, Shijie Tan, Dan Li, Lina Zhang, Chen Deng, Wenfu Cao
TL;DR
OCTOPUS addresses the need for an accessible, extensible public code to perform general-relativistic ray-tracing in static, spherically symmetric spacetimes. It combines backward ray-tracing with high-order numerical integrators to compute event horizons, photon rings, ISCOs, and observational features such as black-hole shadows, accretion-disk images, gravitational lensing, hot-spot light curves, and Kludge gravitational waves. The framework requires only the metric potential $f(r)$ and its radial derivatives up to the third order, enabling rapid adaptation to alternative spacetimes, including those with dark-matter halos, and supports automated validation against analytic bounds. Key findings show that dark-matter halos strengthen the gravitational field, enlarging shadow-related features and modulating observable signatures, while maintaining numerical precision (Hamiltonian errors near machine precision) and offering scalable performance (images with 10^4 rays in seconds and large parameter studies in hours). The work provides a pipeline-ready tool for qualitative black-hole observables and multi-messenger studies, with planned extensions to axisymmetric spacetimes, polarization, and broader metric implementations.
Abstract
This paper presents OCTOPUS, a relativistic ray-tracing algorithm developed within a Fortran-based, OpenMP-accelerated framework, designed for asymptotically flat, spherically symmetric curved spacetimes. The code efficiently and accurately computes key relativistic features -- including the black hole event horizon, photon rings, critical curves, and innermost stable circular orbits -- and simulates black hole shadows, redshift factor distributions, accretion disk images, toroidal images, as well as gravitational lensing, light curves, and gravitational radiation from hot-spots. OCTOPUS provides an automated, modular solution for qualitative studies of black hole observables and multi-messenger correlations between electromagnetic and gravitational signals in curved spacetime. Its implementation requires only the metric potential and its first-, second-, and third-order radial derivatives as input, ensuring low user barriers while remaining highly extensible and adaptable. Using a Schwarzschild black hole surrounded by a Dehnen-type dark matter halo, we thoroughly validate the algorithm's precision, efficiency, and functionality, and investigate how dark matter halo parameters affect observational signatures. Our results demonstrate that increasing the scale and density of the dark matter halo strengthens the spacetime's gravitational field, an effect clearly reflected in black hole images and supported by hot-spot light curve signatures. A future version of OCTOPUS, with expanded capabilities for axisymmetric spacetimes, is planned for release.
