From 11c8f47e20d0b14a25ff52643f584969c16f064a Mon Sep 17 00:00:00 2001 From: jaknapper Date: Mon, 23 Jun 2025 18:13:46 +0100 Subject: [PATCH] Rename central image to sharpest --- src/openflexure_microscope_server/things/autofocus.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/openflexure_microscope_server/things/autofocus.py b/src/openflexure_microscope_server/things/autofocus.py index 64013551..7e0d652c 100644 --- a/src/openflexure_microscope_server/things/autofocus.py +++ b/src/openflexure_microscope_server/things/autofocus.py @@ -353,8 +353,8 @@ class AutofocusThing(Thing): image to images dir.""" image_list = glob.glob(os.path.join(stack_dir, "*")) image_list = sorted(image_list, key=os.path.getsize) - central_image = image_list[-1] + sharpest_image = image_list[-1] xy_location = os.path.basename(stack_dir) - logger.info(central_image) - shutil.copy(central_image, os.path.join(images_dir, f"{xy_location}.jpeg")) + logger.info(sharpest_image) + shutil.copy(sharpest_image, os.path.join(images_dir, f"{xy_location}.jpeg"))