From 94bafebdd3495198cd4b9781f4815a6e328d7ab9 Mon Sep 17 00:00:00 2001 From: Zoheb Shaikh Date: Thu, 24 Oct 2024 11:25:09 +0100 Subject: [PATCH] added code review changes --- src/ophyd_async/plan_stubs/_fly.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/ophyd_async/plan_stubs/_fly.py b/src/ophyd_async/plan_stubs/_fly.py index e0d6dedde1..f9934618e6 100644 --- a/src/ophyd_async/plan_stubs/_fly.py +++ b/src/ophyd_async/plan_stubs/_fly.py @@ -102,14 +102,11 @@ def prepare_static_seq_table_flyer_and_detectors_with_same_trigger( yield from bps.wait(group="prep") -# Collect every 0.5 seconds even if the flyscan is still completing -_SECONDS_TO_FORCE_COLLECT_AFTER = 0.5 - - def fly_and_collect( stream_name: str, flyer: StandardFlyer[SeqTableInfo] | StandardFlyer[PcompInfo], detectors: List[StandardDetector], + flush_period: float = 0.5, ): """Kickoff, complete and collect with a flyer and multiple detectors. @@ -130,9 +127,7 @@ def fly_and_collect( done = False while not done: - done = yield from bps.wait( - group=group, timeout=_SECONDS_TO_FORCE_COLLECT_AFTER, move_on=True - ) + done = yield from bps.wait(group=group, timeout=flush_period, move_on=True) yield from bps.collect(*detectors, name=stream_name)