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 verifiable*
hs00 Histogram schema Y
ns10 NICOS cache entry schema Y
pl72 Run start N
6s4t Run stop N
f142 Log data Y
ev42 Event data Y
x5f2 Status messages N
tdct Timestamps Y
ep00 EPICS connection info Y
rf5k Forwarder configuration update Y
answ File-writer command response n/a
wrdn File-writer finished writing n/a
NDAr NDArray schema for area detector images n/a

* whether it passes verification via the C++ FlatBuffers library.

hs00

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.

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.9.4.tar.gz (31.1 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.9.4-py3-none-any.whl (64.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ess_streaming_data_types-0.9.4.tar.gz
  • Upload date:
  • Size: 31.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.5

File hashes

Hashes for ess_streaming_data_types-0.9.4.tar.gz
Algorithm Hash digest
SHA256 05a10e76b7ee87336dd4a936b12d2e281dea499f21f36d09d04593f88c776195
MD5 96f149b4b7715d303d94f13df4af0a82
BLAKE2b-256 88f108888ed127e95a62384263951684449d434d34486fc5732cd5606dddf8d3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ess_streaming_data_types-0.9.4-py3-none-any.whl
  • Upload date:
  • Size: 64.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.5

File hashes

Hashes for ess_streaming_data_types-0.9.4-py3-none-any.whl
Algorithm Hash digest
SHA256 8920fb1024f8d5fc3e8a784b82a64164ee66ee4d890bfdb65a14c58ffaa52e7e
MD5 25e1fdc3943d07c8078ec382415ec1d8
BLAKE2b-256 4be11c6294e3757fb7de98010bbd5998b9f3c01f9edad009228ae46f5d21d933

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