Add docstrings to public methods

This commit is contained in:
Julian Stirling 2025-07-10 14:04:25 +01:00
parent a30b726b91
commit 1bbbfeef0f
7 changed files with 30 additions and 1 deletions

View file

@ -235,6 +235,16 @@ class JPEGSharpnessMonitor:
self.running = False
def focus_rel(self, dz: int, **kwargs) -> tuple[int, int]:
"""Move the stage by dz, monitoring the position over time.
This performs exactly one move. Multiple calls of this method
will append to the internal postition storage for more complex
autofocus procedures.
This should be run from within the JPEGSharpnessMonitor.run
context manager so that sharpness data and timestamps are also
collected.
"""
# Store the start time and position
self.stage_times.append(time.time())
self.stage_positions.append(self.stage.position)