bluesky_adaptive.per_start.adaptive_plan#

bluesky_adaptive.per_start.adaptive_plan(dets, first_point, *, to_recommender, from_recommender, md=None, take_reading=None)[source]#

Execute an adaptive scan using an inter-run recommendation engine.

Parameters:
detsList[OphydObj]

The detector to read at each point. The dependent keys that the recommendation engine is looking for must be provided by these devices.

first_pointDict[Settable, Any]

The first point of the scan. The motors that will be scanned are extracted from the keys. The independent keys that the recommendation engine is looking for / returning must be provided by these devices.

to_recommenderCallable[document_name: str, document: dict]

This is the callback that will be registered to the RunEngine.

The expected contract is for each event it will place either a dict mapping independent variable to recommended value or None.

This plan will either move to the new position and take data if the value is a dict or end the run if None

from_recommenderQueue

The consumer side of the Queue that the recommendation engine is putting the recommendations onto.

mddict[str, Any], optional

Any extra meta-data to put in the Start document

take_readingplan, optional

function to do the actual acquisition

def take_reading(dets, md={}):
     yield from ...

Callable[List[OphydObj], Optional[Dict[str, Any]]] -> Generator[Msg], optional

This plan must generate exactly 1 Run

Defaults to bluesky.plans.count