Commit 5ed64170 authored by Philipp Arras's avatar Philipp Arras

Fixups

parent 6c1ced81
......@@ -21,7 +21,6 @@ import nifty5 as ift
import numpy as np
from itertools import product
from test.common import expand
from numpy.testing import assert_allclose
def _flat_PS(k):
......@@ -66,8 +65,7 @@ class Energy_Tests(unittest.TestCase):
@expand(product([ift.GLSpace(15),
ift.RGSpace(64, distances=.789),
ift.RGSpace([32, 32], distances=.789)],
[ift.library.Tanh, ift.library.Exponential,
ift.library.Linear],
[ift.Tanh, ift.Exponential, ift.Linear],
[4, 78, 23]))
def testNonlinearMap(self, space, nonlinearity, seed):
np.random.seed(seed)
......@@ -93,7 +91,7 @@ class Energy_Tests(unittest.TestCase):
energy = ift.library.NonlinearWienerFilterEnergy(
position=xi0, d=d, Instrument=R, nonlinearity=f, ht=ht, power=A,
N=N, S=S)
if isinstance(nonlinearity, ift.library.Linear):
if isinstance(nonlinearity, ift.Linear):
ift.extra.check_value_gradient_curvature_consistency(
energy, ntries=10)
else:
......
......@@ -31,7 +31,7 @@ def _flat_PS(k):
class Noise_Energy_Tests(unittest.TestCase):
@expand(product([ift.RGSpace(64, distances=.789),
ift.RGSpace([32, 32], distances=.789)],
[ift.library.Exponential, ift.library.Linear],
[ift.Exponential, ift.Linear],
[23, 131, 32]))
def testNoise(self, space, nonlinearity, seed):
np.random.seed(seed)
......
......@@ -21,7 +21,6 @@ import nifty5 as ift
import numpy as np
from itertools import product
from test.common import expand
from numpy.testing import assert_allclose
def _flat_PS(k):
......@@ -31,7 +30,7 @@ def _flat_PS(k):
class Energy_Tests(unittest.TestCase):
@expand(product([ift.RGSpace(64, distances=.789),
ift.RGSpace([32, 32], distances=.789)],
[ift.library.Exponential, ift.library.Linear],
[ift.Exponential, ift.Linear],
[132, 42, 3]))
def testNonlinearPower(self, space, nonlinearity, seed):
np.random.seed(seed)
......
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