diff --git a/pycromanager/acquisition/acq_eng_py/internal/engine.py b/pycromanager/acquisition/acq_eng_py/internal/engine.py index 8fd24205..da02f57c 100644 --- a/pycromanager/acquisition/acq_eng_py/internal/engine.py +++ b/pycromanager/acquisition/acq_eng_py/internal/engine.py @@ -385,8 +385,9 @@ def acquire_images(self, event: AcquisitionEvent, hardware_sequences_in_progress self.stop_hardware_sequences(hardware_sequences_in_progress) - event.acquisition_.post_notification(AcqNotification( - AcqNotification.Camera, event.axisPositions_, AcqNotification.Camera.POST_SEQUENCE_STOPPED)) + if event.get_sequence() is not None: + 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 75adc42a..e8b77457 100644 --- a/pycromanager/acquisition/acq_eng_py/main/acq_notification.py +++ b/pycromanager/acquisition/acq_eng_py/main/acq_notification.py @@ -46,8 +46,8 @@ def __init__(self, type, payload, milestone=None): self.type = AcqNotification.Image self.payload = payload self.milestone = milestone - elif milestone in [AcqNotification.Camera.PRE_SNAP, AcqNotification.Camera.POST_EXPOSURE, - AcqNotification.Camera.PRE_SEQUENCE_STARTED]: + elif milestone in [AcqNotification.Camera.PRE_SNAP, AcqNotification.Camera.POST_SNAP, + AcqNotification.Camera.PRE_SEQUENCE_STARTED, AcqNotification.Camera.POST_SEQUENCE_STOPPED]: self.type = AcqNotification.Camera self.payload = json.loads(payload) if isinstance(payload, str) else payload # convert from '{'time': 5}' to {'time': 5} elif milestone in [AcqNotification.Hardware.PRE_HARDWARE, AcqNotification.Hardware.POST_HARDWARE]: