bluesky.preprocessors.lazily_stage_wrapper#
- bluesky.preprocessors.lazily_stage_wrapper(plan)[source]#
This is a preprocessor that inserts ‘stage’ messages and appends ‘unstage’.
The first time an object is seen in plan, it is staged. To avoid redundant staging we actually stage the object’s ultimate parent.
At the end, in a finally block, an ‘unstage’ Message issued for every ‘stage’ Message.
- Parameters:
- planiterable or iterator
a generator, list, or similar containing Msg objects
- Yields:
- msgMsg
messages from plan with ‘stage’ messages inserted and ‘unstage’ messages appended