Stop scan planner plots erroring if there are no secondary locations
This commit is contained in:
parent
90be139575
commit
dfe7fb6c42
2 changed files with 5 additions and 2 deletions
|
|
@ -67,7 +67,10 @@ def visualise_scan(sample: FakeSample, planner: scan_planners.ScanPlanner) -> Fi
|
|||
ax.add_artist(sample.patch)
|
||||
xh, yh = zip(*planner.path_history, strict=True)
|
||||
xi, yi, _zi = zip(*planner.imaged_locations, strict=True)
|
||||
xs, ys, _zs = zip(*planner.secondary_locations, strict=True)
|
||||
if planner.secondary_locations:
|
||||
xs, ys, _zs = zip(*planner.secondary_locations, strict=True)
|
||||
else:
|
||||
xs, ys, _zs = [], [], []
|
||||
|
||||
# convert history to numpy array so can calculate quiver arrows
|
||||
xh = np.array(xh)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue