Skip to content

DiffGW

Documentation GitHub Python Frameworks Precision License

DiffGW provides gravitational-wave models and analysis tools in native PyTorch and JAX. Generate waveform tensors, batch binary parameters, and differentiate supported model paths within your chosen framework. Use the unified diffgw interface or either frontend directly.

Start with your question

I want to… Start here
Try DiffGW on a binary system Installation, then quickstart
Compare waveform coverage with other packages Dated package comparison
Choose and configure a DiffGW waveform Waveform catalog and parameter conventions
Inspect sourced equations and component evidence Waveform library and mathematical reference
Understand a difference from LAL Differences from LAL
Assess accuracy or derivative evidence Validation
Evaluate speed for my workload Performance
Use batching, gradients or inference tools User guide
Run PE or understand its validation results PE guide and results
Look up an exact function Unified API, PyTorch API, JAX API

Generate a waveform

After installing either backend, this example generates frequency-domain IMRPhenomD polarizations through the unified API:

import diffgw

hp, hc = diffgw.get_fd_waveform(
    "IMRPhenomD",
    backend="torch",  # use "jax" for JAX arrays
    mass1=30.0,
    mass2=25.0,
    chi1=0.2,
    chi2=-0.1,
    distance=410.0,
    f_lower=20.0,
    f_final=512.0,
    delta_f=0.25,
)

Masses are in solar masses, distance in Mpc and frequencies in Hz. The quickstart demonstrates both frontends and a scoped numerical consistency check. For modes, precession, tides and time-domain sampling, continue to waveform generation.

Scope and evidence

The catalog covers inspiral, merger-ringdown, tidal, precessing, higher-mode and specialized models. Availability, agreement with LAL and independent physical validation are separate properties. Each model's restrictions and evidence are linked from its catalog entry.

Detector projections, likelihoods and Fisher tools connect waveforms to analysis workflows. Derivative support and measured performance depend on the selected model, parameters and execution path.

DiffGW's original software is MIT-licensed. Literature, author calibrations and optional external assets are documented in the provenance ledger, external-data guide and third-party notices.