Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions src/navigate/model/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ def run_command(self, command, *args, **kwargs):
return

if command == "acquire":
""" Begin an acquisition."""
"""Begin an acquisition."""
self.is_acquiring = True
self.imaging_mode = self.configuration["experiment"]["MicroscopeState"][
"image_mode"
Expand Down Expand Up @@ -751,7 +751,8 @@ def run_command(self, command, *args, **kwargs):

# elif command == "change_camera":
# new_camera = list(self.active_microscope.cameras.values())[args[0]]
# print(f"Using new camera >> {new_camera.camera_controller._serial_number}")
# print(f"Using new camera >> {
# new_camera.camera_controller._serial_number}")
# self.active_microscope.camera = new_camera

elif command == "exit":
Expand Down Expand Up @@ -1065,7 +1066,7 @@ def snap_image(self):
self.event_queue.put(
(
"warning",
"There is an error happened. Please read the log files for details!",
"An error happened. Please read the log files for details!",
)
)
return
Expand All @@ -1089,12 +1090,13 @@ def run_live_acquisition(self):
acquisition parameters in real-time.
"""
self.stop_acquisition = False
while self.stop_acquisition is False and self.stop_send_signal is False:
while not self.stop_acquisition and not self.stop_send_signal:
self.run_acquisition()
if not self.injected_flag.value:
self.signal_container.reset()
else:
if self.injected_flag.value:
self.reset_feature_list()
elif hasattr(self, "signal_container"):
self.signal_container.reset()

# Update the stage position.
# Allows the user to externally move the stage in the continuous mode.
self.get_stage_position()
Expand Down Expand Up @@ -1152,7 +1154,6 @@ def reset_feature_list(self):
)
injected_flag.value = False


def change_resolution(self, resolution_value):
"""Switch resolution mode of the microscope.

Expand Down