Skip to content

Commit 2612ee9

Browse files
committed
fixed bug in unpack_bl
1 parent 0a2a332 commit 2612ee9

3 files changed

Lines changed: 33 additions & 18 deletions

File tree

docs/source/conf.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,17 +56,17 @@
5656

5757
# General information about the project.
5858
project = u'ehtim'
59-
copyright = u'2021, Andrew Chael'
59+
copyright = u'2023, Andrew Chael'
6060
author = u'Andrew Chael'
6161

6262
# The version info for the project you're documenting, acts as replacement for
6363
# |version| and |release|, also used in various other places throughout the
6464
# built documents.
6565
#
6666
# The short X.Y version.
67-
version = u'1.2'
67+
version = u'1.2.6'
6868
# The full version, including alpha/beta/rc tags.
69-
release = u'1.2.3'
69+
release = u'1.2.6'
7070

7171
# The language for content autogenerated by Sphinx. Refer to documentation
7272
# for a list of supported languages.

docs/source/index.rst

Lines changed: 27 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,44 +5,58 @@
55
66
ehtim (eht-imaging)
77
===================
8+
.. image:: https://zenodo.org/badge/42943499.svg
9+
:target: https://zenodo.org/badge/latestdoi/42943499
810

911

10-
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 achael@cfa.harvard.edu if you have trouble or need help for your application.
12+
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 email achael@princeton.edu if you have trouble or need help for your application.
1113

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

1416
.. note::
1517

16-
This is a pre-release of ehtim. If you have a problem please submit a pull request on the git repository and/or email achael@cfa.harvard.edu
18+
This is a pre-release of ehtim. If you have a problem please submit a pull request on the git repository and/or email achael@princeton.edu.edu
1719

18-
Installation
19-
------------
20+
The latest stable version (`1.2.6 <https://github.com/achael/eht-imaging/releases/tag/v1.2.6>`_) is available on `PyPi <https://pypi.org/project/ehtim/>`_. Simply install pip and run
2021

21-
Download the latest version from the `GitHub repository <https://github.com/achael/eht-imaging>`_, change to the main directory and run:
22+
.. code-block:: bash
23+
24+
pip install ehtim
25+
26+
Incremental updates are developed on the `dev branch <https://github.com/achael/eht-imaging/tree/dev>`_. To use the very latest (unstable) code, checkout the dev branch, change to the main eht-imaging directory, and run:
2227

2328
.. code-block:: bash
2429
2530
pip install .
2631
32+
Installing with pip will update most of the required libraries automatically (`numpy <http://www.numpy.org/>`_, `scipy <http://www.scipy.org/>`_, `matplotlib <http://www.matplotlib.org/>`_, `astropy <http://www.astropy.org/>`_, `ephem <http://pypi.python.org/pypi/pyephem/>`_, `future <http://pypi.python.org/pypi/future>`_, `h5py <http://www.h5py.org/>`_, and `pandas <http://www.pandas.pydata.org/>`_).
2733

28-
It should install most of the required libraries automatically (`astropy <http://www.astropy.org/>`_, `ephem <http://pypi.python.org/pypi/pyephem/>`_, `future <http://pypi.python.org/pypi/future>`_, `h5py <http://www.h5py.org/>`_ , `html <http://www.decalage.info/python/html>`_ , `networkx <https://networkx.github.io/>`_, `numpy <http://www.numpy.org/>`_, `pandas <http://www.pandas.pydata.org/>`_ , `matplotlib <http://www.matplotlib.org/>`_, `requests <http://docs.python-requests.org/en/master/>`_, `scipy <http://www.scipy.org/>`_, `skimage <https://scikit-image.org/>`_).
34+
**If you want to use fast fourier transforms, you will also need to separately install** `NFFT <https://github.com/NFFT/nfft>`_ **and its** `pynfft wrapper <https://github.com/ghisvail/pyNFFT/>`__. The simplest way is to use `conda <https://anaconda.org/conda-forge/pynfft/>`__ to install both:
2935

30-
**If you want to use fast fourier transforms, you will also need to separately install** `NFFT <https://github.com/NFFT/nfft>`_ **and its** `pynnft wrapper <https://github.com/ghisvail/pyNFFT/>`_. The simplest way is to use `conda <https://anaconda.org/conda-forge/pynfft/>`__ to to install both:
3136

3237
.. code-block:: bash
3338
3439
conda install -c conda-forge pynfft
3540
36-
Alternatively, first install NFFT manually following the instructions on the `readme <https://github.com/NFFT/nfft>`_, making sure to use the :code:`--enable-openmp` flag in compilation. Then install `pynft <https://github.com/ghisvail/pyNFFT/>`_, with pip, following the readme instructions to link the installation to where you installed NFFT. Finally, reinstall ehtim.
41+
Alternatively, first install NFFT manually following the instructions on the `readme <https://github.com/NFFT/nfft>`__, making sure to use the ``--enable-openmp`` flag in compilation. Then install `pynfft <https://github.com/ghisvail/pyNFFT/>`__, with pip, following the readme instructions to link the installation to where you installed NFFT. Finally, reinstall ehtim.
3742

43+
**For M1 Macs (OS >= v12.0)**, install the M1 Mac version of `pynfft <https://github.com/rohandahale/pyNFFT.git>`__ and follow the instructions on the `readme <https://github.com/rohandahale/pyNFFT.git>`__. It has the instructions to install `fftw <http://www.fftw.org>`_, `nfft <https://github.com/NFFT/nfft>`__ and then `pynfft <https://github.com/rohandahale/pyNFFT.git>`__.
3844

39-
Tutorials
40-
-------------
45+
**Certain eht-imaging functions require other external packages that are not automatically installed.** In addition to pynfft, these include `networkx <https://networkx.github.io/>`_ (for image comparison functions), `requests <http://docs.python-requests.org/en/master/>`_ (for dynamical imaging), and `scikit-image <https://scikit-image.org/>`_ (for a few image analysis functions). However, the vast majority of the code will work without these dependencies.
46+
47+
Documentation and Tutorials
48+
---------------------------
49+
Documentation is `here <https://achael.github.io/eht-imaging>`_.
50+
51+
A intro to imaging tutorial jupyter notebook can be found in the repo at `tutorials/ehtim_tutorial.ipynb <https://github.com/achael/eht-imaging/blob/main/tutorials/ehtim_tutorial.ipynb>`__
52+
53+
`Slides <https://docs.google.com/presentation/d/1A0y9omYI2ueSUa6_t5reylBhw6eiLwjqDzw-HUOk8Ac/edit?usp=sharing>`__ for the included tutorial walk through the basic steps of reconstructing EHT images with the code
54+
55+
Here are some other ways to learn to use the code:
4156

42-
Tutorials are in progress, but here are some ways to learn the code
57+
- 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.
4358

44-
- The script in `examples/example.py <https://github.com/achael/eht-imaging/blob/master/examples/example.py>`_ 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.
45-
- `Slides <https://www.dropbox.com/s/7533ucj8bt54yh7/Bouman_Chael.pdf?dl=0>`_ from the EHT 2016 conference data generation and imaging workshop contain a tutorial on generating data externally with the vlbi imaging `website <http://vlbiimaging.csail.mit.edu>`_, loading into the library, and producing an image.
59+
- Older `Slides <https://www.dropbox.com/s/7533ucj8bt54yh7/Bouman_Chael.pdf?dl=0>`__ from the EHT2016 data generation and imaging workshop contain a tutorial on generating data with the VLBI imaging `website <http://vlbiimaging.csail.mit.edu>`_, loading into the library, and producing an image.
4660

4761
Documentation
4862
-------------

ehtim/obsdata.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -715,8 +715,9 @@ def unpack_bl(self, site1, site2, fields, ang_unit='deg', debias=False, timetype
715715
debias=debias, timetype=timetype)
716716

717717
allout.append(out)
718-
719-
return np.array(allout, dtype=object)
718+
719+
#return np.array(allout, dtype=object)
720+
return np.array(allout)
720721

721722
def unpack(self, fields, mode='all', ang_unit='deg', debias=False, conj=False, timetype=False):
722723
"""Unpack the data for the whole observation .

0 commit comments

Comments
 (0)