Skip to main content

Python utilities for handling ESS streamed data

Project description

Python Streaming Data Types

Utilities for working with the FlatBuffers schemas used at the European Spallation Source ERIC for data transport.

https://github.com/ess-dmsc/streaming-data-types

FlatBuffer Schemas

name description
hs00 Histogram schema (deprecated in favour of hs01)
hs01 Histogram schema
ns10 NICOS cache entry schema
pl72 Run start
6s4t Run stop
f142 Log data (deprecated in favour of f144)
f144 Log data
ev42 Event data (deprecated in favour of ev44)
ev43 Event data from multiple pulses
ev44 Event data with signed data types
x5f2 Status messages
tdct Timestamps
ep00 EPICS connection info (deprecated in favour of ep01)
ep01 EPICS connection info
rf5k Forwarder configuration update (deprecated in favour of fc00)
fc00 Forwarder configuration update
answ File-writer command response
wrdn File-writer finished writing
NDAr Deprecated
ADAr EPICS areaDetector data
al00 Alarm/status messages used by the Forwarder and NICOS
senv Deprecated
json Generic JSON data
se00 Arrays with optional timestamps, for example waveform data. Replaces senv.
da00 Scipp-like data arrays, for histograms, etc.

hs00 and hs01

Schema for histogram data. It is one of the more complicated to use schemas. It takes a Python dictionary as its input; this dictionary needs to have correctly named fields.

The input histogram data for serialisation and the output deserialisation data have the same dictionary "layout". Example for a 2-D histogram:

hist = {
    "source": "some_source",
    "timestamp": 123456,
    "current_shape": [2, 5],
    "dim_metadata": [
        {
            "length": 2,
            "unit": "a",
            "label": "x",
            "bin_boundaries": np.array([10, 11, 12]),
        },
        {
            "length": 5,
            "unit": "b",
            "label": "y",
            "bin_boundaries": np.array([0, 1, 2, 3, 4, 5]),
        },
    ],
    "last_metadata_timestamp": 123456,
    "data": np.array([[1, 2, 3, 4, 5], [6, 7, 8, 9, 10]]),
    "errors": np.array([[5, 4, 3, 2, 1], [10, 9, 8, 7, 6]]),
    "info": "info_string",
}

The arrays passed in for data, errors and bin_boundaries can be NumPy arrays or regular lists, but on deserialisation they will be NumPy arrays.

Developer documentation

See README_DEV.md

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ess_streaming_data_types-0.27.0.tar.gz (51.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ess_streaming_data_types-0.27.0-py3-none-any.whl (151.3 kB view details)

Uploaded Python 3

File details

Details for the file ess_streaming_data_types-0.27.0.tar.gz.

File metadata

File hashes

Hashes for ess_streaming_data_types-0.27.0.tar.gz
Algorithm Hash digest
SHA256 bc61286aaa97ad4420441f1150bd3eb552725e3d04357afd94844e9a5c532fbb
MD5 8bf0e25ffa3353759217302f37cceab2
BLAKE2b-256 f902752f404379f1787c10a318853e90c32df13e5876238c4f16ee696f570c22

See more details on using hashes here.

File details

Details for the file ess_streaming_data_types-0.27.0-py3-none-any.whl.

File metadata

File hashes

Hashes for ess_streaming_data_types-0.27.0-py3-none-any.whl
Algorithm Hash digest
SHA256 78e8ccb81d74fcb2a7db825116acc4a74e8a381168240cd01a813ed4bb93cfe8
MD5 d97e17f20c964e502a8e8074ed0405a7
BLAKE2b-256 10205c13b0f10dcd69daaa1853385cee819c8c204282f3d0d2fffaa91fdb56b5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page