From df6c4b815dfa7a5fe271014cb47fd4c58e9aa05c Mon Sep 17 00:00:00 2001 From: Cammille Carinan <cammille.carinan@xfel.eu> Date: Tue, 25 May 2021 11:05:39 +0200 Subject: [PATCH] Correct width absolute value when flipped --- src/toolbox_scs/base/tests/test_knife_edge.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/toolbox_scs/base/tests/test_knife_edge.py b/src/toolbox_scs/base/tests/test_knife_edge.py index 1f06990..888afbe 100644 --- a/src/toolbox_scs/base/tests/test_knife_edge.py +++ b/src/toolbox_scs/base/tests/test_knife_edge.py @@ -103,7 +103,8 @@ def test_knife_edge_base(): np.testing.assert_allclose(p0, popt, atol=1e-1) # Test flipped data - popt, _ = knife_edge_base(x, eff_y[::-1]) + popt, _ = knife_edge_base(x, eff_y[:, ::-1]) + p0[1] = abs(p0[1]) # Absolute value when flipped np.testing.assert_allclose(p0, popt, atol=1e-1) -- GitLab