Skip to content

Commit

Permalink
added code review changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ZohebShaikh committed Oct 24, 2024
1 parent be29b8e commit 94bafeb
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/ophyd_async/plan_stubs/_fly.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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)


Expand Down

0 comments on commit 94bafeb

Please sign in to comment.