Gravitational wave constraints from binary neutron star mergers#
Note
Running some of the scripts mentioned here require an installation of bilby to convert masses to source frame. This is an optional dependency that is not listed in the JESTER repo, so you may need to install it manually with uv pip install bilby or uv sync --extra dev in your environment.
Binary neutron star (BNS) mergers observed with gravitational waves provide direct constraints on tidal deformability. During the inspiral phase, each neutron star is tidally deformed by its companion’s gravitational field, and this deformation leaves an imprint on the gravitational waveform. The tidal deformability \(\Lambda = \frac{2}{3} k_2 \left(\frac{R}{M}\right)^5\) depends sensitively on the equation of state through both the radius \(R\) and the Love number \(k_2\).
JESTER currently supports two confirmed BNS events from the LIGO-Virgo catalogue:
GW170817 [1], [2], GWOSC page: https://gwosc.org/eventapi/html/GWTC-1-confident/GW170817/v3/
GW190425 [3], GWOSC page: https://gwosc.org/eventapi/html/GWTC-2.1-confident/GW190425/v3/
For both, several posteriors are available from the LIGO-Virgo-KAGRA (LVK) collaboration and independent analyses, using different waveform models and spin priors.
Posterior samples for both events are stored as compressed NumPy archives (.npz) under jesterTOV/inference/data/. Each file contains the four parameters required by the likelihood: mass_1_source, mass_2_source, lambda_1, and lambda_2, all in source frame (solar masses for masses, dimensionless for tidal deformabilities), together with a metadata dictionary recording the data source, waveform model, and sample count.
The processed files live in jesterTOV/inference/data/gw170817/ and jesterTOV/inference/data/gw190425/ for GW170817 and GW190425, respectively.
For each dataset, JESTER has a trained normalizing flow on the GW posterior samples. The flow learns the joint density over component source-frame masses and tidal deformabilities \((m_1, m_2, \Lambda_1, \Lambda_2)\), and GWLikelihood evaluates the EOS likelihood by querying this flow. The corner plots below show the original posterior samples (blue) and samples drawn from the trained flow (red), illustrating how faithfully the flow captures the posterior.
Below, we describe how the likelihood is computed, followed by more information on the available datasets.
The datasets can be downloaded automatically using the scripts jesterTOV/inference/data/gw170817/download_gw170817.py, and jesterTOV/inference/data/gw190425/download_gw190425.py, respectively.
These scripts download the raw files from the LIGO DCC, convert detector-frame masses to source frame, and save the four-parameter excerpts as .npz archives.
Note that the original files are gitignored, and only the processed .npz files are tracked in the repository, so you will need to run the download scripts to get the raw, complete datasets.
Likelihood#
For each BNS event, JESTER uses a normalizing flow trained on the published posterior samples over \((m_1, m_2, \Lambda_1, \Lambda_2)\) in the source frame. The flow learns the joint GW posterior density, so the likelihood of a candidate EOS is the probability that the tidal deformabilities it predicts — at the masses favoured by the GW data — are consistent with that posterior.
In practice, the computation works as follows. At initialization, a fixed set of \(N\) mass pairs \((m_1^{(i)}, m_2^{(i)})\) is drawn once from the flow’s marginal mass distribution. For each EOS evaluation, \(\Lambda_1^{(i)}\) and \(\Lambda_2^{(i)}\) are obtained by linear interpolation along the candidate EOS \(\Lambda(M)\) curve at those fixed mass points. The log-likelihood is then
evaluated numerically as \(\mathrm{logsumexp}_i\!\left( \log p_\mathrm{flow}^{(i)}\right) - \log N\). Mass pairs where either component exceeds \(M_\mathrm{TOV}\) receive a large negative penalty, if enabled by the user.
Fixing the mass grid at initialization ensures deterministic and smooth likelihood evaluations across all EOS candidates, which is important for sampler convergence. Because JAX parallelises the evaluation over all \(N\) pairs efficiently on GPU, large \(N\) (the default is 2000) can be used at little extra cost, making the estimator close to a proper Monte Carlo integral over the GW posterior.
The default implementation is GWLikelihood.
A stochastic variant, GWLikelihoodResampled, which draws fresh mass pairs at every likelihood call, is also available but not recommended for production runs.
GW170817#
LVK analyses
The table below shows the sets of posterior samples released by the LVK collaboration exist, taken from the following sources:
P1800370 (GWTC-1 PE release) — https://dcc.ligo.org/LIGO-P1800370/public
P1800061 (Properties of the binary neutron star merger GW170817, [2]) — https://dcc.ligo.org/LIGO-P1800061/public
File |
Release |
Waveform |
Spin prior |
Samples |
|---|---|---|---|---|
|
P1800061 |
IMRPhenomPv2_NRTidal |
below 0.05 |
3,952 |
|
P1800061 |
IMRPhenomPv2_NRTidal |
below 0.89 |
9,117 |
|
P1800370 (GWTC-1) |
IMRPhenomPv2_NRTidal |
below 0.05 |
8,078 |
|
P1800370 (GWTC-1) |
IMRPhenomPv2_NRTidal |
below 0.89 |
4,041 |
Independent analyses
Additionally, we provide support for an independent analysis using the more up-to-date waveform model IMRPhenomXP_NRTidalv3, which was not available at the time of the original LVK releases. This analysis is from Wouters et al. (2025), using a low-spin prior, and can be downloaded here: ThibeauWouters/neural_priors
File |
Release |
Waveform |
Spin prior |
Samples |
|---|---|---|---|---|
|
Wouters et al. (2025) |
IMRPhenomXP_NRTidalv3 |
low |
23,138 |
Example normalizing flow
Below, we show an example extracted posterior samples on the source-frame masses and tidal deformabilities and overlay a set of samples drawn from the normalizing flow trained on these samples.
(Source code, png, hires.png, pdf)
Corner plot for GW170817 (GWTC-1, low-spin prior). Blue shows the original posterior samples; red shows samples drawn from the trained normalizing flow. The diagonal panels display marginal KDE curves; the off-diagonal panels show 68% (darker) and 90% (lighter) filled credible-interval contours.#
GW190425#
The processed files live in jesterTOV/inference/data/gw190425/. Two sets of posteriors are available: the original GWTC-2 release (seven posteriors covering three waveform models and two spin-prior choices each, plus one from IMRPhenomXP_NRTidalv3), and the updated GWTC-2.1 release (cosmological and non-cosmological variants from Zenodo record 6513631).
LVK analyses
Two sets of posteriors are available from the LVK collaboration, taken from the following sources:
Discovery paper PE release — https://dcc.ligo.org/LIGO-P2000026/public
Zenodo 6513631 (GWTC-2.1) — https://zenodo.org/records/6513631
The table below shows the posteriors from the discovery paper.
File |
Waveform |
Spin prior |
Samples |
|---|---|---|---|
|
IMRPhenomPv2_NRTidal |
low spin |
46,709 |
|
IMRPhenomPv2_NRTidal |
high spin |
226,598 |
|
IMRPhenomD_NRTidal |
low spin |
53,945 |
|
IMRPhenomD_NRTidal |
high spin |
58,713 |
|
TaylorF2 |
low spin |
23,364 |
|
TaylorF2 |
high spin |
28,025 |
The table below shows the posteriors from the GWTC-2.1 release. (For details, refer to the Zenodo record and paper).
File |
Waveform |
Variant |
|---|---|---|
|
IMRPhenomPv2_NRTidal |
cosmo / high-spin |
|
IMRPhenomPv2_NRTidal |
cosmo / low-spin |
|
IMRPhenomPv2_NRTidal |
nocosmo / high-spin |
|
IMRPhenomPv2_NRTidal |
nocosmo / low-spin |
Independent analyses
Additionally, we provide support for an independent analysis using the more up-to-date waveform model IMRPhenomXP_NRTidalv3, which was not available at the time of the original LVK releases. This analysis is from Wouters et al. (2025), using a low-spin prior, and can be downloaded here: ThibeauWouters/neural_priors
File |
Waveform |
Spin prior |
Samples |
|---|---|---|---|
|
IMRPhenomXP_NRTidalv3 |
low |
25,715 |
Example normalizing flow
Below, we show another example extracted posterior samples on the source-frame masses and tidal deformabilities and overlay a set of samples drawn from the normalizing flow trained on these samples.
(Source code, png, hires.png, pdf)
Corner plot for GW190425 (IMRPhenomPv2_NRTidal, low-spin prior). Blue shows the original posterior samples; red shows samples drawn from the trained normalizing flow.#
Trained flows#
Normalizing flows for all datasets listed above have already been trained and are shipped with JESTER — no separate training step is required. The trained models live under jesterTOV/inference/flows/models/gw_maf/gw170817/ and jesterTOV/inference/flows/models/gw_maf/gw190425/, with one subdirectory per dataset. When you use the GWLikelihood without specifying a model_dir, JESTER automatically loads a sensible default for each event. The defaults are:
GW170817: the GWTC-1 low-spin posterior (
gw170817_gwtc1_lowspin), based on IMRPhenomPv2_NRTidal with a spin prior below 0.05.GW190425: the discovery-paper low-spin posterior (
gw190425_phenompnrt_ls), based on IMRPhenomPv2_NRTidal with a low-spin prior.
You can override the default by passing the path to any of the trained subdirectories via the nf_model_dir argument (see Analyzing a binary neutron star signal), allowing you to switch datasets or spin priors without any retraining.
The default model directories are: set in jester/jesterTOV/inference/likelihoods/factory.py:
GW_EVENT_PRESETS = {
"GW170817": "flows/models/gw_maf/gw170817/gw170817_gwtc1_lowspin",
"GW190425": "flows/models/gw_maf/gw190425/gw190425_phenompnrt_ls",
}
Need more information? Check out:
Analyzing a binary neutron star signal: more information on how to postprocess your GW posterior into a trained flow for
jesterinferenceTraining normalizing flows: more details on training the flows in
jester
Current scope: BNS only
JESTER currently provides normalizing flows only for binary neutron star (BNS) events (GW170817 and GW190425). While neutron star-black hole (NSBH) mergers also carry tidal information from the neutron star component, they are usually quite uninformative when it comes to the tidal posteriors, and therefore only weakly constrain the EOS. Such events are not supported yet, but might be in a future update.
References
B. P. Abbott and others. GW170817: Observation of Gravitational Waves from a Binary Neutron Star Inspiral. Phys. Rev. Lett., 119(16):161101, 2017. arXiv:1710.05832, doi:10.1103/PhysRevLett.119.161101.
B. P. Abbott and others. Properties of the binary neutron star merger GW170817. Phys. Rev. X, 9(1):011001, 2019. arXiv:1805.11579, doi:10.1103/PhysRevX.9.011001.
B. P. Abbott and others. GW190425: Observation of a Compact Binary Coalescence with Total Mass $\sim 3.4 M_\odot $. Astrophys. J. Lett., 892(1):L3, 2020. arXiv:2001.01761, doi:10.3847/2041-8213/ab75f5.