Skip to main content

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

Release files for jaxtfwaves 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for jaxtfwaves 1.0.1
File Interpreter ABI Platform
jaxtfwaves-1.0.1-py3-none-any.whl Python 3 none any Details

Release files / jaxtfwaves-1.0.1-py3-none-any.whl

Download URL jaxtfwaves-1.0.1-py3-none-any.whl
Size 79.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7f59785947caf0333ff4975be032cb3f35adc9bfd9d310dd9cb1a2040f2b7440
BLAKE2b-256 checksum
How to use checksums
d603733545688bb54cc8df020da07e08a7a8571572373ebb65deea50f0e5595f
Upload date
Uploaded using Trusted Publishing?
What is 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":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

This release

1.0.1 This release

1 release file

1.0.0

1 release file

0.5.0

2 release files

0.4.0

1 release file

0.3.1

2 release files

0.3.0

2 release files

0.2.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page