BCDA-APS / bluesky_training

Bluesky training, including instrument package
https://bcda-aps.github.io/bluesky_training/
Other
11 stars 0 forks source link

How are data streams named? #26

Closed prjemian closed 2 years ago

prjemian commented 3 years ago

was: What is primary? (data streams)

prjemian commented 2 years ago

primary is the default data stream, where the measurement data from the plan will be saved. This is the data that the plan intends to measure, thus the name primary. It is not required to use the name primary but it is expected to find the plan's principle measurements in the primary stream.

The name of a stream is set when a plan calls bluesky.plan_stubs.create():

def create(name='primary'):
    """
    Bundle future readings into a new Event document.
    Parameters
    ----------
    name : string, optional
        name given to event stream, used to convenient identification
        default is 'primary'
    Yields
    ------
    msg : Msg
        Msg('create', name=name)
    See Also
    --------
    :func:`bluesky.plan_stubs.save`
    """
    return (yield Msg('create', name=name))