KerrP2P
is a software designed for forward ray tracing in Kerr spacetime. It is specifically tailored to efficiently calculate multiple null geodesics between designated "source" and "observer" points, locate apparent positions of the corresponding images, and quantify their shapes. Detailed information can be found in the paper Forward Ray Tracing and Hot Spots in Kerr Spacetime by Lihang Zhou, Zhen Zhong, Yifan Chen, and Vitor Cardoso.
Using Jacobi elliptic functions to express the solutions to the geodesic equations based on Gralla and Lupsasca 2019, this software consists of two tools.
-
A Python/C++ package that computes null geodesics and thoroughly explores the parameter space to identify multiple images. Tutorials for it are presented in the folder
examples
:tutorial_float64_sweep.ipynb
: geodesic calculation and parameter space sweep in double precisiontutorial_float128or256.ipynb
: geodesic calculation in quad/oct precisioncpp_tutorial_basic.cpp
: geodesic calculationcpp_tutorial_sweep.cpp
: parameter space sweep
-
A Mathematica code:
examples/tutorial_geodesic_and_image.nb
. It also includes functions for geodesic calculation and can be utilized to visualize geodesics, image positions, and image shapes.
- Forward ray tracing in Kerr spacetime: this involves calculating multiple null geodesics that connects a given source to an observer
- Support for arbitrary precision arithmetic
- Python bindings for easy to use interface
- Support for multiple platforms: Linux, macOS, and Windows
Before installing KerrP2P
, ensure that you have the following dependencies installed on your system:
- Boost (with filesystem components)
- Catch2 (optional, for testing)
- fmt
- GMP (optional)
- MPFR (optional)
- MPC (optional)
- Eigen
- Intel oneAPI TBB
- Python (optional)
- pybind11 (optional)
On Linux, you can use Spack to install the dependencies:
spack:
specs:
- boost+filesystem
- catch2
- fmt
- gmp
- mpfr
- mpc
- eigen
- intel-oneapi-tbb
- python
- py-pybind11
view: true
concretizer:
unify: true
On macOS, you can use Homebrew to install the dependencies:
brew install boost catch2 fmt gmp mpfr mpc eigen tbb python pybind11
On Windows, you can use vcpkg to install the dependencies:
vcpkg.exe install boost catch2 fmt eigen3 tbb python3 pybind11
To use KerrP2P
, follow these steps:
- Clone the repository:
git clone https://github.com/your_username/KerrP2P.git
- Build the project using CMake.
cd KerrP2P
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make
Remember to copy the generated .so file to your working directory.
Contributions to KerrP2P
are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request on the GitHub repository.
KerrP2P
is released under the MIT License. See the LICENSE file for more details.
If you use KerrP2P
in your research, please cite the following paper:
@article{Zhou:2024dbc,
author = "Zhou, Lihang and Zhong, Zhen and Chen, Yifan and Cardoso, Vitor",
title = "{Forward Ray Tracing and Hot Spots in Kerr Spacetime}",
eprint = "2408.16049",
journal = "",
archivePrefix = "arXiv",
primaryClass = "gr-qc",
month = "8",
year = "2024"
}