Commit 9b47dc10 authored by Philipp Arras's avatar Philipp Arras
Browse files

nifty7 -> nifty8

parent 3a83451d
......@@ -46,7 +46,7 @@ build_docker_from_cache:
test_serial:
stage: test
script:
- pytest-3 -q --cov=nifty7 test
- pytest-3 -q --cov=nifty8 test
- >
python3 -m coverage report --omit "*plot*" | tee coverage.txt
- >
......
......@@ -144,7 +144,7 @@ In order to dive into those subtleties I suggest running the following code and
playing around with the dtypes.
```
import nifty7 as ift
import nifty8 as ift
import numpy as np
dom = ift.UnstructuredDomain(5)
......@@ -185,7 +185,7 @@ The code now uses `numpy`'s new `SeedSequence` and `Generator` classes for the
production of random numbers (introduced in numpy 1.17. This greatly simplifies
the generation of reproducible random numbers in the presence of MPI parallelism
and leads to cleaner code overall. Please see the documentation of
`nifty7.random` for details.
`nifty8.random` for details.
Interface Change for from_random and OuterProduct
......
......@@ -97,7 +97,7 @@ To run the tests, additional packages are required:
Afterwards the tests (including a coverage report) can be run using the
following command in the repository root:
pytest-3 --cov=nifty7 test
pytest-3 --cov=nifty8 test
### First Steps
......
......@@ -24,7 +24,7 @@
import numpy as np
import nifty7 as ift
import nifty8 as ift
def main():
......
......@@ -16,7 +16,7 @@
import numpy as np
import nifty7 as ift
import nifty8 as ift
# In NIFTy, users can add hand-crafted point-wise nonlinearities that are then
# available for `Field`, `MultiField`, `Linearization` and `Operator`. This
......
......@@ -140,7 +140,7 @@
"outputs": [],
"source": [
"import numpy as np\n",
"import nifty7 as ift\n",
"import nifty8 as ift\n",
"import matplotlib.pyplot as plt\n",
"%matplotlib inline"
]
......
......@@ -25,7 +25,7 @@ import sys
import numpy as np
import nifty7 as ift
import nifty8 as ift
def make_checkerboard_mask(position_space):
......
......@@ -25,7 +25,7 @@ import sys
import numpy as np
import nifty7 as ift
import nifty8 as ift
def exposure_2d(domain):
......
......@@ -29,7 +29,7 @@ import sys
import numpy as np
import nifty7 as ift
import nifty8 as ift
ift.random.push_sseq_from_seed(27)
......
......@@ -29,7 +29,7 @@
"metadata": {},
"outputs": [],
"source": [
"import nifty7 as ift\n",
"import nifty8 as ift\n",
"import matplotlib.pyplot as plt\n",
"import numpy as np\n",
"ift.random.push_sseq_from_seed(43)\n",
......@@ -46,7 +46,7 @@
"source": [
"# Plotting routine\n",
"def plot(fields, spectra, title=None):\n",
" # Plotting preparation is normally handled by nifty7.Plot\n",
" # Plotting preparation is normally handled by nifty8.Plot\n",
" # It is done manually here to be able to tweak details\n",
" # Fields are assumed to have identical domains\n",
" fig = plt.figure(tight_layout=True, figsize=(12, 3.5))\n",
......
......@@ -29,7 +29,7 @@ import sys
import numpy as np
import nifty7 as ift
import nifty8 as ift
class SingleDomain(ift.LinearOperator):
......
......@@ -28,7 +28,7 @@
import numpy as np
import nifty7 as ift
import nifty8 as ift
if __name__ == "__main__":
filename = "getting_started_density_{}.png"
......
......@@ -17,7 +17,7 @@
import numpy as np
import nifty7 as ift
import nifty8 as ift
def convtest(test_signal, delta, func):
......
......@@ -31,7 +31,7 @@
import numpy as np
from matplotlib import pyplot as plt
import nifty7 as ift
import nifty8 as ift
ift.random.push_sseq_from_seed(27)
......
......@@ -19,7 +19,7 @@
import matplotlib.pyplot as plt
import numpy as np
import nifty7 as ift
import nifty8 as ift
def polynomial(coefficients, sampling_points):
......
......@@ -28,7 +28,7 @@ import numpy as np
import pylab as plt
from matplotlib.colors import LogNorm
import nifty7 as ift
import nifty8 as ift
def main():
......
EXCLUDE="nifty7/logger.py nifty7/git_version.py"
sphinx-apidoc -e -o docs/source/mod nifty7 ${EXCLUDE}
EXCLUDE="nifty8/logger.py nifty8/git_version.py"
sphinx-apidoc -e -o docs/source/mod nifty8 ${EXCLUDE}
sphinx-build -b html docs/source/ docs/build/
......@@ -13,7 +13,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 = {nifty7},
version = {nifty8},
date = {2018-04-05},
}
......
......@@ -36,7 +36,7 @@ Domains
Abstract base class
-------------------
.. currentmodule:: nifty7.domains.domain
.. currentmodule:: nifty8.domains.domain
One of the fundamental building blocks of the NIFTy7 framework is the *domain*.
Its required capabilities are expressed by the abstract :py:class:`Domain` class.
......@@ -52,7 +52,7 @@ A domain must be able to answer the following queries:
Unstructured domains
--------------------
.. currentmodule:: nifty7.domains.unstructured_domain
.. currentmodule:: nifty8.domains.unstructured_domain
Domains can be either *structured* (i.e. there is geometrical information
associated with them, like position in space and volume factors),
......@@ -65,7 +65,7 @@ Unstructured domains can be described by instances of NIFTy's
Structured domains
------------------
.. currentmodule:: nifty7.domains.structured_domain
.. currentmodule:: nifty8.domains.structured_domain
In contrast to unstructured domains, these domains have an assigned geometry.
NIFTy requires them to provide the volume elements of their grid cells.
......@@ -86,7 +86,7 @@ The additional methods are specified in the abstract class
NIFTy comes with several concrete subclasses of :class:`StructuredDomain`:
.. currentmodule:: nifty7.domains
.. currentmodule:: nifty8.domains
- :class:`~rg_space.RGSpace` represents a regular Cartesian grid with an arbitrary
number of dimensions, which is supposed to be periodic in each dimension.
......@@ -123,7 +123,7 @@ Some examples are:
(on a harmonic domain) and a few inferred model parameters (e.g. on an
unstructured grid).
.. currentmodule:: nifty7
.. currentmodule:: nifty8
Consequently, NIFTy defines a class called :class:`~domain_tuple.DomainTuple`
holding a sequence of :class:`~domains.domain.Domain` objects. The full domain is
......@@ -228,7 +228,7 @@ Advanced operators
NIFTy provides a library of commonly employed operators which can be used for
specific inference problems. Currently these are:
.. currentmodule:: nifty7.library
.. currentmodule:: nifty8.library
- :class:`~smooth_linear_amplitude.SLAmplitude`, which returns a smooth power spectrum.
- :class:`~inverse_gamma_operator.InverseGammaOperator`, which models point sources which are
......@@ -240,7 +240,7 @@ specific inference problems. Currently these are:
Linear Operators
================
.. currentmodule:: nifty7.operators
.. currentmodule:: nifty8.operators
A linear operator (represented by NIFTy7's abstract
:class:`~linear_operator.LinearOperator` class) is derived from
......@@ -282,7 +282,7 @@ This functionality is provided by NIFTy's
:class:`~inversion_enabler.InversionEnabler` class, which is itself a linear
operator.
.. currentmodule:: nifty7.operators.operator
.. currentmodule:: nifty8.operators.operator
Direct multiplication and adjoint inverse multiplication transform a field
defined on the operator's :attr:`~Operator.domain` to one defined on the
......@@ -290,7 +290,7 @@ operator's :attr:`~Operator.target`, whereas adjoint multiplication and inverse
multiplication transform from :attr:`~Operator.target` to
:attr:`~Operator.domain`.
.. currentmodule:: nifty7.operators
.. currentmodule:: nifty8.operators
Operators with identical domain and target can be derived from
:class:`~endomorphic_operator.EndomorphicOperator`. Typical examples for this
......@@ -299,7 +299,7 @@ multiplies its input by a scalar value, and
:class:`~diagonal_operator.DiagonalOperator`, which multiplies every value of
its input field with potentially different values.
.. currentmodule:: nifty7
.. currentmodule:: nifty8
Further operator classes provided by NIFTy are
......@@ -325,7 +325,7 @@ and ``f1`` and ``f2`` are of type :class:`~field.Field`, writing::
X = A(B.inverse(A.adjoint)) + C
f2 = X(f1)
.. currentmodule:: nifty7.operators.linear_operator
.. currentmodule:: nifty8.operators.linear_operator
will perform the operation suggested intuitively by the notation, checking
domain compatibility while building the composed operator.
......@@ -349,7 +349,7 @@ Minimization
Most problems in IFT are solved by (possibly nested) minimizations of
high-dimensional functions, which are often nonlinear.
.. currentmodule:: nifty7.minimization
.. currentmodule:: nifty8.minimization
Energy functionals
------------------
......@@ -362,7 +362,7 @@ function's :attr:`~energy.Energy.value`, :attr:`~energy.Energy.gradient` and
floating-point scalars, gradients have the form of fields defined on the energy's
position domain, and metrics are represented by linear operator objects.
.. currentmodule:: nifty7
.. currentmodule:: nifty8
Energies are classes that typically have to be provided by the user when
tackling new IFT problems. An example of concrete energy classes delivered with
......@@ -393,7 +393,7 @@ functional for MGVI and minimize it.
Iteration control
-----------------
.. currentmodule:: nifty7.minimization.iteration_controllers
.. currentmodule:: nifty8.minimization.iteration_controllers
Iterative minimization of an energy requires some means of
checking the quality of the current solution estimate and stopping once
......@@ -417,7 +417,7 @@ in NIFTy can be found below, but users have complete freedom to implement custom
Minimization algorithms
-----------------------
.. currentmodule:: nifty7.minimization
.. currentmodule:: nifty8.minimization
All minimization algorithms in NIFTy inherit from the abstract
:class:`~minimizer.Minimizer` class, which presents a minimalistic interface
......@@ -458,7 +458,7 @@ available under the names :class:`~scipy_minimizer.ScipyCG` and
Application to operator inversion
---------------------------------
.. currentmodule:: nifty7
.. currentmodule:: nifty8
The machinery presented here cannot only be used for minimizing functionals
derived from IFT, but also for the numerical inversion of linear operators, if
......
import nifty7
import nifty8
extensions = [
'sphinx.ext.napoleon', # Support for NumPy and Google style docstrings
......@@ -19,7 +19,7 @@ project = u'NIFTy7'
copyright = u'2013-2021, Max-Planck-Society'
author = u'Martin Reinecke'
release = nifty7.version.__version__
release = nifty8.version.__version__
version = release[:-2]
language = None
......@@ -30,5 +30,5 @@ html_theme = "sphinx_rtd_theme"
html_logo = 'nifty_logo_black.png'
exclude_patterns = [
'mod/modules.rst', 'mod/nifty7.git_version.rst', 'mod/nifty7.logger.rst'
'mod/modules.rst', 'mod/nifty8.git_version.rst', 'mod/nifty8.logger.rst'
]
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