TAPI: Tiled Application Programmer Interface#

TAPI: Local support for the tiled API & data structures.

gemviz.tapi.QueryTimeSince(isotime)[source]#

Tiled client query: all runs since given date/time.

gemviz.tapi.QueryTimeUntil(isotime)[source]#

Tiled client query: all runs until given date/time.

class gemviz.tapi.RunMetadata(cat, uid)[source]#

Cache the metadata for a single run.

get_run_md(doc, key, default=None)[source]#

Get metadata by key from run document.

plottable_signals()[source]#

Return a dict with the plottable data for this run.

  • field: any available numeric data keys

  • motors: any data keys for motors declared by the run

  • detectors: any numeric data keys that are not motors or excluded names

  • plot_signal: the first detector signal

  • plot_axes: the first motor signal for each dimension

  • run.metadata[hints][dimensions] show the independent axes object names

  • Any given dimension may have more than one motor object (a2scan, …)

  • This code chooses to only use the first motor of each dimension.

  • The stream descriptor list is usually length = 1.

  • object_keys are used to get lists of data_keys (fields)

request_from_tiled_server()[source]#

Get run details from server.

stream_data(stream_name)[source]#

Return the data structure for this stream.

stream_data_field_pv(stream_name, field_name)[source]#

EPICS PV name of this field.

stream_data_field_shape(stream_name, field_name)[source]#

Shape of this data field.

stream_data_field_units(stream_name, field_name)[source]#

Engineering units of this field.

stream_data_fields(stream_name)[source]#

Data field (names) of this BlueskyEventStream.

Sort the list by relevance.

First “time” (epoch timestamp for each event document), then “config” (the caller provided these names as parameters for this stream), then “data” (other signals in this stream, usually added from a Device hint).

stream_metadata(stream_name=None)[source]#

Return the metadata dictionary for this stream.

summary()[source]#

Summary (text) of this run.

exception gemviz.tapi.TiledServerError[source]#

An error from the tiled server.

gemviz.tapi.connect_tiled_server(uri)[source]#

Make connection with the tiled server URI. Return a client object.

gemviz.tapi.get_run(uri=None, catalog='training', reference=None)[source]#

Get referenced run from tiled server catalog.

gemviz.tapi.get_tiled_runs(cat, since=None, until=None, text=[], text_case=[], **keys)[source]#

Return a new catalog, filtered by search terms.

Runs will be selected with start time >=since and < until. If either is None, then the corresponding filter will not be applied.

Parameters

cat obj :

This is the catalog to be searched. Node object returned by tiled.client.

since str :

Earliest start date (& time), in ISO8601 format.

until str :

Latest start date (& time), in ISO8601 format.

text [str] :

List of full text searches. Not sensitive to case.

text_case [str] :

List of full text searches. Case sensitive.

keys dict :

Dictionary of metadata keys and values to be matched.