bluesky.plans.monitor_context¶
-
bluesky.plans.
monitor_context
(plan_stack, signals)¶ Asynchronously monitor signals, generating separate event streams.
Upon exiting the context, stop monitoring.
Parameters: - plan_stack (list-like) – appendable collection of generators that yield messages (Msg objects)
- signals (dict or list) – either a dict mapping Signals to event stream names or simply a list of Signals, in which case the event stream names default to None
- name (string, optional) – name for event stream; by default, None
Examples
>>> plan_stack = deque()
With custom event stream names
>>> with monitor_context(plan_stack, {sig1: 'sig1', sig2: 'sig2'}): ...
With no event stream names
>>> with monitor_context(plan_stack, [sig1, sig2]): ...