From 797654ffa84d2fb4b8b638d4ed2d14a0f1971af1 Mon Sep 17 00:00:00 2001 From: Talon Chandler Date: Mon, 18 Mar 2024 14:40:30 -0700 Subject: [PATCH] test single-slice case --- tests/test_focus_estimator.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/test_focus_estimator.py b/tests/test_focus_estimator.py index 560dc580..eb7cf2b1 100644 --- a/tests/test_focus_estimator.py +++ b/tests/test_focus_estimator.py @@ -45,6 +45,15 @@ def test_focus_estimator(tmp_path): assert slice <= data3D.shape[0] assert plot_path.exists() + # Check single slice + slice = focus.focus_from_transverse_band( + np.random.random((1, 10, 10)), + NA_det, + lambda_ill, + ps, + ) + assert slice == 0 + def test_focus_estimator_snr(tmp_path): ps = 6.5 / 100