Commit 14d296bf authored by Pumpe, Daniel (dpumpe)'s avatar Pumpe, Daniel (dpumpe)
Browse files

tests for SmoothingOperator

parent 3d4b0ce3
Pipeline #12405 failed with stage
in 4 minutes and 56 seconds
......@@ -9,8 +9,6 @@ from nifty import Field,\
PowerSpace,\
SmoothingOperator
from test.common import generate_spaces
from itertools import product
from test.common import expand
......@@ -60,22 +58,3 @@ class SmoothingOperator_Tests(unittest.TestCase):
tt1 = rand1.dot(op.inverse_times(rand2))
tt2 = rand2.dot(op.inverse_adjoint_times(rand1))
assert_approx_equal(tt1, tt2)
@expand(product(spaces, [0., .5, 5.], [True, False]))
def test_inverse_adjoint_times(self, space, sigma, log_distances):
op = SmoothingOperator(space, sigma=sigma,
log_distances=log_distances)
rand1 = Field.from_random('normal', domain=space)
tt1 = op.times(op.inverse_times(rand1))
assert_allclose(rand1.val.get_full_data(), tt1.val.get_full_data(),
rtol=1e-4)
@expand(product(spaces, [0., .5, 5.], [True, False]))
def test_times(self, space, sigma, log_distances):
op = SmoothingOperator(space, sigma=sigma,
log_distances=log_distances)
rand1 = Field(space, val=0.)
rand1.val[0] = 1.
tt1 = op.inverse_times(op.times(rand1))
assert_allclose(rand1.val.get_full_data(), tt1.val.get_full_data(),
rtol=1e-4)
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