Skip to main content

IO for the waveform_catalog HDF5 format: frequency-domain waveform polarization catalogs

Project description

pluscross (Python)

Pure-IO implementation of the waveform_catalog HDF5 format (see ../SPEC.md): catalogs of frequency-domain waveform polarizations.

Installation

pip install pluscross

From source:

git clone https://github.com/binado/pluscross
cd pluscross/python
uv sync --extra test
import numpy as np

from pluscross import WaveformCatalog, save_catalog, load_catalog

catalog = WaveformCatalog(
    frequencies=np.array([20.0, 30.0, 40.0]),
    plus=np.array([[1.0 + 0.1j, 2.0 + 0.2j, 3.0 + 0.3j]]),
    cross=np.array([[0.5 - 0.1j, 1.0 - 0.2j, 1.5 - 0.3j]]),
    source_parameters={"mass_1": np.array([35.0]), "mass_2": np.array([30.0])},
    approximant="IMRPhenomXAS",
    minimum_frequency=20.0,
    maximum_frequency=40.0,
    reference_frequency=20.0,
    sampling_frequency=4096.0,
)

catalog.save("catalog.h5")
loaded = WaveformCatalog.load("catalog.h5")

loaded.frequencies    # (nfreq,) float64
loaded.plus           # (nsamples, nfreq) complex128
loaded.cross          # (nsamples, nfreq) complex128
loaded.source_parameters  # dict[str, (nsamples,) float64]

save_catalog("copy.h5", loaded)
copy = load_catalog("copy.h5")
copy.source_parameters

No derived quantities (e.g. polarization power) are computed here — consumers do that themselves.

Run tests with uv run --extra test pytest tests/.

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

pluscross-0.2.0.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

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

pluscross-0.2.0-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file pluscross-0.2.0.tar.gz.

File metadata

  • Download URL: pluscross-0.2.0.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for pluscross-0.2.0.tar.gz
Algorithm Hash digest
SHA256 5667ffea27045a107a6dcbe17990d096d734cee71e60be02816bd32ff0acaad2
MD5 e3c8eb24ca200f3eba4bae14cb172fa0
BLAKE2b-256 c073b821f4b90eb6c732ad5bf5c876618dd2e7215fd14d5aa74c0f51d83e6757

See more details on using hashes here.

File details

Details for the file pluscross-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: pluscross-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 5.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for pluscross-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 96899a45575e85cd9bbb8321d06dfd9d40de9d8397a431363c10953d15886845
MD5 5d24a9c1f0d89ac9160f39a68a1714c4
BLAKE2b-256 7d490d16b2f3812e64bd1707d84e7de2ff4a635d9d0cff14e891c806222cedd6

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