Commit 58d4b593 authored by Philipp Arras's avatar Philipp Arras

Rename nifty4 -> nifty5

parent 02f153a5
Pipeline #31301 passed with stages
in 8 minutes and 24 seconds
......@@ -34,7 +34,7 @@ test_python2_with_coverage:
script:
- python setup.py install --user -f
- mpiexec -n 2 --bind-to none nosetests -q 2> /dev/null
- nosetests -q --with-coverage --cover-package=nifty4 --cover-erase
- nosetests -q --with-coverage --cover-package=nifty5 --cover-erase
- >
coverage report --omit "*plotting*,*distributed_do*"
- >
......
......@@ -49,8 +49,8 @@ Optional dependencies:
### Sources
The current version of Nifty4 can be obtained by cloning the repository and
switching to the NIFTy_4 branch:
The current version of Nifty5 can be obtained by cloning the repository and
switching to the NIFTy_5 branch:
git clone https://gitlab.mpcdf.mpg.de/ift/NIFTy.git
......@@ -59,7 +59,7 @@ switching to the NIFTy_4 branch:
In the following, we assume a Debian-based distribution. For other
distributions, the "apt" lines will need slight changes.
NIFTy4 and its mandatory dependencies can be installed via:
NIFTy5 and its mandatory dependencies can be installed via:
sudo apt-get install git libfftw3-dev python python-pip python-dev
pip install --user git+https://gitlab.mpcdf.mpg.de/ift/NIFTy.git@NIFTy_4
......@@ -99,7 +99,7 @@ In oder to run the tests one needs two additional packages:
Afterwards the tests (including a coverage report) can be run using the
following command in the repository root:
nosetests -x --with-coverage --cover-html --cover-package=nifty4
nosetests -x --with-coverage --cover-html --cover-package=nifty5
### First Steps
......
......@@ -140,7 +140,7 @@
"source": [
"import numpy as np\n",
"np.random.seed(40)\n",
"import nifty4 as ift\n",
"import nifty5 as ift\n",
"import matplotlib.pyplot as plt\n",
"%matplotlib inline"
]
......
import nifty4 as ift
from nifty4.library.nonlinearities import Linear, Tanh, Exponential
import nifty5 as ift
from nifty5.library.nonlinearities import Linear, Tanh, Exponential
import numpy as np
np.random.seed(42)
......
import nifty4 as ift
from nifty4.library.nonlinearities import Exponential
import nifty5 as ift
from nifty5.library.nonlinearities import Exponential
import numpy as np
np.random.seed(42)
......
import nifty4 as ift
from nifty4.library.nonlinearities import Linear, Exponential, Tanh
import nifty5 as ift
from nifty5.library.nonlinearities import Linear, Exponential, Tanh
import numpy as np
np.random.seed(20)
......
import numpy as np
import nifty4 as ift
import nifty5 as ift
if __name__ == "__main__":
signal_to_noise = 0.5 # The signal to noise ratio
......
import nifty4 as ift
import nifty5 as ift
import numpy as np
......
......@@ -4,7 +4,7 @@
# to get exact figure of paper comment out lines marked by "COMMENT OUT"
import numpy as np
import nifty4 as ift
import nifty5 as ift
import matplotlib.pyplot as plt
......
import nifty4 as ift
import nifty5 as ift
import numpy as np
......
import nifty4 as ift
import nifty5 as ift
import numpy as np
import matplotlib.pyplot as plt
from nifty4.sugar import create_power_operator
from nifty5.sugar import create_power_operator
np.random.seed(42)
......
import nifty4 as ift
import nifty5 as ift
import numpy as np
......
import numpy as np
import nifty4 as ift
import nifty5 as ift
# TODO: MAKE RESPONSE MPI COMPATIBLE OR USE LOS RESPONSE INSTEAD
......
import numpy as np
import nifty4 as ift
import nifty5 as ift
if __name__ == "__main__":
......
import numpy as np
import nifty4 as ift
import nifty5 as ift
import numericalunits as nu
......
import nifty4 as ift
import nifty5 as ift
import numpy as np
np.random.seed(42)
......
rm -rf docs/build docs/source/mod
sphinx-apidoc -l -e -d 2 -o docs/source/mod nifty4
sphinx-apidoc -l -e -d 2 -o docs/source/mod nifty5
sphinx-build -b html docs/source/ docs/build/
......@@ -7,7 +7,7 @@ NIFTy-related publications
author = {{Martin Reinecke, Theo Steininger, Marco Selig}},
title = {NIFTy -- Numerical Information Field TheorY},
url = {https://gitlab.mpcdf.mpg.de/ift/NIFTy},
version = {nifty4},
version = {nifty5},
date = {2018-04-05},
}
......
.. currentmodule:: nifty4
.. currentmodule:: nifty5
=============
Code Overview
......@@ -35,7 +35,7 @@ Domains
Abstract base class
-------------------
One of the fundamental building blocks of the NIFTy4 framework is the *domain*.
One of the fundamental building blocks of the NIFTy5 framework is the *domain*.
Its required capabilities are expressed by the abstract :class:`Domain` class.
A domain must be able to answer the following queries:
......@@ -151,7 +151,7 @@ performance benefits.
Linear Operators
================
A linear operator (represented by NIFTy4's abstract :class:`LinearOperator`
A linear operator (represented by NIFTy5's abstract :class:`LinearOperator`
class) can be interpreted as an (implicitly defined) matrix.
It can be applied to :class:`Field` instances, resulting in other :class:`Field`
instances that potentially live on other domains.
......@@ -245,7 +245,7 @@ high-dimensional functions, which are often nonlinear.
Energy functionals
------------------
In NIFTy4 such functions are represented by objects of type :class:`Energy`.
In NIFTy5 such functions are represented by objects of type :class:`Energy`.
These hold the prescription how to calculate the function's
:attr:`~Energy.value`, :attr:`~Energy.gradient` and
(optionally) :attr:`~Energy.curvature` at any given :attr:`~Energy.position`
......@@ -256,9 +256,9 @@ linear operator objects.
Energies are classes that typically have to be provided by the user when
tackling new IFT problems.
Some examples of concrete energy classes delivered with NIFTy4 are
Some examples of concrete energy classes delivered with NIFTy5 are
:class:`QuadraticEnergy` (with position-independent curvature, mainly used with
conjugate gradient minimization) and :class:`~nifty4.library.WienerFilterEnergy`.
conjugate gradient minimization) and :class:`~nifty5.library.WienerFilterEnergy`.
Iteration control
......@@ -269,7 +269,7 @@ checking the quality of the current solution estimate and stopping once
it is sufficiently accurate. In case of numerical problems, the iteration needs
to be terminated as well, returning a suitable error description.
In NIFTy4, this functionality is encapsulated in the abstract
In NIFTy5, this functionality is encapsulated in the abstract
:class:`IterationController` class, which is provided with the initial energy
object before starting the minimization, and is updated with the improved
energy after every iteration. Based on this information, it can either continue
......
......@@ -73,7 +73,7 @@ source_suffix = '.rst'
master_doc = 'index'
# General information about the project.
project = u'NIFTy4'
project = u'NIFTy5'
copyright = u'2013-2018, Max-Planck-Society'
author = u'Theo Steininger / Martin Reinecke'
......
......@@ -5,7 +5,7 @@ Installation
In the following, we assume a Debian-based Linux distribution. For other
distributions, the "apt" lines will need slight changes.
NIFTy4 and its mandatory dependencies can be installed via::
NIFTy5 and its mandatory dependencies can be installed via::
sudo apt-get install git libfftw3-dev python python-pip python-dev
pip install --user git+https://gitlab.mpcdf.mpg.de/ift/NIFTy.git@NIFTy_4
......
......@@ -22,4 +22,4 @@ from .logger import logger
from .multi import *
# We deliberately don't set __all__ here, because we don't want people to do a
# "from nifty4 import *"; that would swamp the global namespace.
# "from nifty5 import *"; that would swamp the global namespace.
......@@ -25,7 +25,7 @@ class GLSpace(StructuredDomain):
"""NIFTy subclass for Gauss-Legendre pixelizations of the two-sphere.
Its harmonic partner domain is the
:class:`~nifty4.domains.lm_space.LMSpace`.
:class:`~nifty5.domains.lm_space.LMSpace`.
Parameters
----------
......
......@@ -25,7 +25,7 @@ class HPSpace(StructuredDomain):
"""NIFTy subclass for HEALPix discretizations of the two-sphere.
Its harmonic partner domain is the
:class:`~nifty4.domains.lm_space.LMSpace`.
:class:`~nifty5.domains.lm_space.LMSpace`.
Parameters
----------
......
......@@ -25,8 +25,8 @@ from ..field import Field
class LMSpace(StructuredDomain):
"""NIFTy subclass for sets of spherical harmonic coefficients.
Its harmonic partner spaces are :class:`~nifty4.domains.hp_space.HPSpace`
and :class:`~nifty4.domains.gl_space.GLSpace`.
Its harmonic partner spaces are :class:`~nifty5.domains.hp_space.HPSpace`
and :class:`~nifty5.domains.gl_space.GLSpace`.
Parameters
----------
......@@ -130,7 +130,7 @@ class LMSpace(StructuredDomain):
return self._mmax
def get_default_codomain(self):
"""Returns a :class:`~nifty4.domains.gl_space.GLSpace` object, which is
"""Returns a :class:`~nifty5.domains.gl_space.GLSpace` object, which is
capable of storing an accurate representation of data residing on
`self`.
......
......@@ -21,7 +21,7 @@ from functools import reduce
class UnstructuredDomain(Domain):
"""A :class:`~nifty4.domains.domain.Domain` subclass for spaces with no
"""A :class:`~nifty5.domains.domain.Domain` subclass for spaces with no
associated geometry.
Typically used for data spaces.
......
......@@ -713,10 +713,10 @@ class Field(object):
self.local_data[()] = other.local_data[()]
def __repr__(self):
return "<nifty4.Field>"
return "<nifty5.Field>"
def __str__(self):
return "nifty4.Field instance\n- domain = " + \
return "nifty5.Field instance\n- domain = " + \
self._domain.__str__() + \
"\n- val = " + repr(self.val)
......
......@@ -20,7 +20,7 @@
def _logger_init():
import logging
from . import dobj
res = logging.getLogger('NIFTy4')
res = logging.getLogger('NIFTy5')
res.setLevel(logging.DEBUG)
if dobj.rank == 0:
ch = logging.StreamHandler()
......
......@@ -29,7 +29,7 @@ class ConjugateGradient(Minimizer):
Parameters
----------
controller : :py:class:`nifty4.IterationController`
controller : :py:class:`nifty5.IterationController`
Object that decides when to terminate the minimization.
References
......
from nifty4.library.nonlinearities import Exponential, PositiveTanh, Tanh
from nifty4.sugar import makeOp
from nifty5.library.nonlinearities import Exponential, PositiveTanh, Tanh
from nifty5.sugar import makeOp
from .model import Model
......
import nifty4 as ift
import nifty5 as ift
from .model import Model
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment