From 302e510678f1e20c5a1410c1534861381ea3cdb5 Mon Sep 17 00:00:00 2001 From: Joe Knapper Date: Mon, 16 Feb 2026 15:14:57 +0000 Subject: [PATCH 1/5] Add recentre and ROM test buttons to stage settings Only shown if not using a DummyStage, as neither work meaningfully in sim --- .../settingsComponents/stageSettings.vue | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/webapp/src/components/tabContentComponents/settingsComponents/stageSettings.vue b/webapp/src/components/tabContentComponents/settingsComponents/stageSettings.vue index 0c5e859b..7f314d4b 100644 --- a/webapp/src/components/tabContentComponents/settingsComponents/stageSettings.vue +++ b/webapp/src/components/tabContentComponents/settingsComponents/stageSettings.vue @@ -23,6 +23,36 @@ +
+

Stage Measurement Tools

+ +
+ +
+
+ +
+
From 15f634a3cb2de90930731e77c465b19bff44f3ac Mon Sep 17 00:00:00 2001 From: jaknapper Date: Mon, 16 Feb 2026 16:27:43 +0000 Subject: [PATCH 2/5] Add longer confirmation messages --- .../tabContentComponents/settingsComponents/stageSettings.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/webapp/src/components/tabContentComponents/settingsComponents/stageSettings.vue b/webapp/src/components/tabContentComponents/settingsComponents/stageSettings.vue index 7f314d4b..96e930b5 100644 --- a/webapp/src/components/tabContentComponents/settingsComponents/stageSettings.vue +++ b/webapp/src/components/tabContentComponents/settingsComponents/stageSettings.vue @@ -35,7 +35,7 @@ :button-primary="true" :can-terminate="true" :requires-confirmation="true" - :confirmation-message="'Start recalibration of the stage to find the centre of the range of motion? Microscope will be locked while this runs'" + :confirmation-message="'Start recalibration of the stage to find the centre of the range of motion?

Calibration requires a large, dense, flat sample with a variety of features.
Microscope will be locked while this runs'" :modal-progress="true" /> @@ -48,7 +48,7 @@ :button-primary="true" :can-terminate="true" :requires-confirmation="true" - :confirmation-message="'Start recalibration of the stage to find the range of motion in steps? Microscope will be locked while this runs'" + :confirmation-message="'Start recalibration of the stage to find the range of motion in steps?

Calibration requires a large, dense, flat sample with a variety of features.
Microscope will be locked while this runs'" :modal-progress="true" /> From a01813f0535cd397fa09c153e5b4c5b7c822a39d Mon Sep 17 00:00:00 2001 From: Joe Knapper Date: Mon, 16 Feb 2026 18:35:34 +0000 Subject: [PATCH 3/5] Cleaner logging in stage-measure --- .../things/stage_measure.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/openflexure_microscope_server/things/stage_measure.py b/src/openflexure_microscope_server/things/stage_measure.py index 5bb40ebf..ffd5c1cc 100644 --- a/src/openflexure_microscope_server/things/stage_measure.py +++ b/src/openflexure_microscope_server/things/stage_measure.py @@ -260,7 +260,7 @@ class RangeofMotionThing(lt.Thing): # Stage may have crashed during a large move. Move stage back until motion # is detected - self.logger.info("Moving stage back until motion is detect") + self.logger.info("Moving stage back until motion is detected") self._move_back_until_motion_detected(axis=axis, direction=direction) # Replace final position. @@ -331,8 +331,8 @@ class RangeofMotionThing(lt.Thing): # Note the second return, the direction, is meaningless here. return True, 1 self.logger.info( - f"Estimated centre {abs(img_perc):.0f}% of a field of view away, " - "that is too far to move in one move." + f"Estimated centre {abs(img_perc):.0f}% of a field of view away. " + "Moving towards centre." ) # Else calculate the desired direction in image coordinates. direction = self._img_dir_from_stage_coords(estimate, axis) @@ -497,7 +497,7 @@ class RangeofMotionThing(lt.Thing): abs_min_offset=abs_min_offset, ) parasitic_motion = _parasitic_motion_detected(movement, offset) - self.logger.info(f"Offset measured as {offset[axis]}") + self.logger.info(f"Offset measured as {int(offset[axis])}") self._rom_data.record_movement(self._stage.position, offset) if abs(offset[axis]) < abs_min_offset or parasitic_motion: @@ -532,7 +532,7 @@ class RangeofMotionThing(lt.Thing): for i in range(max_moves): # Increment movement - self.logger.info(f"Testing with step size {movement[axis]}") + self.logger.info(f"Testing with step size {int(movement[axis])}") # Run an autofocus every 3 steps run_autofocus = i % 3 == 2 @@ -540,7 +540,7 @@ class RangeofMotionThing(lt.Thing): movement=movement, perform_autofocus=run_autofocus ) - self.logger.info(f"Offset measured as {abs(offset[axis])}") + self.logger.info(f"Offset measured as {int(abs(offset[axis]))}") if abs(offset[axis]) > motion_minimum: self.logger.info("Motion detected.") return From 9580d987068d87847a032dc38a567e010b41d661 Mon Sep 17 00:00:00 2001 From: Joe Knapper Date: Tue, 17 Feb 2026 10:41:10 +0000 Subject: [PATCH 4/5] Check for stage_measure instead of stage type --- .../settingsComponents/stageSettings.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/webapp/src/components/tabContentComponents/settingsComponents/stageSettings.vue b/webapp/src/components/tabContentComponents/settingsComponents/stageSettings.vue index 96e930b5..6c10ea85 100644 --- a/webapp/src/components/tabContentComponents/settingsComponents/stageSettings.vue +++ b/webapp/src/components/tabContentComponents/settingsComponents/stageSettings.vue @@ -23,7 +23,7 @@ -
+

Stage Measurement Tools

@@ -78,6 +78,9 @@ export default { stageType: function () { return this.thingDescription("stage").title; }, + stageMeasureAvailable() { + return this.thingAvailable("stage_measure"); + }, }, mounted() { From 71042361e39313f24121de85c0525ed3603666b9 Mon Sep 17 00:00:00 2001 From: Joe Knapper Date: Wed, 18 Feb 2026 15:22:13 +0000 Subject: [PATCH 5/5] Stage measure buttons show a stream while running --- .../tabContentComponents/settingsComponents/stageSettings.vue | 2 ++ 1 file changed, 2 insertions(+) diff --git a/webapp/src/components/tabContentComponents/settingsComponents/stageSettings.vue b/webapp/src/components/tabContentComponents/settingsComponents/stageSettings.vue index 6c10ea85..0d277cc2 100644 --- a/webapp/src/components/tabContentComponents/settingsComponents/stageSettings.vue +++ b/webapp/src/components/tabContentComponents/settingsComponents/stageSettings.vue @@ -37,6 +37,7 @@ :requires-confirmation="true" :confirmation-message="'Start recalibration of the stage to find the centre of the range of motion?

Calibration requires a large, dense, flat sample with a variety of features.
Microscope will be locked while this runs'" :modal-progress="true" + :stream-with-modal="true" />
@@ -50,6 +51,7 @@ :requires-confirmation="true" :confirmation-message="'Start recalibration of the stage to find the range of motion in steps?

Calibration requires a large, dense, flat sample with a variety of features.
Microscope will be locked while this runs'" :modal-progress="true" + :stream-with-modal="true" />