Skip to content

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
  • Loading branch information
henrypinkard committed Oct 5, 2023
2 parents 269aeac + c79cc6a commit 5e4473a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
8 changes: 4 additions & 4 deletions pycromanager/acquisition/acq_eng_py/main/acq_notification.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,21 +36,21 @@ def to_string():
return "image"

def __init__(self, type, id, phase=None):
if type == AcqNotification.Acquisition.to_string():
if type == AcqNotification.Acquisition:
self.type = AcqNotification.Acquisition
self.id = id
self.phase = phase
elif type == AcqNotification.Image.to_string() and phase == AcqNotification.Image.DATA_SINK_FINISHED:
elif type == AcqNotification.Image and phase == AcqNotification.Image.DATA_SINK_FINISHED:
self.type = AcqNotification.Image
self.id = id
self.phase = phase
elif phase in [AcqNotification.Camera.PRE_SNAP, AcqNotification.Camera.POST_EXPOSURE,
AcqNotification.Camera.PRE_SEQUENCE_STARTED]:
self.type = AcqNotification.Camera
self.id = json.loads(id)
self.id = id
elif phase in [AcqNotification.Hardware.PRE_HARDWARE, AcqNotification.Hardware.POST_HARDWARE]:
self.type = AcqNotification.Hardware
self.id = json.loads(id)
self.id = id
elif phase == AcqNotification.Image.IMAGE_SAVED:
self.type = AcqNotification.Image
self.id = id
Expand Down
3 changes: 0 additions & 3 deletions pycromanager/acquisition/python_backend_acquisitions.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ class PythonBackendAcquisition(Acquisition, metaclass=NumpyDocstringInheritanceM

def __init__(
self,
directory: str=None,
name: str='default_acq_name',
image_process_fn: callable=None,
event_generation_hook_fn: callable = None,
Expand All @@ -38,8 +37,6 @@ def __init__(
dict(signature(PythonBackendAcquisition.__init__).parameters.items())[arg_name].default)
for arg_name in arg_names }
super().__init__(**named_args)
if directory is not None:
raise NotImplementedError('Saving to disk is not yet implemented for the python backend. ')
self._dataset = RAMDataStorage()
self._finished = False
self._notifications_finished = False
Expand Down
2 changes: 1 addition & 1 deletion scripts/python_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

mm_app_path = r"C:\Users\henry\Micro-Manager-nightly"
config = mm_app_path + r"\MMConfig_demo.cfg"
start_headless(mm_app_path, config, python_backend=True)
start_headless(mm_app_path, config, python_backend=False)

with Acquisition() as acq:
acq.acquire(multi_d_acquisition_events(num_time_points=10))
Expand Down

0 comments on commit 5e4473a

Please sign in to comment.