Commit a890fda5 authored by Martin Reinecke's avatar Martin Reinecke
Browse files

Merge branch 'NIFTy_5' into renamings

parents bbf22449 d05da638
NIFTy - Numerical Information Field Theory
[![build status](](
[![coverage report](](
[![build status](](
[![coverage report](](
**NIFTy** project homepage:
......@@ -65,7 +65,8 @@ from .minimization.steepest_descent import SteepestDescent
from .minimization.vl_bfgs import VL_BFGS
from .minimization.l_bfgs import L_BFGS
from .minimization.relaxed_newton import RelaxedNewton
from .minimization.scipy_minimizer import ScipyMinimizer, NewtonCG, L_BFGS_B, ScipyCG
from .minimization.scipy_minimizer import (ScipyMinimizer, NewtonCG, L_BFGS_B,
from import Energy
from .minimization.quadratic_energy import QuadraticEnergy
from .minimization.line_energy import LineEnergy
......@@ -82,7 +83,8 @@ from .library.point_sources import PointSources
from .library.poissonian_energy import PoissonianEnergy
from .library.wiener_filter_curvature import WienerFilterCurvature
from .library.wiener_filter_energy import WienerFilterEnergy
from .library.correlated_fields import make_correlated_field, make_mf_correlated_field
from .library.correlated_fields import (make_correlated_field,
from . import extra
......@@ -47,7 +47,8 @@ def make_mf_correlated_field(s_space_spatial, s_space_energy,
from ..models.variable import Variable
from ..domain_tuple import DomainTuple
from ..operators.domain_distributor import DomainDistributor
from ..operators.harmonic_transform_operator import HarmonicTransformOperator
from ..operators.harmonic_transform_operator \
import HarmonicTransformOperator
h_space_spatial = s_space_spatial.get_default_codomain()
h_space_energy = s_space_energy.get_default_codomain()
h_space = DomainTuple.make((h_space_spatial, h_space_energy))
......@@ -51,7 +51,8 @@ class PointSources(Model):
def IG_prime(field, alpha, q):
inner = norm.pdf(field.local_data)
outer = invgamma.pdf(invgamma.ppf(norm.cdf(field.local_data), alpha, scale=q), alpha, scale=q)
outer = invgamma.pdf(invgamma.ppf(norm.cdf(field.local_data), alpha,
scale=q), alpha, scale=q)
# outer = np.clip(outer, 1e-20, None)
outer = 1/outer
......@@ -97,7 +97,6 @@ class ChainOperator(LinearOperator):
"""Build a ChainOperator (or something simpler if possible),
a sequence of concatenated LinearOperators.
ops: list of LinearOperator
......@@ -277,7 +277,8 @@ class LinearOperator(NiftyMetaBase()):
if not self._validMode[mode]:
raise NotImplementedError("invalid operator mode specified")
if mode & self.capability == 0:
raise NotImplementedError("requested operator mode is not supported")
raise NotImplementedError(
"requested operator mode is not supported")
def _check_input(self, x, mode):
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