Skip to content


Repository files navigation


Project page | Paper | Supplemental material

Aviad Levis, Daeyoung Lee, Joel A. Tropp, Charles F. Gammie, and Katherine L. Bouman (2021). "Inference of Black Hole Fluid-Dynamics from Sparse Interferometric Measurements." In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 2340-2349. 2021.

      title={Inference of Black Hole Fluid-Dynamics from Sparse Interferometric Measurements},
      author={Levis, Aviad and Lee, Daeyoung and Tropp, Joel A and Gammie, Charles F and Bouman, Katherine L},
      booktitle={Proceedings of the IEEE/CVF International Conference on Computer Vision},

pynoisy is:

  1. A python wrapper for a modified version of the inoisy code [1] that supports arbitrary xarray matrices as diffusion tensor fields. pynoisy can be used to generate 3D (spatio-temporal) Gaussian Random Fields (GRFs) as solutions to a stochastic partial differential equation [2,3] (SPDE), which is solved using HYPRE computing library [4]. Tutorial1 within the tutorials directory gives a notebook example on generation of GRFs.

  2. A tool for inferring parameters of stochastic fluid dynamics of black-hole accretion from Event Horizon Telescope (EHT) measurements. EHT measurements are Very Large Baseline Intereferometric (VLBI) measurements which are synthesized using eht-imaging [5].

Installation (a non-complete guide)

Installation using using anaconda package management.


The installation steps assume that MPI (e.g. openmpi, mpich) is installed and was tested on Linux Ubuntu 18.04.5. For a self-contained list of instructions see the Singularity .def file which can be used to generate a container with MPI and conda as explained below. A partial list of the prerequisites include gcc, gsl, and hdf5 which can be installed using

sudo apt-get install libgsl-dev
sudo apt-get install gcc gfortran g++ make

Installing OpenMPI with HDF5 on Ubuntu using apt worked (dated: 11/09/2021)

sudo apt update
sudo apt install openmpi-bin openmpi-common openmpi-doc libopenmpi-dev
sudo apt install libhdf5-openmpi-dev


Clone pynoisy repository with the inoisy submodule

git clone --recurse-submodules
cd pynoisy

Clone and install HYPRE library. If HYPRE was previously installed make sure to have HYPRE_DIR point to the right path.

git clone
cd hypre/src
make install
cd ../../

Start a virtual environment with new environment variables

conda create -n pynoisy python=3.7.4
conda activate pynoisy
conda env config vars set INOISY_DIR=$(pwd)/inoisy HYPRE_DIR=$(pwd)/hypre/src/hypre 
conda env config vars set LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$(pwd)/hypre/src/hypre/lib/
conda activate pynoisy

Install pynoisy

conda install --file requirements.txt
pip install .

Install xarray and its dependencies

conda install -c conda-forge xarray dask netCDF4 bottleneck

Install eht-imaging

conda install -c conda-forge pynfft requests scikit-image
git clone
cd eht-imaging
pip install .
cd ../

Getting Started

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

Singularity Container

Login and enter API access token

singularity remote login

Build the image to a .sif file

singularity build --remote pynoisy_mpi.sif pynoisy_mpi.def

Run a singularity shell

singularity shell pynoisy_mpi.sif

Proceed with the installation instruction (above) cloning and installing pynoisy and the required dependencies (HYPRE, xarray, eht-imaging etc).


  1. inoisy code
  2. Lee, D. and Gammie, C.F., 2021. Disks as Inhomogeneous, Anisotropic Gaussian Random Fields. The Astrophysical Journal, 906(1), p.39.
  3. Lindgren, F., Rue, H. and Lindström, J., 2011. An explicit link between Gaussian fields and Gaussian Markov random fields: the stochastic partial differential equation approach. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 73(4), pp.423-498.
  4. HYPRE computing library
  5. eht-imaging code

© Aviad Levis, California Institute of Technology, 2020.


A python wrapper for the Illinois inoisy code implementing a stochastic anisotropic diffusion model to generate space-time Gaussian random fields.






No releases published


No packages published