Remove unneeded logging

This commit is contained in:
jaknapper 2025-06-17 14:25:27 +01:00
parent f363ec0eff
commit e8c4103bb0
2 changed files with 6 additions and 7 deletions

View file

@ -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)

View file

@ -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 = (