Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ift
NIFTy
Commits
91f480e9
Commit
91f480e9
authored
Nov 26, 2019
by
Martin Reinecke
Browse files
5->6
parent
14052dd3
Changes
60
Hide whitespace changes
Inline
Side-by-side
docs/source/installation.rst
View file @
91f480e9
...
...
@@ -5,10 +5,10 @@ Installation
In the following, we assume a Debian-based Linux distribution. For other
distributions, the "apt" lines will need slight changes.
NIFTy
5
and its mandatory dependencies can be installed via::
NIFTy
6
and its mandatory dependencies can be installed via::
sudo apt-get install git python3 python3-pip python3-dev
pip3 install --user git+https://gitlab.mpcdf.mpg.de/ift/nifty.git@NIFTy_
5
pip3 install --user git+https://gitlab.mpcdf.mpg.de/ift/nifty.git@NIFTy_
6
pip3 install --user git+https://gitlab.mpcdf.mpg.de/mtr/pypocketfft
Plotting support is added via::
...
...
docs/source/volume.rst
View file @
91f480e9
...
...
@@ -148,7 +148,7 @@ A visualisation of this can be seen in figure 2, which displays the MAP inferenc
Implementation in NIFTy
.......................
.. currentmodule:: nifty
5
.. currentmodule:: nifty
6
Most codes in NIFTy will contain the description of a measurement process or,
more generally, a log-likelihood.
...
...
nifty5/__init__.py
View file @
91f480e9
...
...
@@ -99,4 +99,4 @@ if _scheme == "Samples":
from
.minimization.metric_gaussian_kl_mpi
import
MetricGaussianKL_MPI
# We deliberately don't set __all__ here, because we don't want people to do a
# "from nifty
5
import *"; that would swamp the global namespace.
# "from nifty
6
import *"; that would swamp the global namespace.
nifty5/domains/gl_space.py
View file @
91f480e9
...
...
@@ -24,7 +24,7 @@ class GLSpace(StructuredDomain):
"""Represents a 2-sphere with Gauss-Legendre pixelization.
Its harmonic partner domain is the
:class:`~nifty
5
.domains.lm_space.LMSpace`.
:class:`~nifty
6
.domains.lm_space.LMSpace`.
Parameters
----------
...
...
nifty5/domains/hp_space.py
View file @
91f480e9
...
...
@@ -24,7 +24,7 @@ class HPSpace(StructuredDomain):
"""Represents 2-sphere with HEALPix discretization.
Its harmonic partner domain is the
:class:`~nifty
5
.domains.lm_space.LMSpace`.
:class:`~nifty
6
.domains.lm_space.LMSpace`.
Parameters
----------
...
...
nifty5/domains/lm_space.py
View file @
91f480e9
...
...
@@ -24,8 +24,8 @@ from .structured_domain import StructuredDomain
class
LMSpace
(
StructuredDomain
):
"""Represents a set of spherical harmonic coefficients.
Its harmonic partner spaces are :class:`~nifty
5
.domains.hp_space.HPSpace`
and :class:`~nifty
5
.domains.gl_space.GLSpace`.
Its harmonic partner spaces are :class:`~nifty
6
.domains.hp_space.HPSpace`
and :class:`~nifty
6
.domains.gl_space.GLSpace`.
Parameters
----------
...
...
@@ -152,7 +152,7 @@ class LMSpace(StructuredDomain):
return
self
.
_mmax
def
get_default_codomain
(
self
):
"""Returns a :class:`~nifty
5
.domains.gl_space.GLSpace` object, which is
"""Returns a :class:`~nifty
6
.domains.gl_space.GLSpace` object, which is
capable of storing an accurate representation of data residing on
`self`.
...
...
nifty5/domains/unstructured_domain.py
View file @
91f480e9
...
...
@@ -20,7 +20,7 @@ from .domain import Domain
class
UnstructuredDomain
(
Domain
):
"""A :class:`~nifty
5
.domains.domain.Domain` subclass for spaces with no
"""A :class:`~nifty
6
.domains.domain.Domain` subclass for spaces with no
associated geometry.
Typically used for data spaces.
...
...
nifty5/field.py
View file @
91f480e9
...
...
@@ -595,10 +595,10 @@ class Field(object):
return
sqrt
(
self
.
var
(
spaces
))
def
__repr__
(
self
):
return
"<nifty
5
.Field>"
return
"<nifty
6
.Field>"
def
__str__
(
self
):
return
"nifty
5
.Field instance
\n
- domain = "
+
\
return
"nifty
6
.Field instance
\n
- domain = "
+
\
self
.
_domain
.
__str__
()
+
\
"
\n
- val = "
+
repr
(
self
.
_val
)
...
...
nifty5/logger.py
View file @
91f480e9
...
...
@@ -19,7 +19,7 @@
def
_logger_init
():
import
logging
from
.
import
dobj
res
=
logging
.
getLogger
(
'NIFTy
5
'
)
res
=
logging
.
getLogger
(
'NIFTy
6
'
)
res
.
setLevel
(
logging
.
DEBUG
)
res
.
propagate
=
False
if
dobj
.
rank
==
0
:
...
...
nifty5/minimization/conjugate_gradient.py
View file @
91f480e9
...
...
@@ -27,7 +27,7 @@ class ConjugateGradient(Minimizer):
Parameters
----------
controller : :py:class:`nifty
5
.IterationController`
controller : :py:class:`nifty
6
.IterationController`
Object that decides when to terminate the minimization.
nreset : int
every `nreset` CG steps the residual will be recomputed accurately
...
...
setup.py
View file @
91f480e9
...
...
@@ -23,20 +23,20 @@ def write_version():
p
=
subprocess
.
Popen
([
"git"
,
"describe"
,
"--dirty"
,
"--tags"
,
"--always"
],
stdout
=
subprocess
.
PIPE
)
res
=
p
.
communicate
()[
0
].
strip
().
decode
(
'utf-8'
)
with
open
(
"nifty
5
/git_version.py"
,
"w"
)
as
file
:
with
open
(
"nifty
6
/git_version.py"
,
"w"
)
as
file
:
file
.
write
(
'gitversion = "{}"
\n
'
.
format
(
res
))
write_version
()
exec
(
open
(
'nifty
5
/version.py'
).
read
())
exec
(
open
(
'nifty
6
/version.py'
).
read
())
setup
(
name
=
"nifty
5
"
,
setup
(
name
=
"nifty
6
"
,
version
=
__version__
,
author
=
"Theo Steininger, Martin Reinecke"
,
author_email
=
"martin@mpa-garching.mpg.de"
,
description
=
"Numerical Information Field Theory"
,
url
=
"http://www.mpa-garching.mpg.de/ift/nifty/"
,
packages
=
find_packages
(
include
=
[
"nifty
5
"
,
"nifty
5
.*"
]),
packages
=
find_packages
(
include
=
[
"nifty
6
"
,
"nifty
6
.*"
]),
zip_safe
=
True
,
license
=
"GPLv3"
,
setup_requires
=
[
'scipy'
],
...
...
test/test_energy_gradients.py
View file @
91f480e9
...
...
@@ -18,7 +18,7 @@
import
numpy
as
np
import
pytest
import
nifty
5
as
ift
import
nifty
6
as
ift
from
itertools
import
product
# Currently it is not possible to parametrize fixtures. But this will
...
...
test/test_field.py
View file @
91f480e9
...
...
@@ -19,7 +19,7 @@ import numpy as np
import
pytest
from
numpy.testing
import
assert_allclose
,
assert_equal
,
assert_raises
import
nifty
5
as
ift
import
nifty
6
as
ift
pmp
=
pytest
.
mark
.
parametrize
SPACES
=
[
ift
.
RGSpace
((
4
,)),
ift
.
RGSpace
((
5
))]
...
...
test/test_gaussian_energy.py
View file @
91f480e9
...
...
@@ -18,7 +18,7 @@
import
numpy
as
np
import
pytest
import
nifty
5
as
ift
import
nifty
6
as
ift
def
_flat_PS
(
k
):
...
...
test/test_kl.py
View file @
91f480e9
...
...
@@ -17,7 +17,7 @@
import
numpy
as
np
import
nifty
5
as
ift
import
nifty
6
as
ift
from
numpy.testing
import
assert_
,
assert_allclose
import
pytest
...
...
test/test_linearization.py
View file @
91f480e9
...
...
@@ -19,7 +19,7 @@ import numpy as np
import
pytest
from
numpy.testing
import
assert_
,
assert_allclose
import
nifty
5
as
ift
import
nifty
6
as
ift
pmp
=
pytest
.
mark
.
parametrize
...
...
test/test_minimizers.py
View file @
91f480e9
...
...
@@ -21,7 +21,7 @@ import numpy as np
import
pytest
from
numpy.testing
import
assert_allclose
,
assert_equal
import
nifty
5
as
ift
import
nifty
6
as
ift
pmp
=
pytest
.
mark
.
parametrize
IC
=
ift
.
GradientNormController
(
tol_abs_gradnorm
=
1e-5
,
iteration_limit
=
1000
)
...
...
test/test_multi_field.py
View file @
91f480e9
...
...
@@ -18,7 +18,7 @@
import
numpy
as
np
from
numpy.testing
import
assert_allclose
,
assert_equal
import
nifty
5
as
ift
import
nifty
6
as
ift
dom
=
ift
.
makeDomain
({
"d1"
:
ift
.
RGSpace
(
10
)})
...
...
test/test_operators/test_adjoint.py
View file @
91f480e9
...
...
@@ -18,7 +18,7 @@
import
numpy
as
np
import
pytest
import
nifty
5
as
ift
import
nifty
6
as
ift
from
..common
import
list2fixture
...
...
test/test_operators/test_composed_operator.py
View file @
91f480e9
...
...
@@ -17,7 +17,7 @@
from
numpy.testing
import
assert_allclose
,
assert_equal
import
nifty
5
as
ift
import
nifty
6
as
ift
from
..common
import
list2fixture
...
...
Prev
1
2
3
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment