From f1d974c922a9b218387f41016f41f568fad4cd4b Mon Sep 17 00:00:00 2001 From: Julian Stirling Date: Fri, 13 Feb 2026 10:49:10 +0000 Subject: [PATCH] Improve some jogging docstrings --- .../things/stage/__init__.py | 6 +++++- .../things/stage/dummy.py | 10 ++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/openflexure_microscope_server/things/stage/__init__.py b/src/openflexure_microscope_server/things/stage/__init__.py index a16ae89c..e42e64e2 100644 --- a/src/openflexure_microscope_server/things/stage/__init__.py +++ b/src/openflexure_microscope_server/things/stage/__init__.py @@ -33,7 +33,11 @@ class RedefinedBaseMovementError(RuntimeError): class JogCommand: - """A base class for jog operations.""" + """A base class for jog operations. + + This class handles threading events used to interrupt previous jog commands. There + are two subclasses that are used by jogging `JogMoveCommand` and `JogStopCommand`. + """ def __init__(self) -> None: """Initialise a JogCommand.""" diff --git a/src/openflexure_microscope_server/things/stage/dummy.py b/src/openflexure_microscope_server/things/stage/dummy.py index 7e0f2bad..51af444e 100644 --- a/src/openflexure_microscope_server/things/stage/dummy.py +++ b/src/openflexure_microscope_server/things/stage/dummy.py @@ -72,6 +72,16 @@ class DummyStage(BaseStage): } def _apply_move(self, displacement: Sequence[int]) -> None: + """Make a move, this function is designed to be run in a thread by jogging. + + This can't be used for normal movements as the delays setting up the extra + threads causes autofucs to fail. As such `_hardware_move_relative` is similarly + structured. + + Interrupt this function with the ``self._abort_move`` event. + + :param displacement: The (x, y, z) position. + """ try: fraction_complete = 0.0 dt = self.step_time