From ff606ff10d2ce2b9cbdfc3c4c9ee3dcbc64cfaf9 Mon Sep 17 00:00:00 2001 From: Julian Stirling Date: Mon, 20 Oct 2025 17:13:22 +0000 Subject: [PATCH] Apply spelling corrections and variable renaming from code review of branch improve-scan-planning Co-authored-by: Joe Knapper --- src/openflexure_microscope_server/scan_planners.py | 8 ++++---- tests/utilities/scan_test_helpers.py | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/openflexure_microscope_server/scan_planners.py b/src/openflexure_microscope_server/scan_planners.py index f7c64367..2248a55c 100644 --- a/src/openflexure_microscope_server/scan_planners.py +++ b/src/openflexure_microscope_server/scan_planners.py @@ -435,9 +435,9 @@ class SmartSpiral(ScanPlanner): # Get the VisitedScanLocation object if already visited visited = self.get_visited_location(new_pos) if visited.imaged: - # If this adjacent position was imaged succsfully already then skip. + # If this adjacent position was imaged successfully already then skip. continue - # If it wasn't imaged add an intimediate location between the + # If it wasn't imaged add an intermediate location between the # last imaged position and this one. i_pos = self._intermediate_position(xy_pos, new_pos) # Set primary=False surrounding images are not added once imaged. @@ -459,7 +459,7 @@ class SmartSpiral(ScanPlanner): This is called after an image is recorded that was background. Intermediate locations are added between any adjacent locations that were successfully - imaged. + imaged due to being labelled as containing sample. Note that in the case that an imaged location has an adjacent background image then adding the intermediate image will be handled by @@ -474,7 +474,7 @@ class SmartSpiral(ScanPlanner): if not visited.imaged: # If it wasn't imaged then skip this position continue - # If surrpounding location was imaged add an intimediate location + # If surrounding location was imaged add an intermediate location # between the most recent position and this imaged position. i_pos = self._intermediate_position(xy_pos, surr_pos) # Set primary=False surrounding images are not added once imaged. diff --git a/tests/utilities/scan_test_helpers.py b/tests/utilities/scan_test_helpers.py index 675e36dd..4d32a2fb 100644 --- a/tests/utilities/scan_test_helpers.py +++ b/tests/utilities/scan_test_helpers.py @@ -101,7 +101,7 @@ def interp_closed_path(xy_points: list[tuple[int, int]], n_points: int) -> MatPa # fit splines to x=f(u) and y=g(u), treating both as periodic. also note that s=0 # is needed in order to force the spline fit to pass through all the input points. - spline_data, *_extra = interpolate.splprep([x, y], s=0, per=True) + spline_data, *_unused = interpolate.splprep([x, y], s=0, per=True) # evaluate the spline xi, yi = interpolate.splev(np.linspace(0, 1, n_points), spline_data)