Skip to content

Commit

Permalink
clarify camera notifications
Browse files Browse the repository at this point in the history
  • Loading branch information
henrypinkard committed Apr 10, 2024
1 parent 2b79634 commit 7d2f3c7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
7 changes: 6 additions & 1 deletion pycromanager/acquisition/acq_eng_py/internal/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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")

Expand Down
3 changes: 2 additions & 1 deletion pycromanager/acquisition/acq_eng_py/main/acq_notification.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down

0 comments on commit 7d2f3c7

Please sign in to comment.