Docstring and typehints suggestions from @julianstirling
This commit is contained in:
parent
f230eef2dc
commit
7413aa57f8
2 changed files with 7 additions and 6 deletions
|
|
@ -297,12 +297,11 @@ class ScanPlanner:
|
|||
"""Flatten a 2D grid of coordinates into flat list of FutureScanLocation objects.
|
||||
|
||||
:param grid: A 2D nested list of XY coordinates
|
||||
"""
|
||||
path = []
|
||||
for line in grid:
|
||||
path += line
|
||||
|
||||
return [FutureScanLocation(location) for location in path]
|
||||
:return: A flattened list of FutureScanLocations
|
||||
"""
|
||||
# Loop over each location in each line to flatten grid into single list.
|
||||
return [FutureScanLocation(location) for line in grid for location in line]
|
||||
|
||||
|
||||
class SmartSpiral(ScanPlanner):
|
||||
|
|
@ -672,7 +671,7 @@ def create_rectangular_scan_path(
|
|||
dx: int,
|
||||
dy: int,
|
||||
style: Literal["snake", "raster"],
|
||||
) -> list:
|
||||
) -> list[list[XYPos]]:
|
||||
"""Generate a 2D grid of (x, y) coordinates representing a rectangular scan path.
|
||||
|
||||
The grid is generated from starting_pos, and expanded in the
|
||||
|
|
|
|||
|
|
@ -143,6 +143,8 @@ class ScanWorkflow(Generic[SettingModelType], lt.Thing):
|
|||
that each image should overlap its nearest neighbour by 50%.
|
||||
|
||||
:returns: (dx, dy) - the x and y displacements in steps
|
||||
|
||||
:raises RuntimeError: If there is no camera stage mapper Thing available or if CMS isn't calibrated.
|
||||
"""
|
||||
csm = self._require_csm()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue