Skip to main content

A unified collection of SNEWS data, models, and schema

Project description

SNEWS Data Formats

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.0.0.tar.gz (43.8 kB view hashes)

Uploaded Source

Built Distribution

snews_data_formats-1.0.0-py3-none-any.whl (39.4 kB view hashes)

Uploaded Python 3

Supported by

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