README.md 4.76 KB
Newer Older
1 2 3 4 5 6 7 8 9
WARNING:
========

The code on this branch is not meant to be an official version of NIFTy.
As a consequence, it does not install as package "nifty", but rather as
"nifty2go", to allow parallel installation alongside the official NIFTy and
avoid any conflicts.


Jait Dixit's avatar
Jait Dixit committed
10 11
NIFTY - Numerical Information Field Theory
==========================================
Martin Reinecke's avatar
Martin Reinecke committed
12 13
[![build status](https://gitlab.mpcdf.mpg.de/ift/NIFTy/badges/nifty2go/build.svg)](https://gitlab.mpcdf.mpg.de/ift/NIFTy/commits/nifty2go)
[![coverage report](https://gitlab.mpcdf.mpg.de/ift/NIFTy/badges/nifty2go/coverage.svg)](https://gitlab.mpcdf.mpg.de/ift/NIFTy/commits/nifty2go)
Jait Dixit's avatar
Jait Dixit committed
14 15 16 17 18 19 20 21 22

**NIFTY** project homepage:
[http://www.mpa-garching.mpg.de/ift/nifty/](http://www.mpa-garching.mpg.de/ift/nifty/)

Summary
-------

### Description

23
**NIFTY**, "**N**umerical **I**nformation **F**ield **T**heor<strong>y</strong>", is
Jait Dixit's avatar
Jait Dixit committed
24 25 26
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
27
Python, although it accesses libraries written in C++ and C for
Jait Dixit's avatar
Jait Dixit committed
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
efficiency.

NIFTY offers a toolkit that abstracts discretized representations of
continuous spaces, fields in these spaces, and operators acting on
fields into classes. Thereby, the correct normalization of operations on
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.
Thus, NIFTY permits its user to rapidly prototype algorithms in 1D, and
then apply the developed code in higher-dimensional settings of real
world problems. 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.

### Class & Feature Overview

The NIFTY library features three main classes: **spaces** that represent
certain grids, **fields** that are defined on spaces, and **operators**
that apply to fields.

-   [Spaces](http://www.mpa-garching.mpg.de/ift/nifty/space.html)
Martin Reinecke's avatar
updates  
Martin Reinecke committed
50 51 52 53
    -   `RGSpace` - *n*-dimensional regular Euclidean grid
    -   `LMSpace` - spherical harmonics
    -   `GLSpace` - Gauss-Legendre grid on the 2-sphere
    -   `HPSpace` - [HEALPix](http://sourceforge.net/projects/healpix/)
Jait Dixit's avatar
Jait Dixit committed
54 55
        grid on the 2-sphere
-   [Fields](http://www.mpa-garching.mpg.de/ift/nifty/field.html)
Martin Reinecke's avatar
updates  
Martin Reinecke committed
56
    -   `Field` - generic class for (discretized) fields
Jait Dixit's avatar
Jait Dixit committed
57 58 59

<!-- -->

Martin Reinecke's avatar
updates  
Martin Reinecke committed
60
    Field.conjugate     Field.dim          Field.norm
Martin Reinecke's avatar
Martin Reinecke committed
61
    Field.vdot          Field.weight
Jait Dixit's avatar
Jait Dixit committed
62 63

-   [Operators](http://www.mpa-garching.mpg.de/ift/nifty/operator.html)
Martin Reinecke's avatar
updates  
Martin Reinecke committed
64
    -   `DiagonalOperator` - purely diagonal matrices in a specified
Jait Dixit's avatar
Jait Dixit committed
65
        basis
Martin Reinecke's avatar
Martin Reinecke committed
66 67
    -   `FFTOperator` - conversion between spaces and their harmonic
                        counterparts
Jait Dixit's avatar
Jait Dixit committed
68 69 70 71 72 73 74 75 76 77 78
    -   (and more)
-   (and more)

*Parts of this summary are taken from* [1] *without marking them
explicitly as quotations.*

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

### Requirements

Martin Reinecke's avatar
update  
Martin Reinecke committed
79
-   [Python](http://www.python.org/) (v2.7.x or 3.5.x)
Jait Dixit's avatar
Jait Dixit committed
80 81
    -   [NumPy](http://www.numpy.org/)

Martin Reinecke's avatar
Martin Reinecke committed
82
### Sources
Jait Dixit's avatar
Jait Dixit committed
83

Martin Reinecke's avatar
updates  
Martin Reinecke committed
84
The current version of Nifty3 can be obtained by cloning the repository:
Jait Dixit's avatar
Jait Dixit committed
85 86 87 88

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


Martin Reinecke's avatar
Martin Reinecke committed
89
### Installation via pip
Jait Dixit's avatar
Jait Dixit committed
90

Martin Reinecke's avatar
Martin Reinecke committed
91
It is possible to simply install NIFTy with all its dependencies via the command
Jait Dixit's avatar
Jait Dixit committed
92

Martin Reinecke's avatar
Martin Reinecke committed
93
pip install --user --process-dependency-links --egg git+https://gitlab.mpcdf.mpg.de/ift/NIFTy.git@nifty2go
Jait Dixit's avatar
Jait Dixit committed
94

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

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

Martin Reinecke's avatar
Martin Reinecke committed
99
    pip install nose parameterized
100 101

Afterwards the tests (including a coverage report) are run using the following
Theo Steininger's avatar
Theo Steininger committed
102
command in the repository root:
103

104
    nosetests -x --with-coverage --cover-html --cover-package=nifty2go
Theo Steininger's avatar
Theo Steininger committed
105 106


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

Martin Reinecke's avatar
Martin Reinecke committed
109
For a quick start, you can browse through the [informal
Jait Dixit's avatar
Jait Dixit committed
110 111 112
introduction](http://www.mpa-garching.mpg.de/ift/nifty/start.html) or
dive into NIFTY by running one of the demonstrations, e.g.:

Martin Reinecke's avatar
Martin Reinecke committed
113
    python demos/wiener_filter_via_curvature.py
Jait Dixit's avatar
Jait Dixit committed
114 115 116 117

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

Martin Reinecke's avatar
Martin Reinecke committed
118
Please acknowledge the use of NIFTY in your publication(s) by using a
Jait Dixit's avatar
Jait Dixit committed
119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140
phrase such as the following:

> *"Some of the results in this publication have been derived using the
> NIFTY package [Selig et al., 2013]."*

### References

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

The NIFTY package is licensed under the
[GPLv3](http://www.gnu.org/licenses/gpl.html) and is distributed
*without any warranty*.

* * * * *

**NIFTY** project homepage:
[](http://www.mpa-garching.mpg.de/ift/nifty/)

[1] Selig et al., "NIFTY - Numerical Information Field Theory - a
versatile Python library for signal inference", [A&A, vol. 554, id.
A26](http://dx.doi.org/10.1051/0004-6361/201321236), 2013;
141
[arXiv:1301.4499](http://www.arxiv.org/abs/1301.4499)