From 35e0d1913e67f46471c3f31f33855260c6988b6b Mon Sep 17 00:00:00 2001 From: Nico Stuurman Date: Tue, 5 Sep 2023 10:06:05 -0700 Subject: [PATCH 1/4] StackResampler: clear queue when initializing projections. Otherwise, strange ghost images appear when re-utilizing an instance of this class. --- .../main/java/org/micromanager/lightsheet/StackResampler.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/java/src/main/java/org/micromanager/lightsheet/StackResampler.java b/java/src/main/java/org/micromanager/lightsheet/StackResampler.java index 40a1e6cc..18298974 100644 --- a/java/src/main/java/org/micromanager/lightsheet/StackResampler.java +++ b/java/src/main/java/org/micromanager/lightsheet/StackResampler.java @@ -345,6 +345,8 @@ private void precomputeReconWeightings() { * projection and recon arrays. */ public void initializeProjections() { + // Not quite sure why, but this is needed to be able to re-utilize this Resampler. + imageQueue_.clear(); int reconImageZShape = this.reconImageShape_[0]; int reconImageYShape = this.reconImageShape_[1]; int reconImageXShape = this.reconImageShape_[2]; From 82f55c6079c1a9a645f3d64ab05262820956fd96 Mon Sep 17 00:00:00 2001 From: Nico Stuurman Date: Tue, 5 Sep 2023 10:46:14 -0700 Subject: [PATCH 2/4] Bump java version to 0.43.1 --- java/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/pom.xml b/java/pom.xml index 0ed8ce65..13030f7e 100644 --- a/java/pom.xml +++ b/java/pom.xml @@ -2,7 +2,7 @@ 4.0.0 org.micro-manager.pycro-manager PycroManagerJava - 0.43.0 + 0.43.1 jar Pycro-Manager Java The Java components of Pycro-Manager From f7e9f4d05aa596227f2ec3dc1fd0f005d6eeec0f Mon Sep 17 00:00:00 2001 From: LabelFree Date: Tue, 5 Sep 2023 17:26:01 -0700 Subject: [PATCH 3/4] add equal exposures to channel sequencing test --- pycromanager/test/test_acquisition.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pycromanager/test/test_acquisition.py b/pycromanager/test/test_acquisition.py index 6f79bcc3..075c3224 100644 --- a/pycromanager/test/test_acquisition.py +++ b/pycromanager/test/test_acquisition.py @@ -152,11 +152,16 @@ def test_channel_seq_acq(launch_mm_headless, setup_data_folder): Test that channels can be sequenced """ + channels = ['DAPI', 'FITC', 'Rhodamine', 'Cy5'] + channel_exposures_ms = [10] * len(channels) # exposure times may be provided, but must be all equal + mmc = Core() + mmc.set_exposure(2) mmc.set_property('LED', 'Sequence', 'On') events = multi_d_acquisition_events(channel_group='Channel-Multiband', - channels=['DAPI', 'FITC', 'Rhodamine', 'Cy5']) + channels=channels, + channel_exposures_ms=channel_exposures_ms) def hook_fn(_events): assert check_acq_sequenced(_events, len(events)), 'Sequenced acquisition is not built correctly' From 07cc3583319adb5aa6e7f5f1bbb283052a599d0b Mon Sep 17 00:00:00 2001 From: talonchandler Date: Wed, 6 Sep 2023 14:18:40 -0700 Subject: [PATCH 4/4] update channel seq tests --- pycromanager/test/test_acquisition.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/pycromanager/test/test_acquisition.py b/pycromanager/test/test_acquisition.py index 075c3224..bad90cb1 100644 --- a/pycromanager/test/test_acquisition.py +++ b/pycromanager/test/test_acquisition.py @@ -151,6 +151,29 @@ def test_channel_seq_acq(launch_mm_headless, setup_data_folder): """ Test that channels can be sequenced + """ + channels = ['DAPI', 'FITC', 'Rhodamine', 'Cy5'] + + mmc = Core() + mmc.set_property('LED', 'Sequence', 'On') + + events = multi_d_acquisition_events(channel_group='Channel-Multiband', + channels=channels) + + def hook_fn(_events): + assert check_acq_sequenced(_events, len(events)), 'Sequenced acquisition is not built correctly' + return None # no need to actually acquire the data + + with Acquisition(setup_data_folder, 'acq', show_display=False, + pre_hardware_hook_fn=hook_fn) as acq: + acq.acquire(events) + + +def test_channel_exp_seq_acq(launch_mm_headless, setup_data_folder): + """ + Test that channels can be sequenced when equal exposure times for each + channel are provided + """ channels = ['DAPI', 'FITC', 'Rhodamine', 'Cy5'] channel_exposures_ms = [10] * len(channels) # exposure times may be provided, but must be all equal