From 7d2f3c77a638c79823580cff2867a968f0e37305 Mon Sep 17 00:00:00 2001 From: Henry Pinkard <7969470+henrypinkard@users.noreply.github.com> Date: Tue, 9 Apr 2024 19:55:12 -0700 Subject: [PATCH] clarify camera notifications --- pycromanager/acquisition/acq_eng_py/internal/engine.py | 7 ++++++- .../acquisition/acq_eng_py/main/acq_notification.py | 3 ++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/pycromanager/acquisition/acq_eng_py/internal/engine.py b/pycromanager/acquisition/acq_eng_py/internal/engine.py index 0b1c7b39..8fd24205 100644 --- a/pycromanager/acquisition/acq_eng_py/internal/engine.py +++ b/pycromanager/acquisition/acq_eng_py/internal/engine.py @@ -246,7 +246,7 @@ def acquire_images(self, event: AcquisitionEvent, hardware_sequences_in_progress height = self.core.get_image_height() self.core.snap_image() event.acquisition_.post_notification(AcqNotification( - AcqNotification.Camera, event.axisPositions_, AcqNotification.Camera.POST_EXPOSURE)) + AcqNotification.Camera, event.axisPositions_, AcqNotification.Camera.POST_SNAP)) for h in event.acquisition_.get_after_exposure_hooks(): h.run(event) @@ -383,6 +383,11 @@ def acquire_images(self, event: AcquisitionEvent, hardware_sequences_in_progress corresponding_event.acquisition_.add_to_image_metadata(ti.tags) corresponding_event.acquisition_.add_to_output(ti) + self.stop_hardware_sequences(hardware_sequences_in_progress) + + event.acquisition_.post_notification(AcqNotification( + AcqNotification.Camera, event.axisPositions_, AcqNotification.Camera.POST_SEQUENCE_STOPPED)) + if timeout: raise TimeoutError("Timeout waiting for images to arrive in circular buffer") diff --git a/pycromanager/acquisition/acq_eng_py/main/acq_notification.py b/pycromanager/acquisition/acq_eng_py/main/acq_notification.py index 79ea77a8..75adc42a 100644 --- a/pycromanager/acquisition/acq_eng_py/main/acq_notification.py +++ b/pycromanager/acquisition/acq_eng_py/main/acq_notification.py @@ -20,8 +20,9 @@ def to_string(): class Camera: PRE_SEQUENCE_STARTED = "pre_sequence_started" + POST_SEQUENCE_STOPPED = "post_sequence_stopped" PRE_SNAP = "pre_snap" - POST_EXPOSURE = "post_exposure" + POST_SNAP = "post_snap" @staticmethod def to_string():