README.md 6.65 KB
Newer Older
Martin Reinecke's avatar
Martin Reinecke committed
1
NIFTy - Numerical Information Field Theory
Jait Dixit's avatar
Jait Dixit committed
2
==========================================
Martin Reinecke's avatar
Martin Reinecke committed
3 4
[![build status](https://gitlab.mpcdf.mpg.de/ift/NIFTy/badges/NIFTy_4/build.svg)](https://gitlab.mpcdf.mpg.de/ift/NIFTy/commits/NIFTy_4)
[![coverage report](https://gitlab.mpcdf.mpg.de/ift/NIFTy/badges/NIFTy_4/coverage.svg)](https://gitlab.mpcdf.mpg.de/ift/NIFTy/commits/NIFTy_4)
Jait Dixit's avatar
Jait Dixit committed
5

Martin Reinecke's avatar
Martin Reinecke committed
6
**NIFTy** project homepage:
Martin Reinecke's avatar
tweaks  
Martin Reinecke committed
7
[http://ift.pages.mpcdf.de/NIFTy](http://ift.pages.mpcdf.de/NIFTy)
Jait Dixit's avatar
Jait Dixit committed
8 9 10 11 12 13

Summary
-------

### Description

Martin Reinecke's avatar
Martin Reinecke committed
14
**NIFTy**, "**N**umerical **I**nformation **F**ield **T**heor<strong>y</strong>", is
Jait Dixit's avatar
Jait Dixit committed
15 16 17
a versatile library designed to enable the development of signal
inference algorithms that operate regardless of the underlying spatial
grid and its resolution. Its object-oriented framework is written in
Martin Reinecke's avatar
updates  
Martin Reinecke committed
18
Python, although it accesses libraries written in C++ and C for
Jait Dixit's avatar
Jait Dixit committed
19 20
efficiency.

Martin Reinecke's avatar
Martin Reinecke committed
21
NIFTy offers a toolkit that abstracts discretized representations of
Jait Dixit's avatar
Jait Dixit committed
22
continuous spaces, fields in these spaces, and operators acting on
Martin Reinecke's avatar
Martin Reinecke committed
23
fields into classes. The correct normalization of operations on
Jait Dixit's avatar
Jait Dixit committed
24 25 26
fields is taken care of automatically without concerning the user. This
allows for an abstract formulation and programming of inference
algorithms, including those derived within information field theory.
Martin Reinecke's avatar
Martin Reinecke committed
27
Thus, NIFTy permits its user to rapidly prototype algorithms in 1D, and
Jait Dixit's avatar
Jait Dixit committed
28
then apply the developed code in higher-dimensional settings of real
Martin Reinecke's avatar
Martin Reinecke committed
29
world problems. The set of spaces on which NIFTy operates comprises
Jait Dixit's avatar
Jait Dixit committed
30 31 32 33 34 35 36 37 38 39
point sets, *n*-dimensional regular grids, spherical spaces, their
harmonic counterparts, and product spaces constructed as combinations of
those.


Installation
------------

### Requirements

Martin Reinecke's avatar
Martin Reinecke committed
40 41 42
- [Python](https://www.python.org/) (v2.7.x or 3.5.x)
- [NumPy](https://www.numpy.org/)
- [pyFFTW](https://pypi.python.org/pypi/pyFFTW)
Martin Reinecke's avatar
Martin Reinecke committed
43 44

Optional dependencies:
Martin Reinecke's avatar
Martin Reinecke committed
45 46 47 48 49
- [pyHealpix](https://gitlab.mpcdf.mpg.de/ift/pyHealpix) (for harmonic
    transforms involving domains on the sphere)
- [mpi4py](https://mpi4py.scipy.org) (for MPI-parallel execution)
- [matplotlib](https://matplotlib.org/) (for field plotting)
- [SciPy](https://www.scipy.org/) (for additional minimization algorithms)
Jait Dixit's avatar
Jait Dixit committed
50

Martin Reinecke's avatar
Martin Reinecke committed
51
### Sources
Jait Dixit's avatar
Jait Dixit committed
52

Martin Reinecke's avatar
Martin Reinecke committed
53 54
The current version of Nifty4 can be obtained by cloning the repository and
switching to the NIFTy_4 branch:
Jait Dixit's avatar
Jait Dixit committed
55 56 57

    git clone https://gitlab.mpcdf.mpg.de/ift/NIFTy.git

Martin Reinecke's avatar
Martin Reinecke committed
58
### Installation
Jait Dixit's avatar
Jait Dixit committed
59

Martin Reinecke's avatar
Martin Reinecke committed
60 61
In the following, we assume a Debian-based distribution. For other
distributions, the "apt" lines will need slight changes.
Martin Reinecke's avatar
Martin Reinecke committed
62

Martin Reinecke's avatar
Martin Reinecke committed
63 64 65
NIFTy4 and its mandatory dependencies can be installed via:

    sudo apt-get install git libfftw3-dev python python-pip python-dev
Martin Reinecke's avatar
Martin Reinecke committed
66 67
    pip install --user git+https://gitlab.mpcdf.mpg.de/ift/NIFTy.git@NIFTy_4

Martin Reinecke's avatar
Martin Reinecke committed
68 69 70 71 72 73 74 75 76 77
(Note: If you encounter problems related to `pyFFTW`, make sure that you are
using a pip-installed `pyFFTW` package. Unfortunately, some distributions are
shipping an incorrectly configured `pyFFTW` package, which does not cooperate
with the installed `FFTW3` libraries.)

Plotting support is added via:

    pip install --user matplotlib

Support for spherical harmonic transforms is added via:
Jait Dixit's avatar
Jait Dixit committed
78

Martin Reinecke's avatar
Martin Reinecke committed
79
    pip install --user git+https://gitlab.mpcdf.mpg.de/ift/pyHealpix.git
Jait Dixit's avatar
Jait Dixit committed
80

Martin Reinecke's avatar
Martin Reinecke committed
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97
MPI support is added via:

    sudo apt-get install openmpi-bin libopenmpi-dev
    pip install --user mpi4py

Scipy-based minimizers are enabled via:

    pip install --user scipy

### Installation for Python 3

If you want to run NIFTy with Python 3, you need to make the following changes
to the instructions above:

- in all `apt-get` commands, replace `python-*` by `python3-*`
- in all `pip` commands, replace `pip` by `pip3`

Theo Steininger's avatar
Theo Steininger committed
98 99 100 101
### Running the tests

In oder to run the tests one needs two additional packages:

Martin Reinecke's avatar
Martin Reinecke committed
102
    pip install --user nose parameterized coverage
103

Martin Reinecke's avatar
Martin Reinecke committed
104 105
Afterwards the tests (including a coverage report) can be run using the
following command in the repository root:
106

Martin Reinecke's avatar
Martin Reinecke committed
107
    nosetests -x --with-coverage --cover-html --cover-package=nifty4
Theo Steininger's avatar
Theo Steininger committed
108 109


Jait Dixit's avatar
Jait Dixit committed
110 111
### First Steps

Martin Reinecke's avatar
Martin Reinecke committed
112
For a quick start, you can browse through the [informal
Martin Reinecke's avatar
Martin Reinecke committed
113
introduction](http://ift.pages.mpcdf.de/NIFTy/code.html) or
Martin Reinecke's avatar
Martin Reinecke committed
114
dive into NIFTy by running one of the demonstrations, e.g.:
Jait Dixit's avatar
Jait Dixit committed
115

Martin Reinecke's avatar
Martin Reinecke committed
116
    python demos/wiener_filter_via_curvature.py
Jait Dixit's avatar
Jait Dixit committed
117 118 119 120

Acknowledgement
---------------

Martin Reinecke's avatar
Martin Reinecke committed
121
Please acknowledge the use of NIFTy in your publication(s) by using a
Jait Dixit's avatar
Jait Dixit committed
122 123 124
phrase such as the following:

> *"Some of the results in this publication have been derived using the
Martin Reinecke's avatar
Martin Reinecke committed
125
> NIFTy package [Steininger et al., 2017]."[1]
Jait Dixit's avatar
Jait Dixit committed
126

Philipp Arras's avatar
Philipp Arras committed
127
Or one of the following BibTeX entries:
Philipp Arras's avatar
Philipp Arras committed
128

Philipp Arras's avatar
Fixup  
Philipp Arras committed
129
    @software{nifty,
Philipp Arras's avatar
Update  
Philipp Arras committed
130
      author = {{Martin Reinecke, Theo Steininger, Marco Selig}},
Philipp Arras's avatar
Fixup  
Philipp Arras committed
131 132 133 134 135
      title = {NIFTy -- Numerical Information Field TheorY},
      url = {https://gitlab.mpcdf.mpg.de/ift/NIFTy},
      version = {nifty4},
      date = {2018-04-05},
    }
Philipp Arras's avatar
Philipp Arras committed
136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167
    
    @ARTICLE{2013A&A...554A..26S,
      author = {{Selig}, M. and {Bell}, M.~R. and {Junklewitz}, H. and {Oppermann}, N. and {Reinecke}, M. and {Greiner}, M. and {Pachajoa}, C. and {En{\ss}lin}, T.~A.},
      title = "{NIFTY - Numerical Information Field Theory. A versatile PYTHON library for signal inference}",
      journal = {\aap},
      archivePrefix = "arXiv",
      eprint = {1301.4499},
      primaryClass = "astro-ph.IM",
      keywords = {methods: data analysis, methods: numerical, methods: statistical, techniques: image processing},
      year = 2013,
      month = jun,
      volume = 554,
      eid = {A26},
      pages = {A26},
      doi = {10.1051/0004-6361/201321236},
      adsurl = {http://cdsads.u-strasbg.fr/abs/2013A%26A...554A..26S},
      adsnote = {Provided by the SAO/NASA Astrophysics Data System}
    }
    
    @ARTICLE{2017arXiv170801073S,
      author = {{Steininger}, T. and {Dixit}, J. and {Frank}, P. and {Greiner}, M. and {Hutschenreuter}, S. and {Knollm{\"u}ller}, J. and {Leike}, R. and {Porqueres}, N. and {Pumpe}, D. and {Reinecke}, M. and {{\v S}raml}, M. and {Varady}, C. and {En{\ss}lin}, T.},
      title = "{NIFTy 3 - Numerical Information Field Theory - A Python framework for multicomponent signal inference on HPC clusters}",
      journal = {ArXiv e-prints},
      archivePrefix = "arXiv",
      eprint = {1708.01073},
      primaryClass = "astro-ph.IM",
      keywords = {Astrophysics - Instrumentation and Methods for Astrophysics},
      year = 2017,
      month = aug,
      adsurl = {http://cdsads.u-strasbg.fr/abs/2017arXiv170801073S},
      adsnote = {Provided by the SAO/NASA Astrophysics Data System}
    }
Philipp Arras's avatar
Philipp Arras committed
168

Jait Dixit's avatar
Jait Dixit committed
169 170 171 172 173
### References

Release Notes
-------------

Martin Reinecke's avatar
Martin Reinecke committed
174
The NIFTy package is licensed under the terms of the
Martin Reinecke's avatar
Martin Reinecke committed
175
[GPLv3](https://www.gnu.org/licenses/gpl.html) and is distributed
Jait Dixit's avatar
Jait Dixit committed
176 177 178 179
*without any warranty*.

* * * * *

Martin Reinecke's avatar
Martin Reinecke committed
180 181
[1] Steininger et al., "NIFTy 3 - Numerical Information Field Theory - A Python framework for multicomponent signal inference on HPC clusters", 2017, submitted to PLOS One;
[arXiv:1708.01073](https://arxiv.org/abs/1708.01073)