From a801ab6d5cd59edd469f973c179531a5dc895dde Mon Sep 17 00:00:00 2001 From: rettigl Date: Mon, 9 Oct 2023 22:38:23 +0200 Subject: [PATCH] replace calculation of inverse dfield with dummy dfield in metadata test function for pose correction workflow to speed tests up --- tests/calibrator/test_momentum.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/calibrator/test_momentum.py b/tests/calibrator/test_momentum.py index 95cb2446..63ddb0f2 100644 --- a/tests/calibrator/test_momentum.py +++ b/tests/calibrator/test_momentum.py @@ -269,9 +269,20 @@ def test_apply_registration( [248.29, 248.62], ], ) + # store dummy deformation + mc.reset_deformation() + dummy_inv_dfield = np.asarray( + [ + np.asarray([np.arange(0, 2048) for _ in range(2048)]), + np.asarray([np.arange(0, 2048) for _ in range(2048)]).T, + ], + ) + mc.inverse_dfield = dummy_inv_dfield mc.add_features(features=features, rotsym=6) mc.spline_warp_estimate() mc.pose_adjustment(**transformations, apply=True) + # disable re-calculation of inverse defield to save time, as we are just testing meta data here + mc.dfield_updated = False df, metadata = mc.apply_corrections(df=df) assert "Xm" in df.columns assert "Ym" in df.columns