From 03a8e2ab794c3c7d47b79896cf84345aec69c309 Mon Sep 17 00:00:00 2001 From: Joe Knapper Date: Fri, 13 Feb 2026 16:40:56 +0000 Subject: [PATCH 1/2] Increase dz range to 500 to 3000 --- src/openflexure_microscope_server/things/scan_workflows.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/openflexure_microscope_server/things/scan_workflows.py b/src/openflexure_microscope_server/things/scan_workflows.py index e62608af..11b95eae 100644 --- a/src/openflexure_microscope_server/things/scan_workflows.py +++ b/src/openflexure_microscope_server/things/scan_workflows.py @@ -179,10 +179,10 @@ class RectGridWorkflow(ScanWorkflow[SettingModelType], Generic[SettingModelType] This must be between 0.1 and 0.7. """ - autofocus_dz: int = lt.setting(default=1000, ge=200, le=2000) + autofocus_dz: int = lt.setting(default=1000, ge=400, le=3000) """The z distance to perform an autofocus in steps. - Must be greater than or equal to 200, and less than or equal to 2000. + Must be greater than or equal to 400, and less than or equal to 3000. """ # The noqa statement is because scan_name is unused but is needed for equivalence From a027111022bb2db2575873f5c18f10f6c1399d74 Mon Sep 17 00:00:00 2001 From: Joe Knapper Date: Mon, 16 Feb 2026 13:38:53 +0000 Subject: [PATCH 2/2] Apply suggestions from code review of branch Extend-autofocus-in-scan Co-authored-by: Julian Stirling --- src/openflexure_microscope_server/things/scan_workflows.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/openflexure_microscope_server/things/scan_workflows.py b/src/openflexure_microscope_server/things/scan_workflows.py index 11b95eae..e8ec3e00 100644 --- a/src/openflexure_microscope_server/things/scan_workflows.py +++ b/src/openflexure_microscope_server/things/scan_workflows.py @@ -183,6 +183,9 @@ class RectGridWorkflow(ScanWorkflow[SettingModelType], Generic[SettingModelType] """The z distance to perform an autofocus in steps. Must be greater than or equal to 400, and less than or equal to 3000. + + Note that 200 steps is the backlash correction size, so the value + must be above this. 3000 is a sensible limit for 20x objectives. """ # The noqa statement is because scan_name is unused but is needed for equivalence