Loading openflexure_microscope/microscope.py +69 −66 Original line number Diff line number Diff line Loading @@ -153,6 +153,7 @@ class Microscope: Return: dict: Dictionary containing complete microscope state """ with self.lock: state = {"camera": self.camera.state, "stage": self.stage.state} return state Loading @@ -160,6 +161,7 @@ class Microscope: """ Applies a settings dictionary to the microscope. Missing parameters will be left untouched. """ with self.lock: logging.debug("Microscope: Applying settings: {}".format(settings)) # If attached to a camera Loading Loading @@ -197,6 +199,7 @@ class Microscope: This is to ensure that settings for currently disconnected hardware don't get removed from the settings file. """ with self.lock: settings_current = { "id": self.id, Loading Loading @@ -341,7 +344,7 @@ class Microscope: ) # Gether metadata from hardware in a greenlet gevent.spawn(self.add_metadata_to_capture, output, metadata, annotations, tags) gevent.get_hub().threadpool.spawn(self.add_metadata_to_capture, output, metadata, annotations, tags) logging.info(f"Finished capture to {output.file}") Loading Loading
openflexure_microscope/microscope.py +69 −66 Original line number Diff line number Diff line Loading @@ -153,6 +153,7 @@ class Microscope: Return: dict: Dictionary containing complete microscope state """ with self.lock: state = {"camera": self.camera.state, "stage": self.stage.state} return state Loading @@ -160,6 +161,7 @@ class Microscope: """ Applies a settings dictionary to the microscope. Missing parameters will be left untouched. """ with self.lock: logging.debug("Microscope: Applying settings: {}".format(settings)) # If attached to a camera Loading Loading @@ -197,6 +199,7 @@ class Microscope: This is to ensure that settings for currently disconnected hardware don't get removed from the settings file. """ with self.lock: settings_current = { "id": self.id, Loading Loading @@ -341,7 +344,7 @@ class Microscope: ) # Gether metadata from hardware in a greenlet gevent.spawn(self.add_metadata_to_capture, output, metadata, annotations, tags) gevent.get_hub().threadpool.spawn(self.add_metadata_to_capture, output, metadata, annotations, tags) logging.info(f"Finished capture to {output.file}") Loading