README.md 4.62 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_5/build.svg)](https://gitlab.mpcdf.mpg.de/ift/NIFTy/commits/NIFTy_5)
[![coverage report](https://gitlab.mpcdf.mpg.de/ift/NIFTy/badges/NIFTy_5/coverage.svg)](https://gitlab.mpcdf.mpg.de/ift/NIFTy/commits/NIFTy_5)
Jait Dixit's avatar
Jait Dixit committed
5

Martin Reinecke's avatar
Martin Reinecke committed
6
**NIFTy** project homepage:
Martin Reinecke's avatar
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
a versatile library designed to enable the development of signal
16 17 18 19
inference algorithms that operate regardless of the underlying grids
(spatial, spectral, temporal, …) and their resolutions.
Its object-oriented framework is written in Python, although it accesses
libraries written in C++ and C for efficiency.
Jait Dixit's avatar
Jait Dixit committed
20

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
23 24
these fields into classes.
This allows for an abstract formulation and programming of inference
Jait Dixit's avatar
Jait Dixit committed
25
algorithms, including those derived within information field theory.
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
NIFTy's interface is designed to resemble IFT formulae in the sense
that the user implements algorithms in NIFTy independent of the topology
of the underlying spaces and the discretization scheme.
Thus, the user can develop algorithms on subsets of problems and on
spaces where the detailed performance of the algorithm can be properly
evaluated and then easily generalize them to other, more complex spaces
and the full problem, respectively.

The set of spaces on which NIFTy operates comprises point sets,
*n*-dimensional regular grids, spherical spaces, their harmonic
counterparts, and product spaces constructed as combinations of those.
NIFTy takes care of numerical subtleties like the normalization of
operations on fields and the numerical representation of model
components, allowing the user to focus on formulating the abstract
inference procedures and process-specific model properties.
Jait Dixit's avatar
Jait Dixit committed
41 42 43 44 45 46 47


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

### Requirements

Martin Reinecke's avatar
Martin Reinecke committed
48
- [Python 3](https://www.python.org/) (3.5.x or later)
49
- [SciPy](https://www.scipy.org/)
Martin Reinecke's avatar
cleanup  
Martin Reinecke committed
50
- [pypocketfft](https://gitlab.mpcdf.mpg.de/mtr/pypocketfft)
Martin Reinecke's avatar
Martin Reinecke committed
51 52

Optional dependencies:
Martin Reinecke's avatar
Martin Reinecke committed
53 54
- [pyHealpix](https://gitlab.mpcdf.mpg.de/ift/pyHealpix) (for harmonic
    transforms involving domains on the sphere)
Martin Reinecke's avatar
Martin Reinecke committed
55 56
- [nifty_gridder](https://gitlab.mpcdf.mpg.de/ift/nifty_gridder) (for radio
    interferometry responses)
Martin Reinecke's avatar
Martin Reinecke committed
57 58
- [mpi4py](https://mpi4py.scipy.org) (for MPI-parallel execution)
- [matplotlib](https://matplotlib.org/) (for field plotting)
Jait Dixit's avatar
Jait Dixit committed
59

Martin Reinecke's avatar
Martin Reinecke committed
60
### Sources
Jait Dixit's avatar
Jait Dixit committed
61

Philipp Arras's avatar
Philipp Arras committed
62 63
The current version of Nifty5 can be obtained by cloning the repository and
switching to the NIFTy_5 branch:
Jait Dixit's avatar
Jait Dixit committed
64

Martin Reinecke's avatar
Martin Reinecke committed
65
    git clone https://gitlab.mpcdf.mpg.de/ift/nifty.git
Jait Dixit's avatar
Jait Dixit committed
66

Martin Reinecke's avatar
Martin Reinecke committed
67
### Installation
Jait Dixit's avatar
Jait Dixit committed
68

Martin Reinecke's avatar
Martin Reinecke committed
69 70
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
71

Philipp Arras's avatar
Philipp Arras committed
72
NIFTy5 and its mandatory dependencies can be installed via:
Martin Reinecke's avatar
Martin Reinecke committed
73

Martin Reinecke's avatar
Martin Reinecke committed
74
    sudo apt-get install git python3 python3-pip python3-dev
Martin Reinecke's avatar
Martin Reinecke committed
75
    pip3 install --user git+https://gitlab.mpcdf.mpg.de/ift/nifty.git@NIFTy_5
Martin Reinecke's avatar
cleanup  
Martin Reinecke committed
76
    pip3 install --user git+https://gitlab.mpcdf.mpg.de/mtr/pypocketfft
Martin Reinecke's avatar
Martin Reinecke committed
77

Martin Reinecke's avatar
Martin Reinecke committed
78 79
Plotting support is added via:

Martin Reinecke's avatar
Martin Reinecke committed
80
    sudo apt-get install python3-matplotlib
Martin Reinecke's avatar
Martin Reinecke committed
81 82

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

Martin Reinecke's avatar
Martin Reinecke committed
84
    pip3 install --user git+https://gitlab.mpcdf.mpg.de/ift/pyHealpix.git
Jait Dixit's avatar
Jait Dixit committed
85

Martin Reinecke's avatar
Martin Reinecke committed
86 87 88 89
Support for the radio interferometry gridder is added via:

    pip3 install git+https://gitlab.mpcdf.mpg.de/ift/nifty_gridder.git

Martin Reinecke's avatar
Martin Reinecke committed
90 91
MPI support is added via:

Martin Reinecke's avatar
Martin Reinecke committed
92
    sudo apt-get install python3-mpi4py
Martin Reinecke's avatar
Martin Reinecke committed
93

Theo Steininger's avatar
Theo Steininger committed
94 95
### Running the tests

Martin Reinecke's avatar
Martin Reinecke committed
96 97
To run the tests, additional packages are required:

Martin Reinecke's avatar
fixes  
Martin Reinecke committed
98
    sudo apt-get install python3-pytest-cov
99

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

Martin Reinecke's avatar
Martin Reinecke committed
103
    pytest-3 --cov=nifty5 test
Theo Steininger's avatar
Theo Steininger committed
104 105


Jait Dixit's avatar
Jait Dixit committed
106 107
### First Steps

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

Martin Reinecke's avatar
Martin Reinecke committed
112
    python3 demos/getting_started_1.py
Jait Dixit's avatar
Jait Dixit committed
113

114

Martin Reinecke's avatar
fixes  
Martin Reinecke committed
115
### Acknowledgements
Jait Dixit's avatar
Jait Dixit committed
116

Martin Reinecke's avatar
Martin Reinecke committed
117
Please acknowledge the use of NIFTy in your publication(s) by using a
Jait Dixit's avatar
Jait Dixit committed
118 119
phrase such as the following:

Martin Reinecke's avatar
Martin Reinecke committed
120
> "Some of the results in this publication have been derived using the
121 122
> NIFTy package [(https://gitlab.mpcdf.mpg.de/ift/NIFTy)](https://gitlab.mpcdf.mpg.de/ift/NIFTy)"

Martin Reinecke's avatar
Martin Reinecke committed
123
and a citation to one of the [publications](http://ift.pages.mpcdf.de/nifty/citations.html).
124 125


Martin Reinecke's avatar
fixes  
Martin Reinecke committed
126
### Licensing terms
Jait Dixit's avatar
Jait Dixit committed
127

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