Functionality for planning scan routes.
A scan route can be planned by a ScanPlanner. There is a base class ScanPlanner, and then a child class that is still generic called RectGridPlanner that helps planning anything where the movements are on a regtangular grid. RectGridPlanner has two usable child classes:
- SmartSpiral - For spiralling around a samples but adjusting when background is
- detected
- RegularGridPlanner - For Raster and Snake scanning.
| Class | |
An enum for selecting distance metrics for grids. |
| Class | |
Data for information on future locations to scan. |
| Class | |
Base class for planners that operate on a rectangular grid. |
| Class | |
A scan planner that performs a snake or a raster scan. |
| Class | |
A base class for a scan planner. |
| Class | |
A scan planner that spirals outward from the centre, prioritising short moves. |
| Class | |
Data for information on locations already visited during a scan. |
| Function | create |
Generate a 2D grid of (x, y) coordinates representing a rectangular scan path. |
| Function | distance |
Calculate the distance between the two xy positions. |
| Function | enforce |
Check input is a tuple and is of length 2. |
| Function | enforce |
Check input is a tuple and is of length 3. |
| Constant | LOGGER |
Undocumented |
| Type Alias | |
Undocumented |
| Type Alias | |
Undocumented |
| Type Alias | |
Undocumented |
| Type Alias | |
Undocumented |
XYPos, x_count: int, y_count: int, dx: int, dy: int, style: Literal[ 'snake', 'raster']) -> list[ list[ XYPos]]:
(source)
¶
Generate a 2D grid of (x, y) coordinates representing a rectangular scan path.
The grid is generated from starting_pos, and expanded in the positive x and y directions using the provided step sizes. The scan order can be either raster (left-to-right for every row) or snake (alternating left-to-right and right-to-left per row).
| Parameters | |
startingXYPos | Starting (x, y) position for the scan grid. |
xint | Number of points in the x-direction (columns). |
yint | Number of points in the y-direction (rows). |
dx:int | Step size between points in the x-direction. |
dy:int | Step size between points in the y-direction. |
style:Literal[ | Scan pattern style. Either raster or snake. |
| Returns | |
list[ | Nested list of (x, y) coordinates arranged by row. |
XYPos | np.ndarray | FutureScanLocation, next_pos: XYPos | np.ndarray | FutureScanLocation) -> float:
(source)
¶
Calculate the distance between the two xy positions.
This was previously called distance_to_site
Check input is a tuple and is of length 2.
If possible it will coerce the value to a tuple.
| Raises | |
ValueError | if the input cannot be coerced to a tuple of length 2. |