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.1.0.tar.gz (4.7 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.1.0-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pluscross-0.1.0.tar.gz
  • Upload date:
  • Size: 4.7 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.1.0.tar.gz
Algorithm Hash digest
SHA256 8d1c2e791f302e9744e32aa43f89199fc3a6ce0d2c5bf81fc0e9345698eb25c2
MD5 0de8eca38536be28e542654e36190b32
BLAKE2b-256 d02f3e1934c673dd5cb868d9dad1eb8d40fa43c2ed4297a7316ddd22592b63bb

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pluscross-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.8 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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 44cb2b966925c2b2d708c2612fdbe2eeabc9bc91cfbe3128d49a13e203e134c7
MD5 356db6dc04863b604f881854653ef424
BLAKE2b-256 89d3f44575475c066eaf4525cccce5a3e3c314dae2588e66834a8d2e9b364e5f

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