Skip to content
/ bhnerf Public
forked from aviadlevis/bhnerf

Emission tomography with gravitational lensing using Neural Radiance Fields (NeRF)

License

Notifications You must be signed in to change notification settings

joelAVS/bhnerf

 
 

Repository files navigation

bhnerf

Gravitationally Lensed Black Hole Emission Tomography using Neural Radiance Fields (NeRF).

Geodesics (photon trajectories) are computed using kgeo. This raytracing implementation of null geodesics in the Kerr metric uses the formalism of Gralla and Lupsasca 2019.

Installation

Clone bhnerf repository with the kgeo submodule

git clone --recurse-submodules https://github.com/aviadlevis/bhnerf.git
cd bhnerf

Start a conda virtual environment and add channels

conda create -n bhnerf
conda activate bhnerf

If not added already add conda-forge and anaconda channels

conda config --add channels conda-forge
conda config --add channels anaconda

Install requirements

conda install --file requirements.txt

Install xarray and its dependencies

conda install -c conda-forge xarray dask netCDF4 bottleneck

Install jax

pip install --upgrade pip
pip install --upgrade jax jaxlib>=0.1.69+cuda101 -f https://storage.googleapis.com/jax-releases/jax_releases.html

Note that in the line above the number next to cude should be replaced with version of the existing CUDA installation (see GitHub issue), for example CUDA10.1 --> cuda101. You can find your CUDA version using nvcc --version

Install eht-imaging

conda install -c conda-forge pynfft requests scikit-image
git clone https://github.com/achael/eht-imaging.git
cd eht-imaging
pip install .
cd ../

Install bhnerf

pip install .

Note currently kgeo requires an experimental scipy version which has elliptic integrals implemented

pip install scipy==1.8.0rc4

Getting Started

The easiest way to get started is through the jupyter notebooks in the tutorials directory. These notebooks cover both the synthetic data generation (forward) and emission estimation (inverse) methods and procedures. Furthermore, basic utility and visualization methods are introduced.

© Aviad Levis, California Institute of Technology, 2022.

About

Emission tomography with gravitational lensing using Neural Radiance Fields (NeRF)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 93.3%
  • Python 6.7%