From 2b79634854e45f040ceece5974f404a3ce50aafe Mon Sep 17 00:00:00 2001 From: Henry Pinkard <7969470+henrypinkard@users.noreply.github.com> Date: Tue, 9 Apr 2024 14:36:22 -0700 Subject: [PATCH] add test for empty axes --- pycromanager/test/test_acquisition.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/pycromanager/test/test_acquisition.py b/pycromanager/test/test_acquisition.py index ced6827c..313300d7 100644 --- a/pycromanager/test/test_acquisition.py +++ b/pycromanager/test/test_acquisition.py @@ -652,3 +652,18 @@ def test_multi_channel_parsing(launch_mm_headless, setup_data_folder): assert all([channel in dataset.get_channel_names() for channel in ["DAPI", "FITC"]]) finally: dataset.close() + + +def test_empty_axes(launch_mm_headless, setup_data_folder): + """ + Test that images with empty axes are correctly saved + """ + + with Acquisition(setup_data_folder, 'acq', show_display=False) as acq: + acq.acquire({'axes': {}}) + + dataset = acq.get_dataset() + try: + assert dataset.read_image() is not None and dataset.read_image().max() > 0 + finally: + dataset.close() \ No newline at end of file