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 0.5.0

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

Source distribution (sdist)

Source distribution for jaxtfwaves 0.5.0
File Size Uploaded
jaxtfwaves-0.5.0.tar.gz 11.1 MB Details

Built distribution (wheel)

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

Total release size: 11.2 MB

Release files / jaxtfwaves-0.5.0.tar.gz

Download URL jaxtfwaves-0.5.0.tar.gz
Size 11.1 MB
Tags Source
SHA-256 checksum
How to use checksums
745bd2ba619d9d96fbe02079e1c78aff76df96148e44c4b46b9d39e5a58e9e5c
BLAKE2b-256 checksum
How to use checksums
fdbff45df1d637b681459f35881047fad38c9c715a34cc808f7a0764b7a68302
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 files / jaxtfwaves-0.5.0-py3-none-any.whl

Download URL jaxtfwaves-0.5.0-py3-none-any.whl
Size 61.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e8929607ce13bae0b552ca5079ae4419be1167791b4b833fc02328e055bdae11
BLAKE2b-256 checksum
How to use checksums
ef10764c5673966cfd5585450cbecb33730c6a6ca942c30ec64a58bf04ca40af
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

1.0.1

1 release file

1.0.0

1 release file

This release

0.5.0 This release

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