From 7a7547542ca5e4172705be67b5e74d529e2d67c1 Mon Sep 17 00:00:00 2001 From: Joe Knapper Date: Mon, 23 Jun 2025 10:36:26 +0000 Subject: [PATCH] Apply suggestions from code review of branch fast-stack Co-authored-by: Julian Stirling --- src/openflexure_microscope_server/things/autofocus.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/openflexure_microscope_server/things/autofocus.py b/src/openflexure_microscope_server/things/autofocus.py index a408f595..0680cebb 100644 --- a/src/openflexure_microscope_server/things/autofocus.py +++ b/src/openflexure_microscope_server/things/autofocus.py @@ -549,7 +549,7 @@ class AutofocusThing(Thing): sharpest_index = np.argmax(sharpnesses) sharpness_length = len(sharpnesses) - # If only testing one image, assume focus succeeded + # If only testing one image, then by definition the sharpest is central if sharpness_length == 1: return "success" # If testing three images, test if the centre is the sharpest