From b2871be2169de84d5ad3e9b9ef3a23cd3dacf015 Mon Sep 17 00:00:00 2001 From: Reimar Leike <reimar@leike.name> Date: Wed, 25 Jul 2018 09:56:44 +0200 Subject: [PATCH] now testing LOSResponse for adjoint consistency --- test/test_operators/test_adjoint.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/test_operators/test_adjoint.py b/test/test_operators/test_adjoint.py index 2e8bcf271..c6fa4d2eb 100644 --- a/test/test_operators/test_adjoint.py +++ b/test/test_operators/test_adjoint.py @@ -35,6 +35,15 @@ _pow_spaces = [ift.PowerSpace(ift.RGSpace((17, 38), harmonic=True))] class Consistency_Tests(unittest.TestCase): + @expand(product(_p_RG_spaces, [np.float64, np.complex128])) + def testLOSResponse(self, sp, dtype): + starts = np.random.randn(len(sp.shape), 10) + ends = np.random.randn(len(sp.shape), 10) + sigma_low = 1e-4*np.random.randn(10) + sigma_ups = 1e-5*np.random.randn(10) + op = ift.LOSResponse(sp, starts, ends, sigma_low, sigma_ups) + ift.extra.consistency_check(op, dtype, dtype) + @expand(product(_h_spaces + _p_spaces + _pow_spaces, [np.float64, np.complex128])) def testOperatorCombinations(self, sp, dtype): -- GitLab