Package: ehtim
Python modules for simulating and manipulating VLBI data and producing images with regularized maximum likelihood methods. This version is an early release so please raise an issue, submit a pull request, or emailachael@princeton.eduif 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 theImage,Movie,Array,Obsdata,Imager, andCaltableclasses, which provide tools for loading images and data, producing simulated data from realistic u-v tracks,  calibrating, inspecting, and  plotting data, and producing images from data sets in various polarizations using various data terms and regularizing functions.InstallationThe latest stable version (1.2.7) is available onPyPi. Simply install pip and runpipinstallehtimIncremental updates are developed on thedev branch. To use the very latest (unstable) code, checkout the dev branch, change to the main eht-imaging directory, and run:pipinstall.Installing with pip will update most of the required libraries automatically (numpy,scipy,matplotlib,astropy,ephem,future,h5py, andpandas).If you want to use fast fourier transforms, you will also need to separately installNFFTand itspynfft wrapper. The simplest way is to usecondato install both:condainstall-cconda-forgepynfftAlternatively, first install NFFT manually following the instructions on thereadme, making sure to use the--enable-openmpflag in compilation. Then installpynfft, with pip, following the readme instructions to link the installation to where you installed NFFT. Finally, reinstall ehtim.For M1 Macs (OS >= v12.0), install the M1 Mac version ofpynfftand follow the instructions on thereadme. It has the instructions to installfftw,nfftand thenpynfft.Certain eht-imaging functions require other external packages that are not automatically installed.In addition to pynfft, these includenetworkx(for image comparison functions),requests(for dynamical imaging), andscikit-image(for a few image analysis functions). However, the vast majority of the code will work without these dependencies.Documentation and TutorialsDocumentation ishere.A intro to imaging tutorial jupyter notebook can be found in the repo attutorials/ehtim_tutorial.ipynbSlidesfor the included tutorial walk through the basic steps of reconstructing EHT images with the codeHere are some other ways to learn to use the code:Start with the script examples/example.py, which contains a series of sample commands to load an image and array, generate data, and produce an image with various imaging algorithms.OlderSlidesfrom the EHT2016 data generation and imaging workshop contain a tutorial on generating data with the VLBI imagingwebsite, loading into the library, and producing an image.CitationIf you use ehtim in your publication, please citeChael+ 2018.The latest version is also available as a static doi onZenodo.Selected publications that use ehtimLet us know if you use ehtim in your publication and we’ll list it here!High-Resolution Linear Polarimetric Imaging for the Event Horizon Telescope,Chael et al. 2016Computational  Imaging for VLBI Image Reconstruction,Bouman et al. 2016Stochastic Optics: A Scattering Mitigation  Framework for Radio Interferometric Imaging,Johnson 2016Reconstructing Video from Interferometric Measurements of Time-Varying Sources,Bouman et al. 2017Dynamical Imaging with Interferometry,Johnson et al. 2017Interferometric Imaging Directly with Closure Phases and Closure Amplitudes,Chael et al. 2018A Model for Anisotropic Interstellar Scattering and its Application to Sgr A*,Psaltis et al. 2018The Currrent Ability to Test Theories of Gravity with Black Hole Shadows,Mizuno et al. 2018The Scattering and Intrinsic Structure of Sagittarius A* at Radio Wavelengths,Johnson et al. 2018Testing GR with the Black Hole Shadow Size and Asymmetry of Sagittarius A*: Limitations from Interstellar Scattering,Zhu et al. 2018The Size, Shape, and Scattering of Sagittarius A* at 86 GHz: First VLBI with ALMA,Issaoun et al. 2019aFirst M87 Event Horizon Telescope Results IV: Imaging the Central Supermassive Black Hole,EHTC et al. 2019VLBI Imaging of black holes via second moment regularization,Issaoun et al. 2019bUsing evolutionary algorithms to model relativistic jets: Application to NGC 1052,Fromm et al. 2019EHT-HOPS Pipeline for Millimeter VLBI Data Reduction,Blackburn et al. 2019Multi-wavelength torus-jet model for Sagittarius A*,Vincent et al. 2019How to tell an accreting boson star from a black hole,Olivares et al. 2020Discriminating Accretion States via Rotational Symmetry in Simulated Polarimetric Images of M87,Palumbo et al. 2020SYMBA: An end-to-end VLBI synthetic data generation pipeline,Roelofs et al. 2020Monitoring the Morphology of M87* in 2009-2017 with the Event Horizon Telescope,Wielgus et al. 2020EHT imaging of the archetypal blazar 3C 279 at extreme 20 microarcsecond resolution,Kim et al. 2020Verification of Radiative Transfer Schemes for the EHT,Gold et al. 2020Closure Traces: Novel Calibration-insensitive Quantities for Radio Astronomy,Broderick and Pesce. 2020Evaluation of New Submillimeter VLBI Sites for the Event Horizon Telescope,Raymond et al. 2021Imaging VGOS Observations and Investigating Source Structure Effects,Xu et al. 2021A D-term Modeling Code (DMC) for Simultaneous Calibration and Full-Stokes Imaging of VLBI Data,Pesce et al. 2021Polarization Images of Accretion Flows around Supermassive BLack Holes: Imprints of Toroidal Field Structure,Tsunetoe et al. 2021Using space-VLBI to probe gravity around Sgr A*,Fromm et al. 2021Persistent Non-Gaussian Structure in the Image of Sagittarius A* at 86 GHz,Issaoun et al. 2021First M87 Event Horizon Telescope Results. VII. Polarization of the Ring,EHTC et al. 2021Event Horizon Telescope observations of the jet launching and collimation in Centaurus A,Janssen et al. 2021RadioAstron discovers a mini-cocoon around the restarted parsec-scale jet in 3C 84Savolainen et al. 2021Unravelling the Innermost Jet Structure of OJ 287 with the First GMVA+ALMA Observations,Zhao et al. 2022oifits DocumentationThe oifits_new.py file used for reading/writing .oifits files is a slightly modified version of Paul Boley’s packageoifits.
The oifits read/write functionality in ehtim is still being developed and may not work with all versions of python or astropy.The documentation is styled afterdfm’s projectsLicenseehtim is licensed under GPLv3. See LICENSE.txt for more details.