@@ -503,7 +503,7 @@ def run_command(self, command, *args, **kwargs):
503503 return
504504
505505 if command == "acquire" :
506- """ Begin an acquisition."""
506+ """Begin an acquisition."""
507507 self .is_acquiring = True
508508 self .imaging_mode = self .configuration ["experiment" ]["MicroscopeState" ][
509509 "image_mode"
@@ -751,7 +751,8 @@ def run_command(self, command, *args, **kwargs):
751751
752752 # elif command == "change_camera":
753753 # new_camera = list(self.active_microscope.cameras.values())[args[0]]
754- # print(f"Using new camera >> {new_camera.camera_controller._serial_number}")
754+ # print(f"Using new camera >> {
755+ # new_camera.camera_controller._serial_number}")
755756 # self.active_microscope.camera = new_camera
756757
757758 elif command == "exit" :
@@ -1065,7 +1066,7 @@ def snap_image(self):
10651066 self .event_queue .put (
10661067 (
10671068 "warning" ,
1068- "There is an error happened. Please read the log files for details!" ,
1069+ "An error happened. Please read the log files for details!" ,
10691070 )
10701071 )
10711072 return
@@ -1089,12 +1090,13 @@ def run_live_acquisition(self):
10891090 acquisition parameters in real-time.
10901091 """
10911092 self .stop_acquisition = False
1092- while self .stop_acquisition is False and self .stop_send_signal is False :
1093+ while not self .stop_acquisition and not self .stop_send_signal :
10931094 self .run_acquisition ()
1094- if not self .injected_flag .value :
1095- self .signal_container .reset ()
1096- else :
1095+ if self .injected_flag .value :
10971096 self .reset_feature_list ()
1097+ elif hasattr (self , "signal_container" ):
1098+ self .signal_container .reset ()
1099+
10981100 # Update the stage position.
10991101 # Allows the user to externally move the stage in the continuous mode.
11001102 self .get_stage_position ()
@@ -1152,7 +1154,6 @@ def reset_feature_list(self):
11521154 )
11531155 injected_flag .value = False
11541156
1155-
11561157 def change_resolution (self , resolution_value ):
11571158 """Switch resolution mode of the microscope.
11581159
0 commit comments