Spelling corrections and docstring improvements
Co-authored by Joe Knapper <jaknapper@hotmail.com>
This commit is contained in:
parent
bd411db5ea
commit
06632f195e
5 changed files with 33 additions and 29 deletions
|
|
@ -39,7 +39,7 @@ def test_v_basic_smart_spiral():
|
|||
planner = scan_planners.SmartSpiral(
|
||||
intial_position=intial_position, planner_settings=planner_settings
|
||||
)
|
||||
# Create a planner it shouldn't start complete
|
||||
# Create a planner. It shouldn't be complete.
|
||||
assert not planner.scan_complete
|
||||
# When we start it should want to stay in the inital pos and have
|
||||
# no z_estimate
|
||||
|
|
@ -47,7 +47,7 @@ def test_v_basic_smart_spiral():
|
|||
assert xy_pos == intial_position
|
||||
assert z_pos is None
|
||||
|
||||
# Try to make imaged with only xy_position
|
||||
# Try to mark location as imaged with only xy_position
|
||||
with pytest.raises(ValueError):
|
||||
planner.mark_location_visited(xy_pos, imaged=False, focused=False)
|
||||
# scan still not complete
|
||||
|
|
@ -100,7 +100,7 @@ def test_smart_spiral_first_few_pos():
|
|||
This test is VERY long, not really a "unit". It checks step-by-step
|
||||
that data is added correctly for the first few postions in a scan.
|
||||
|
||||
This should catch basic caseses of if the algorithm is updated.
|
||||
This should catch basic cases of if the algorithm is updated.
|
||||
"""
|
||||
intial_position = (100, 50)
|
||||
planner_settings = {"dx": 50, "dy": 50, "max_dist": 10000}
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ class FakeSample:
|
|||
Return whether an image at a given location with a given image size
|
||||
is on the sample
|
||||
|
||||
This doesn't check the entire image feild as this is designed to be used
|
||||
This doesn't check the entire image field as this is designed to be used
|
||||
where the fake sample is much larger than the image and has smooth edges
|
||||
It just checks the 4 corners
|
||||
"""
|
||||
|
|
@ -48,7 +48,7 @@ class FakeSample:
|
|||
@property
|
||||
def patch(self) -> PathPatch:
|
||||
"""
|
||||
The sample as a matplotlib patch fro plotting
|
||||
The sample as a matplotlib patch for plotting
|
||||
"""
|
||||
patch = PathPatch(self._sample_perimeter)
|
||||
patch.set(color=(1.0, 0.8, 1.0, 1.0))
|
||||
|
|
@ -86,7 +86,7 @@ def visualise_scan(sample: FakeSample, planner: scan_planners.ScanPlanner) -> Fi
|
|||
def interp_closed_path(xy_points: list[tuple[int, int]], n_points: int) -> MatPath:
|
||||
"""
|
||||
Given a lists of xy_points interpolate an n_point closed curve. This can be used
|
||||
to creat an arbitrary sample shape plan a scan.
|
||||
to create an arbitrary sample shape plan a scan.
|
||||
|
||||
Modified from:
|
||||
https://stackoverflow.com/questions/33962717/interpolating-a-closed-curve-using-scipy
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue