bluesky.plans.count#

bluesky.plans.count(detectors: Sequence[Readable], num: int | None = 1, delay: float | Iterable[float] = 0.0, *, per_shot: Callable[[Sequence[Readable], Callable[[Sequence[Readable]], Generator[Msg, Any, Mapping[str, Reading]]] | None], Generator[Msg, Any, P]] | None = None, md: MutableMapping[str, Any] | None = None, delay_after_completion: bool = False) → Generator[Msg, Any, str][source]#

Take one or more readings from detectors.

Parameters:
detectorslist or tuple

list of ‘readable’ objects

numinteger, optional

number of readings to take; default is 1

If None, capture data until canceled

delayiterable or scalar, optional

Time delay in seconds between successive readings; default is 0.

per_shotcallable, optional

hook for customizing action of inner loop (messages per step) Expected signature

def f(detectors: Iterable[OphydObj]) -> Generator[Msg]:
    ...
mddict, optional

metadata

delay_after_completionbool, optional

If False (default), delay is the time from the start of one reading to the start of the next, so the time each reading takes is subtracted from it. If True, the full delay is slept after each reading.

Notes

If delay is an iterable, it must have at least num - 1 entries or the plan will raise a ValueError during iteration.