Skip to content

Commit 7538aeb

Browse files
committed
Make code generic enough to accept the per_step parameter
1 parent 95a1db6 commit 7538aeb

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

src/sophys/common/plans/scan_with_delay.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def scan_with_delay(
4242
per_step : callable, optional
4343
hook for customizing action of inner loop (messages per step).
4444
See docstring of :func:`bluesky.plan_stubs.one_nd_step` (the default)
45-
for details.
45+
with and sleep plan after it.
4646
md : dict, optional
4747
metadata
4848
@@ -60,8 +60,12 @@ def one_nd_step_with_delay(detectors, step, pos_cache):
6060
yield from sleep(delay)
6161
yield from trigger_and_read(list(detectors) + list(motors))
6262

63+
def per_step_with_delay(detectors, step, pos_cache):
64+
yield from per_step(detectors, step, pos_cache)
65+
yield from sleep(delay)
66+
6367
per_step_scan = one_nd_step_with_delay
6468
if per_step is not None:
65-
per_step_scan = per_step
69+
per_step_scan = per_step_with_delay
6670

6771
yield from scan(detectors, *args, num=num, per_step=per_step_scan, md=md)

0 commit comments

Comments
 (0)