README.md 4.5 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
5->6    
Martin Reinecke committed
3
4
[![build status](https://gitlab.mpcdf.mpg.de/ift/NIFTy/badges/NIFTy_6/build.svg)](https://gitlab.mpcdf.mpg.de/ift/NIFTy/commits/NIFTy_6)
[![coverage report](https://gitlab.mpcdf.mpg.de/ift/NIFTy/badges/NIFTy_6/coverage.svg)](https://gitlab.mpcdf.mpg.de/ift/NIFTy/commits/NIFTy_6)
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
Martin Reinecke committed
50
51

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

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

Martin Reinecke's avatar
5->6    
Martin Reinecke committed
61
62
The current version of NIFTy6 can be obtained by cloning the repository and
switching to the NIFTy_6 branch:
Jait Dixit's avatar
Jait Dixit committed
63

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

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

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

Martin Reinecke's avatar
5->6    
Martin Reinecke committed
71
NIFTy6 and its mandatory dependencies can be installed via:
Martin Reinecke's avatar
Martin Reinecke committed
72

Martin Reinecke's avatar
Martin Reinecke committed
73
    sudo apt-get install git python3 python3-pip python3-dev
Martin Reinecke's avatar
5->6    
Martin Reinecke committed
74
    pip3 install --user git+https://gitlab.mpcdf.mpg.de/ift/nifty.git@NIFTy_6
Martin Reinecke's avatar
Martin Reinecke committed
75

Martin Reinecke's avatar
Martin Reinecke committed
76
77
Plotting support is added via:

Martin Reinecke's avatar
Martin Reinecke committed
78
    sudo apt-get install python3-matplotlib
Martin Reinecke's avatar
Martin Reinecke committed
79
80

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

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

Martin Reinecke's avatar
Martin Reinecke committed
84
85
Support for the radio interferometry gridder is added via:

Martin Reinecke's avatar
Martin Reinecke committed
86
    pip3 install --user git+https://gitlab.mpcdf.mpg.de/ift/nifty_gridder.git
Martin Reinecke's avatar
Martin Reinecke committed
87

Martin Reinecke's avatar
Martin Reinecke committed
88
89
MPI support is added via:

Martin Reinecke's avatar
Martin Reinecke committed
90
    sudo apt-get install python3-mpi4py
Martin Reinecke's avatar
Martin Reinecke committed
91

Theo Steininger's avatar
Theo Steininger committed
92
93
### Running the tests

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

Martin Reinecke's avatar
fixes    
Martin Reinecke committed
96
    sudo apt-get install python3-pytest-cov
97

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

Martin Reinecke's avatar
5->6    
Martin Reinecke committed
101
    pytest-3 --cov=nifty6 test
Theo Steininger's avatar
Theo Steininger committed
102
103


Jait Dixit's avatar
Jait Dixit committed
104
105
### First Steps

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

Martin Reinecke's avatar
Martin Reinecke committed
110
    python3 demos/getting_started_1.py
Jait Dixit's avatar
Jait Dixit committed
111

112

Martin Reinecke's avatar
fixes    
Martin Reinecke committed
113
### Acknowledgements
Jait Dixit's avatar
Jait Dixit committed
114

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

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

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


Martin Reinecke's avatar
fixes    
Martin Reinecke committed
124
### Licensing terms
Jait Dixit's avatar
Jait Dixit committed
125

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