README.md 6.46 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:
7
[https://ift.pages.mpcdf.de/nifty](https://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:
Philipp Arras's avatar
Philipp Arras committed
52
- [ducc0](https://gitlab.mpcdf.mpg.de/mtr/ducc) for faster FFTs, spherical
Martin Reinecke's avatar
Martin Reinecke committed
53
    harmonic transforms, and radio interferometry gridding support
Martin Reinecke's avatar
Martin Reinecke committed
54
55
- [mpi4py](https://mpi4py.scipy.org) (for MPI-parallel execution)
- [matplotlib](https://matplotlib.org/) (for field plotting)
Jait Dixit's avatar
Jait Dixit committed
56

Martin Reinecke's avatar
Martin Reinecke committed
57
### Sources
Jait Dixit's avatar
Jait Dixit committed
58

Martin Reinecke's avatar
Martin Reinecke committed
59
60
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
61

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

Martin Reinecke's avatar
Martin Reinecke committed
64
### Installation
Jait Dixit's avatar
Jait Dixit committed
65

Martin Reinecke's avatar
Martin Reinecke committed
66
67
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
68

Martin Reinecke's avatar
Martin Reinecke committed
69
NIFTy7 and its mandatory dependencies can be installed via:
Martin Reinecke's avatar
Martin Reinecke committed
70

Martin Reinecke's avatar
Martin Reinecke committed
71
    sudo apt-get install git python3 python3-pip python3-dev
Martin Reinecke's avatar
Martin Reinecke committed
72
    pip3 install --user git+https://gitlab.mpcdf.mpg.de/ift/nifty.git@NIFTy_7
Martin Reinecke's avatar
Martin Reinecke committed
73

Martin Reinecke's avatar
Martin Reinecke committed
74
75
Plotting support is added via:

Martin Reinecke's avatar
Martin Reinecke committed
76
    sudo apt-get install python3-matplotlib
Martin Reinecke's avatar
Martin Reinecke committed
77

78
The DUCC0 package is installed via:
Jait Dixit's avatar
Jait Dixit committed
79

80
    pip3 install ducc0
Martin Reinecke's avatar
switch    
Martin Reinecke committed
81
82

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

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

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

Philipp Arras's avatar
Philipp Arras committed
91
### Run the tests
Theo Steininger's avatar
Theo Steininger committed
92

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

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

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

Martin Reinecke's avatar
Martin Reinecke committed
100
    pytest-3 --cov=nifty7 test
Theo Steininger's avatar
Theo Steininger committed
101

Jait Dixit's avatar
Jait Dixit committed
102
103
### First Steps

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

Martin Reinecke's avatar
Martin Reinecke committed
108
    python3 demos/getting_started_1.py
Jait Dixit's avatar
Jait Dixit committed
109

Vincent Eberle's avatar
Readme    
Vincent Eberle committed
110
111
112
113
114
115
116
### Building the documentation from source

To build the documentation from source, install 
[sphinx](https://www.sphinx-doc.org/en/master/index.html) and the [Pydata Sphinx Theme](https://github.com/pydata/pydata-sphinx-theme) on your system and run
    
    sh docs/generate.sh

Martin Reinecke's avatar
fixes    
Martin Reinecke committed
117
### Acknowledgements
Jait Dixit's avatar
Jait Dixit committed
118

Philipp Arras's avatar
Philipp Arras committed
119
120
Please consider acknowledging NIFTy in your publication(s) by using a phrase
such as the following:
Jait Dixit's avatar
Jait Dixit committed
121

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

125
and a citation to one of the [publications](https://ift.pages.mpcdf.de/nifty/citations.html).
126
127


Martin Reinecke's avatar
fixes    
Martin Reinecke committed
128
### Licensing terms
Jait Dixit's avatar
Jait Dixit committed
129

Martin Reinecke's avatar
Martin Reinecke committed
130
The NIFTy package is licensed under the terms of the
Martin Reinecke's avatar
Martin Reinecke committed
131
[GPLv3](https://www.gnu.org/licenses/gpl.html) and is distributed
Jait Dixit's avatar
Jait Dixit committed
132
*without any warranty*.
Philipp Arras's avatar
Philipp Arras committed
133
134
135
136
137


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

Philipp Arras's avatar
Philipp Arras committed
138
139
### NIFTy7

Philipp Arras's avatar
Philipp Arras committed
140
- Andrija Kostic
Philipp Arras's avatar
Philipp Arras committed
141
- Gordian Edenhofer
Philipp Arras's avatar
Philipp Arras committed
142
143
- Jakob Knollmüller
- Jakob Roth
Philipp Arras's avatar
Philipp Arras committed
144
- Lukas Platz
Philipp Arras's avatar
Philipp Arras committed
145
- Matteo Guardiani
Philipp Arras's avatar
Philipp Arras committed
146
- Martin Reinecke
Philipp Arras's avatar
Philipp Arras committed
147
- [Philipp Arras](https://philipp-arras.de)
Philipp Arras's avatar
Philipp Arras committed
148
149
- Philipp Frank
- [Reimar Heinrich Leike](https://wwwmpa.mpa-garching.mpg.de/~reimar/)
Philipp Arras's avatar
Philipp Arras committed
150
151
- Simon Ding
- Vincent Eberle
Philipp Arras's avatar
Philipp Arras committed
152

Philipp Arras's avatar
Philipp Arras committed
153
154
### NIFTy6

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


### NIFTy5

Philipp Arras's avatar
Philipp Arras committed
171
172
173
174
175
176
177
178
179
- 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
180
- [Philipp Arras](https://wwwmpa.mpa-garching.mpg.de/~parras/)
Philipp Arras's avatar
Philipp Arras committed
181
182
183
184
185
- Philipp Frank
- Philipp Haim
- Reimar Heinrich Leike
- Sebastian Hutschenreuter
- Silvan Streit
Philipp Arras's avatar
Philipp Arras committed
186
- [Torsten Enßlin](https://wwwmpa.mpa-garching.mpg.de/~ensslin/)
Philipp Arras's avatar
Philipp Arras committed
187
188
189
190


### NIFTy4

Philipp Arras's avatar
Philipp Arras committed
191
192
193
194
195
- Christoph Lienhard
- Jakob Knollmüller
- Lukas Platz
- Martin Reinecke
- Mihai Baltac
Philipp Arras's avatar
Philipp Arras committed
196
- [Philipp Arras](https://wwwmpa.mpa-garching.mpg.de/~parras/)
Philipp Arras's avatar
Philipp Arras committed
197
198
199
- Philipp Frank
- Reimar Heinrich Leike
- Silvan Streit
Philipp Arras's avatar
Philipp Arras committed
200
- [Torsten Enßlin](https://wwwmpa.mpa-garching.mpg.de/~ensslin/)
Philipp Arras's avatar
Philipp Arras committed
201
202
203
204


### NIFTy3

Philipp Arras's avatar
Philipp Arras committed
205
206
207
208
209
210
- Daniel Pumpe
- Jait Dixit
- Jakob Knollmüller
- Martin Reinecke
- Mihai Baltac
- Natalia
Philipp Arras's avatar
Philipp Arras committed
211
- [Philipp Arras](https://wwwmpa.mpa-garching.mpg.de/~parras/)
Philipp Arras's avatar
Philipp Arras committed
212
- Philipp Frank
Philipp Arras's avatar
Tweaks    
Philipp Arras committed
213
214
- Reimar Heinrich Leike
- Matevz Sraml
Philipp Arras's avatar
Philipp Arras committed
215
216
- Theo Steininger
- csongor
Philipp Arras's avatar
Philipp Arras committed
217
218
219

### NIFTy2

Philipp Arras's avatar
Philipp Arras committed
220
221
222
- Jait Dixit
- Theo Steininger
- csongor
Philipp Arras's avatar
Philipp Arras committed
223
224
225
226


### NIFTy1

Philipp Arras's avatar
Philipp Arras committed
227
228
229
- Johannes Buchner
- Marco Selig
- Theo Steininger