ehtim (eht-imaging)

Python modules for simulating and manipulating VLBI data and producing images with regularized maximum likelihood methods. This version is an early release so please submit a pull request or email if you have trouble or need help for your application.

The package contains several primary classes for loading, simulating, and manipulating VLBI data. The main classes are the Image, Array, and Obsdata, which provide tools for manipulating images, simulating interferometric data from images, and plotting and analyzing these data. Movie and Vex provide tools for producing time-variable simulated data and observing with real VLBI tracks from .vex files. imager is a generic imager class that can produce images from data sets in various polarizationsusing various data terms and regularizers.


This is a pre-release of ehtim. If you have a problem please submit a pull request on the git repository and/or email


Download the latest version from the GitHub repository, change to the main directory and run:

pip install .

It should install most of the required libraries automatically (astropy, ephem, future, h5py , html , networkx, numpy, pandas , matplotlib, requests, scipy, skimage).

If you want to use fast fourier transforms, you will also need to separately install NFFT and its pynnft wrapper. The simplest way is to use conda to to install both:

conda install -c conda-forge pynfft

Alternatively, first install NFFT manually following the instructions on the readme, making sure to use the --enable-openmp flag in compilation. Then install pynft, with pip, following the readme instructions to link the installation to where you installed NFFT. Finally, reinstall ehtim.


Tutorials are in progress, but here are some ways to learn the code

  • The script in examples/ has a series of sample commands to load an image and array, generate data, and produce an image with regularized maximum likelihood on closure quantities.
  • Slides from the EHT 2016 conference data generation and imaging workshop contain a tutorial on generating data externally with the vlbi imaging website, loading into the library, and producing an image.


The oifits_new code used for reading/writing .oifits files is a slightly modified version of Paul Boley’s package at The oifits read/write functionality is still being tested and may not work with all versions of python.

This documentation is styled after dfm’s projects and the documentation for scatterbrane


ehtim is licensed under GPLv3. See LICENSE.txt for more details.

Indices and tables