README.md 6.41 KB
Newer Older
Martin Reinecke's avatar
Martin Reinecke committed
1
NIFTy - Numerical Information Field Theory
Jait Dixit's avatar
Jait Dixit committed
2
==========================================
Philipp Arras's avatar
Philipp Arras committed
3
4
[![pipeline status](https://gitlab.mpcdf.mpg.de/ift/nifty/badges/NIFTy_7/pipeline.svg)](https://gitlab.mpcdf.mpg.de/ift/nifty/-/commits/NIFTy_7)
[![coverage report](https://gitlab.mpcdf.mpg.de/ift/nifty/badges/NIFTy_7/coverage.svg)](https://gitlab.mpcdf.mpg.de/ift/nifty/-/commits/NIFTy_7)
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.6.x or later)
49
- [SciPy](https://www.scipy.org/)
Martin Reinecke's avatar
Martin Reinecke committed
50
51

Optional dependencies:
52
- [DUCC0](https://gitlab.mpcdf.mpg.de/mtr/ducc) for faster FFTs, spherical
Martin Reinecke's avatar
switch  
Martin Reinecke committed
53
    harmonic transforms, and non-uniform Fourier transforms
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
Martin Reinecke committed
61
62
The current version of NIFTy7 can be obtained by cloning the repository and
switching to the NIFTy_7 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
Martin Reinecke committed
71
NIFTy7 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
Martin Reinecke committed
74
    pip3 install --user git+https://gitlab.mpcdf.mpg.de/ift/nifty.git@NIFTy_7
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
The DUCC0 package is installed via:
Jait Dixit's avatar
Jait Dixit committed
81

82
    pip3 install ducc0
Martin Reinecke's avatar
switch  
Martin Reinecke committed
83
84

If this library is present, NIFTy will detect it automatically and prefer
85
`ducc0.fft` over SciPy's FFT. The underlying code is actually the same, but
Martin Reinecke's avatar
switch  
Martin Reinecke committed
86
87
DUCC's FFT is compiled with optimizations for the host CPU and can provide
significantly faster transforms.
Jait Dixit's avatar
Jait Dixit committed
88

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

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

Martin Reinecke's avatar
Martin Reinecke committed
93
94
MPI support is added via:

Martin Reinecke's avatar
Martin Reinecke committed
95
    sudo apt-get install python3-mpi4py
Martin Reinecke's avatar
Martin Reinecke committed
96

Theo Steininger's avatar
Theo Steininger committed
97
98
### Running the tests

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

Martin Reinecke's avatar
fixes  
Martin Reinecke committed
101
    sudo apt-get install python3-pytest-cov
102

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

Martin Reinecke's avatar
Martin Reinecke committed
106
    pytest-3 --cov=nifty7 test
Theo Steininger's avatar
Theo Steininger committed
107

Jait Dixit's avatar
Jait Dixit committed
108
109
### First Steps

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

Martin Reinecke's avatar
Martin Reinecke committed
114
    python3 demos/getting_started_1.py
Jait Dixit's avatar
Jait Dixit committed
115

116
117
118
119
120
121
122
123
### Building the documentation from source

To build the documentation from source, install
[sphinx](https://www.sphinx-doc.org/en/stable/index.html) and the
[Read The Docs Sphinx Theme](https://github.com/readthedocs/sphinx_rtd_theme)
on your system and run

    sh docs/generate.sh
124

Martin Reinecke's avatar
fixes  
Martin Reinecke committed
125
### Acknowledgements
Jait Dixit's avatar
Jait Dixit committed
126

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

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

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


Martin Reinecke's avatar
fixes  
Martin Reinecke committed
136
### Licensing terms
Jait Dixit's avatar
Jait Dixit committed
137

Martin Reinecke's avatar
Martin Reinecke committed
138
The NIFTy package is licensed under the terms of the
Martin Reinecke's avatar
Martin Reinecke committed
139
[GPLv3](https://www.gnu.org/licenses/gpl.html) and is distributed
Jait Dixit's avatar
Jait Dixit committed
140
*without any warranty*.
Philipp Arras's avatar
Philipp Arras committed
141
142
143
144
145
146
147


Contributors
------------

### NIFTy6

Philipp Arras's avatar
Philipp Arras committed
148
149
- Andrija Kostic
- Gordian Edenhofer
Philipp Arras's avatar
Philipp Arras committed
150
- Jakob Knollmüller
Philipp Arras's avatar
Philipp Arras committed
151
152
- Lukas Platz
- Martin Reinecke
Philipp Arras's avatar
Philipp Arras committed
153
- [Philipp Arras](https://wwwmpa.mpa-garching.mpg.de/~parras/)
Philipp Arras's avatar
Philipp Arras committed
154
155
- Philipp Frank
- Philipp Haim
Reimar Leike's avatar
Reimar Leike committed
156
- [Reimar Heinrich Leike](https://wwwmpa.mpa-garching.mpg.de/~reimar/)
Philipp Arras's avatar
Philipp Arras committed
157
- Rouven Lemmerz
Philipp Arras's avatar
Philipp Arras committed
158
- [Torsten Enßlin](https://wwwmpa.mpa-garching.mpg.de/~ensslin/)
Philipp Arras's avatar
Philipp Arras committed
159
- Vincent Eberle
Philipp Arras's avatar
Philipp Arras committed
160
161
162
163


### NIFTy5

Philipp Arras's avatar
Philipp Arras committed
164
165
166
167
168
169
170
171
172
- Christoph Lienhard
- Gordian Edenhofer
- Jakob Knollmüller
- Julia Stadler
- Julian Rüstig
- Lukas Platz
- Martin Reinecke
- Max-Niklas Newrzella
- Natalia
Philipp Arras's avatar
Philipp Arras committed
173
- [Philipp Arras](https://wwwmpa.mpa-garching.mpg.de/~parras/)
Philipp Arras's avatar
Philipp Arras committed
174
175
176
177
178
- Philipp Frank
- Philipp Haim
- Reimar Heinrich Leike
- Sebastian Hutschenreuter
- Silvan Streit
Philipp Arras's avatar
Philipp Arras committed
179
- [Torsten Enßlin](https://wwwmpa.mpa-garching.mpg.de/~ensslin/)
Philipp Arras's avatar
Philipp Arras committed
180
181
182
183


### NIFTy4

Philipp Arras's avatar
Philipp Arras committed
184
185
186
187
188
- Christoph Lienhard
- Jakob Knollmüller
- Lukas Platz
- Martin Reinecke
- Mihai Baltac
Philipp Arras's avatar
Philipp Arras committed
189
- [Philipp Arras](https://wwwmpa.mpa-garching.mpg.de/~parras/)
Philipp Arras's avatar
Philipp Arras committed
190
191
192
- Philipp Frank
- Reimar Heinrich Leike
- Silvan Streit
Philipp Arras's avatar
Philipp Arras committed
193
- [Torsten Enßlin](https://wwwmpa.mpa-garching.mpg.de/~ensslin/)
Philipp Arras's avatar
Philipp Arras committed
194
195
196
197


### NIFTy3

Philipp Arras's avatar
Philipp Arras committed
198
199
200
201
202
203
- Daniel Pumpe
- Jait Dixit
- Jakob Knollmüller
- Martin Reinecke
- Mihai Baltac
- Natalia
Philipp Arras's avatar
Philipp Arras committed
204
- [Philipp Arras](https://wwwmpa.mpa-garching.mpg.de/~parras/)
Philipp Arras's avatar
Philipp Arras committed
205
- Philipp Frank
Philipp Arras's avatar
Tweaks  
Philipp Arras committed
206
207
- Reimar Heinrich Leike
- Matevz Sraml
Philipp Arras's avatar
Philipp Arras committed
208
209
- Theo Steininger
- csongor
Philipp Arras's avatar
Philipp Arras committed
210
211
212

### NIFTy2

Philipp Arras's avatar
Philipp Arras committed
213
214
215
- Jait Dixit
- Theo Steininger
- csongor
Philipp Arras's avatar
Philipp Arras committed
216
217
218
219


### NIFTy1

Philipp Arras's avatar
Philipp Arras committed
220
221
222
- Johannes Buchner
- Marco Selig
- Theo Steininger