Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ess-streaming-data-types

Package Overview
Dependencies
Maintainers
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ess-streaming-data-types

Python utilities for handling ESS streamed data

  • 0.26.1
  • PyPI
  • Socket score

Maintainers
3

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

namedescription
hs00Histogram schema (deprecated in favour of hs01)
hs01Histogram schema
ns10NICOS cache entry schema
pl72Run start
6s4tRun stop
f142Log data (deprecated in favour of f144)
f144Log data
ev42Event data (deprecated in favour of ev44)
ev43Event data from multiple pulses
ev44Event data with signed data types
x5f2Status messages
tdctTimestamps
ep00EPICS connection info (deprecated in favour of ep01)
ep01EPICS connection info
rf5kForwarder configuration update (deprecated in favour of fc00)
fc00Forwarder configuration update
answFile-writer command response
wrdnFile-writer finished writing
NDArDeprecated
ADArEPICS areaDetector data
al00Alarm/status messages used by the Forwarder and NICOS
senvDeprecated
jsonGeneric JSON data
se00Arrays with optional timestamps, for example waveform data. Replaces senv.
da00Scipp-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

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc