diff --git a/src/openflexure_microscope_server/things/autofocus.py b/src/openflexure_microscope_server/things/autofocus.py index 8f9b5039..b923ee49 100644 --- a/src/openflexure_microscope_server/things/autofocus.py +++ b/src/openflexure_microscope_server/things/autofocus.py @@ -372,8 +372,9 @@ class AutofocusThing(Thing): # Find the range of images from the stack to capture sharpest_index = np.argmax(sharpnesses[-images_to_test:]) stack_extent = int((images_to_capture - 1) / 2) - stack_range = range(sharpest_index - stack_extent, sharpest_index + stack_extent + 1) - logger.info(stack_range) + stack_range = range( + sharpest_index - stack_extent, sharpest_index + stack_extent + 1 + ) # Loop through the range, saving each capture to disk for capture_index in stack_range: @@ -388,13 +389,13 @@ class AutofocusThing(Thing): def test_stack(self, sharpnesses: list): """Test a list of sharpnesses, to decide whether the sharpest image from a stack is within them - + Returns a string 'success' if the sharpest image is towards the centre 'continue' if the sharpest image is in the final two images of the list 'restart' if the sharpest image is in the first two images of the list """ - + sharpest_index = np.argmax(sharpnesses) sharpness_length = len(sharpnesses) diff --git a/src/openflexure_microscope_server/things/smart_scan.py b/src/openflexure_microscope_server/things/smart_scan.py index 2eb5d285..22824d77 100644 --- a/src/openflexure_microscope_server/things/smart_scan.py +++ b/src/openflexure_microscope_server/things/smart_scan.py @@ -620,8 +620,6 @@ class SmartScanThing(Thing): self._manage_stitching_threads() next_pos_xy, z_est = route_planner.get_next_location_and_z_estimate() - self._scan_logger.info(z_est) - self._scan_logger.info(self._stage.position["z"]) new_pos_xyz = self._move_to_next_point(next_pos_xy, z_est) current_pos_xyz = ( new_pos_xyz[0], @@ -646,7 +644,7 @@ class SmartScanThing(Thing): focused_height = self._autofocus.run_z_stack( images_dir=self._ongoing_scan_images_dir, - autofocus_dz = self._scan_data['autofocus_dz'] + autofocus_dz=self._scan_data["autofocus_dz"], ) current_pos_xyz = (