From e6b29fd307a1a47c3fd7aa5cc1091151eb478172 Mon Sep 17 00:00:00 2001 From: Alan Liddell Date: Tue, 28 May 2024 11:00:49 -0400 Subject: [PATCH] Add storage dimensions for eGrabber tests. --- tests/test_egrabber.py | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/tests/test_egrabber.py b/tests/test_egrabber.py index 5ee9d38..84335e2 100644 --- a/tests/test_egrabber.py +++ b/tests/test_egrabber.py @@ -49,6 +49,34 @@ def test_vieworks_stream( p.video[0].storage.settings.pixel_scale_um = (0.2, 0.2) p.video[0].max_frame_count = 10 + # configure storage dimensions + dimension_x = acquire.StorageDimension( + name="x", + kind="Space", + array_size_px=p.video[0].camera.settings.shape[0], + chunk_size_px=p.video[0].camera.settings.shape[0] // 2, + ) + + dimension_y = acquire.StorageDimension( + name="y", + kind="Space", + array_size_px=p.video[0].camera.settings.shape[1], + chunk_size_px=p.video[0].camera.settings.shape[1] // 2, + ) + + dimension_t = acquire.StorageDimension( + name="t", + kind="Time", + array_size_px=0, + chunk_size_px=p.video[0].max_frame_count, + ) + + p.video[0].storage.settings.acquisition_dimensions = [ + dimension_x, + dimension_y, + dimension_t, + ] + p = runtime.set_configuration(p) logging.info(pprint.pformat(p.dict()))