Skip to main content

A unified collection of SNEWS data, models, and schema

Project description

SNEWS Data Formats

snews-data-formats-CI

This package contains common data models and utilities for standardizing data formats across SNEWS packages.

Features

  • Data models for key SNEWS data types like messages and timestamps with validation via Pydantic
  • Message models for different tiers like heartbeat, retraction, timing, significance, and coincidence
  • Utilities for handling nanosecond timestamps and leap seconds
  • Static data for supported detectors
  • Generation of JSON schemas for data models
  • Comprehensive testing suite

Getting Started

If you don't have poetry, install that first.

Install the package:

poetry install

Use it in your code:

from snews.models.messages import SignificanceTierMessage

message = SignificanceTierMessage(
    detector_name="Super-K",
    p_values: [0.43, 0.32, 0.01],
    t_bin_width_sec: 5e-3
)

print(message.model_dump())

See the documentation for more details on the available data models and utilities.

See snews/examples for ipython notebooks.

Contributing

Contributions are welcome!

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

snews_data_formats-1.1.1.tar.gz (16.8 kB view details)

Uploaded Source

Built Distribution

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

snews_data_formats-1.1.1-py3-none-any.whl (26.6 kB view details)

Uploaded Python 3

File details

Details for the file snews_data_formats-1.1.1.tar.gz.

File metadata

  • Download URL: snews_data_formats-1.1.1.tar.gz
  • Upload date:
  • Size: 16.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.13.6 Darwin/23.5.0

File hashes

Hashes for snews_data_formats-1.1.1.tar.gz
Algorithm Hash digest
SHA256 64466592891b63c0925ebe556a78b4d948026dd2e4b9dba7177f660c71e2ceec
MD5 9c80d237754d96c139a3d34b8e0fe8fa
BLAKE2b-256 81169da4f6a7127b5eb15601d411a572d765cbcb35606682b77961b1e78407a9

See more details on using hashes here.

File details

Details for the file snews_data_formats-1.1.1-py3-none-any.whl.

File metadata

  • Download URL: snews_data_formats-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 26.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.13.6 Darwin/23.5.0

File hashes

Hashes for snews_data_formats-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2f9ea218cb21b06e1cebb7d6d871445ab736af054e1e25956036b9bc262de394
MD5 940c9129b3bf6328ab791d972cc87c28
BLAKE2b-256 2cf6919662dbfccbca3b3a9d43bb2d110636fb6fb5340694e6849259fc5dedc3

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