bluesky_tiled_plugins.clients.bluesky_event_stream#

Module Contents#

Classes#

BlueskyEventStream

A Mapping is a generic container for associating key/value pairs.

BlueskyEventStreamV2Mongo

This encapsulates the data and metadata for one ‘stream’ in a Bluesky ‘run’.

BlueskyEventStreamV2SQL

A Mapping is a generic container for associating key/value pairs.

ConfigDatasetClient

An immutable view of a dict.

CompositeSubsetClient

A composite client with only a subset of its keys exposed.

VirtualContainer

An immutable view of a dict.

VirtualArrayClient

BlueskyEventStreamV3

A Mapping is a generic container for associating key/value pairs.

Data#

API#

bluesky_tiled_plugins.clients.bluesky_event_stream.DATAVALUES#

‘Sentinel(…)’

bluesky_tiled_plugins.clients.bluesky_event_stream.TIMESTAMPS#

‘Sentinel(…)’

class bluesky_tiled_plugins.clients.bluesky_event_stream.BlueskyEventStream(context, *, item, structure_clients, queries=None, sorting=None, structure=None, include_data_sources=False)#

Bases: tiled.client.container.Container

A Mapping is a generic container for associating key/value pairs.

This class provides concrete generic implementations of all methods except for getitem, iter, and len.

_repr_mimebundle__#

None

class bluesky_tiled_plugins.clients.bluesky_event_stream.BlueskyEventStreamV2Mongo(context, *, item, structure_clients, queries=None, sorting=None, structure=None, include_data_sources=False)#

Bases: bluesky_tiled_plugins.clients.bluesky_event_stream.BlueskyEventStream

This encapsulates the data and metadata for one ‘stream’ in a Bluesky ‘run’.

This adds for bluesky-specific conveniences to the standard client Container.

property descriptors#
read(*args, **kwargs)#

Shortcut for reading the ‘data’ (as opposed to timestamps or config).

That is:

stream.read(…)

is equivalent to

stream[“data”].read(…)

to_dask()#
class bluesky_tiled_plugins.clients.bluesky_event_stream.BlueskyEventStreamV2SQL(internal_dict, metadata=None)#

Bases: tiled.utils.OneShotCachedMap

A Mapping is a generic container for associating key/value pairs.

This class provides concrete generic implementations of all methods except for getitem, iter, and len.

classmethod from_stream_client(stream_client, metadata=None)#
descriptors()#
read(*args, **kwargs)#

Read the data from the stream.

This is a shortcut for reading the ‘data’ (as opposed to timestamps or config).

class bluesky_tiled_plugins.clients.bluesky_event_stream.ConfigDatasetClient(d: collections.abc.Mapping[tiled.utils.K, tiled.utils.V])#

Bases: tiled.utils.DictView

An immutable view of a dict.

read()#
class bluesky_tiled_plugins.clients.bluesky_event_stream.CompositeSubsetClient(client, keys=None)#

Bases: tiled.client.composite.CompositeClient

A composite client with only a subset of its keys exposed.

read(variables=None, dim0=None)#

Download the contents of a composite node as an xarray.Dataset.

Parameters

variables (list, optional) : List of variable names to read. If None, all variables are read. Defaults to None. dim0 (str, optional) : Name of the dimension to use for the first dimension; if None (default), each array will have its own dimension name. The dims tuple, if specified in the structure, takes precedence over this.

Returns

xarray.Dataset: The dataset containing the requested variables.

class bluesky_tiled_plugins.clients.bluesky_event_stream.VirtualContainer(d: collections.abc.Mapping[tiled.utils.K, tiled.utils.V])#

Bases: tiled.utils.DictView

An immutable view of a dict.

class bluesky_tiled_plugins.clients.bluesky_event_stream.VirtualArrayClient(data, dims=None)#
read(slice=None)#
property size#
property shape#
property dtype#
property dims#
class bluesky_tiled_plugins.clients.bluesky_event_stream.BlueskyEventStreamV3(context, *, item, structure_clients, queries=None, sorting=None, structure=None, include_data_sources=False)#

Bases: bluesky_tiled_plugins.clients.bluesky_event_stream.BlueskyEventStream, tiled.client.composite.CompositeClient

A Mapping is a generic container for associating key/value pairs.

This class provides concrete generic implementations of all methods except for getitem, iter, and len.

read(variables=(DATAVALUES,), dim0=None)#

Download the contents of a composite node as an xarray.Dataset.

Parameters

variables (list, optional) : List of variable names to read. If None, all variables are read. Defaults to None. dim0 (str, optional) : Name of the dimension to use for the first dimension; if None (default), each array will have its own dimension name. The dims tuple, if specified in the structure, takes precedence over this.

Returns

xarray.Dataset: The dataset containing the requested variables.

descriptors()#