Skip to content

Commit

Permalink
replace calculation of inverse dfield with dummy dfield in metadata t…
Browse files Browse the repository at this point in the history
…est function for pose correction workflow to speed tests up
  • Loading branch information
rettigl committed Oct 9, 2023
1 parent 8f49f40 commit a801ab6
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/calibrator/test_momentum.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a801ab6

Please sign in to comment.