Skip to main content

Fast time-frequency gravitational-wave response package for LISA data analysis with a JAX backend

Reason this release was yanked:

Dependency (typed-lisa-toolkit) not pip installable from PyPI

Project description

jaxtfwaves

JAXTFwaves is the sibling project of tfwaves that is using JAX as backend.

tfwaves

TFWaves is a python package to compute fast time-frequency gravitational-wave response for LISA data analysis. It takes as imput phase and amplitude functions of the gravitational strain in the pseudo-inertial solar system barycenter frame, and outputs time-delay interferometry responses in the time-frequency domain.

Installation

The core package is available on PyPI:

pip install jaxtfwaves

To install a specific plugin, use its named extra:

pip install "jaxtfwaves[sobhbwaveform]"   # SOBHB waveforms via ripplegw
# pip install "jaxtfwaves[emriwaveform]"  # EMRI waveforms (coming soon)

Or install all available plugins at once:

pip install "jaxtfwaves[plugins]"

Typed API (TLT-First)

jaxtfwaves provides a typed output layer powered by typed-lisa-toolkit (TLT). This is the direction of the public API: the interface is being normalized around TLT-native objects rather than long-term raw sparse arrays.

Raw sparse outputs remain available for compatibility during the transition, but new code should prefer the typed methods and adapters below.

High-level typed methods

Use these methods directly on waveform objects:

  • compute_hphc_tlt(...)
  • compute_tdi_tlt(...)
from tfwaves.stft import TimeToTFWaveform

# Build your waveform object as usual
wvf = TimeToTFWaveform(...)

stft_plus, stft_cross = wvf.compute_hphc_tlt(di=5)
tdi_data = wvf.compute_tdi_tlt(di=5)  # defaults to XYZ or AET from wvf.channel

Adapter-level typed helpers

If you already work with raw sparse outputs, convert them explicitly with:

  • normalize_sparse_stft_output
  • sparse_stft_from_tracks
  • hphc_stfts_from_tracks
  • stftdata_from_tdi
from tfwaves import hphc_stfts_from_tracks, stftdata_from_tdi

h_plus, h_cross, indices_f, indices_t = wvf.compute_hphc(di=5)
stft_plus, stft_cross = hphc_stfts_from_tracks(
	h_plus,
	h_cross,
	indices_f,
	indices_t,
	wvf.f_bins,
	wvf.t_bins,
)

tdi_values, indices_f, indices_t = wvf.compute_tdi_tf_response(di=5)
tdi_tlt = stftdata_from_tdi(
	tdi_values,
	indices_f,
	indices_t,
	wvf.f_bins,
	wvf.t_bins,
)

Channel naming behavior

  • If waveform channel contains XYZ, compute_tdi_tlt() defaults to X, Y, Z.
  • If waveform channel contains AET, compute_tdi_tlt() defaults to A, E, T.
  • You can override names with channel_names=(...).
tdi_custom = wvf.compute_tdi_tlt(channel_names=("C1", "C2", "C3"))

Transition policy

The typed API is the canonical interface for new development. Transitional raw-output pathways are retained for one release cycle and will be progressively de-emphasized as TLT-normalized workflows become the default.

Contributing

Development environment

We use uv for dependency management. First clone the repository on your machine and go in the directory:

git clone git@gitlab.in2p3.fr:servignat/jaxtfwaves.git
cd jaxtfwaves

Create the lockfile and synchronize dependencies (including development tools):

uv sync --all-extras --group dev

We recommend you install pre-commit hooks to detect errors before you even commit.

uv run pre-commit install

Then you can run any script using

uv run python your_script.py

Lint and format checks are handled with Ruff:

uv run ruff check src tests
uv run ruff format --check src tests

Alternative local installation

As an alternative to uv-managed environments, you can install the package in development mode when you are in the jaxtfwaves directory:

pip install -e .            # core only
pip install -e ".[plugins]" # core + plugins

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

jaxtfwaves-0.3.0.tar.gz (10.9 MB view details)

Uploaded Source

Built Distribution

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

jaxtfwaves-0.3.0-py3-none-any.whl (38.3 kB view details)

Uploaded Python 3

File details

Details for the file jaxtfwaves-0.3.0.tar.gz.

File metadata

  • Download URL: jaxtfwaves-0.3.0.tar.gz
  • Upload date:
  • Size: 10.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for jaxtfwaves-0.3.0.tar.gz
Algorithm Hash digest
SHA256 7fbf42028b46b933e8e5b2fdf3336d1b1099a73fe870647decf4be05a203a6de
MD5 310d28be27a12ed20dae876e1c9dd92d
BLAKE2b-256 6d5e0e9d3539bd050fccc94ee1a35f2f6ba64192cc023c0f35449b3b3a565502

See more details on using hashes here.

File details

Details for the file jaxtfwaves-0.3.0-py3-none-any.whl.

File metadata

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

File hashes

Hashes for jaxtfwaves-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fc0cd06ef30c3becc5c7808bd2875ab49ba4aa128ebce22ced24e855971d474d
MD5 1dc408faba7f7c53ac2f8ebb36f73965
BLAKE2b-256 439b83580fa12193313ef5784c5079aab7eae19d689aa515d4c7e4393bd5a5da

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