Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
9cdd8c0
Enable bilby-pipe style injections
stephengreen Jun 2, 2025
0136e14
allow complex data in hdf5
stephengreen Jun 17, 2025
5829f02
Enable DeltaFunction time priors.
stephengreen Jun 18, 2025
e3b019d
Update docs and examples.
stephengreen Jun 19, 2025
643f315
Ensure prior-dict-updates included when sampling injection parameters.
stephengreen Jun 19, 2025
4e33207
Fix issue with Sampler.log_prob.
stephengreen Jun 20, 2025
f676c5d
Set default trigger time to the model reference time for injections.
stephengreen Jun 23, 2025
794d441
Add pp-plot function to core.Result.
stephengreen Jun 23, 2025
603038a
Add PP plotting to dingo_pipe.
stephengreen Jun 24, 2025
7d2ff4b
Enable latex labels for corner plots.
stephengreen Jun 24, 2025
421ca08
Small fix for latex labels.
stephengreen Jun 24, 2025
01251c1
Add 'name' attribute to priors in examples.
stephengreen Jun 24, 2025
1954866
Enable dingo signal generator for dingo_pipe injections.
stephengreen Jun 25, 2025
91fb671
Ensure generation-seed is used in picking ASD.
stephengreen Jun 25, 2025
60b0fe2
Update docs.
stephengreen Jun 25, 2025
8a9cf98
Improve a docstring.
stephengreen Jun 26, 2025
9619135
Update dingo/pipe/data_generation.py
stephengreen Jul 1, 2025
110c03e
Merge branch 'main' into injections-pipe-stephen
nihargupte-ph Jul 4, 2025
d5e9174
updates to make injections compatible with gwsignal and save the data…
nihargupte-ph Jul 8, 2025
ed31be7
disallowed for minimum-frequency changes to waveform and only allowin…
nihargupte-ph Jul 8, 2025
5cf2018
added data dump to main.py
nihargupte-ph Jul 21, 2025
6d1c7cf
Update pytest.yml
nihargupte-ph Jul 29, 2025
78e03c3
replaced default SVD from randomized_svd to scipy svd
nihargupte-ph Jul 29, 2025
15ce8ea
Merge branch 'injections-pipe-stephen' of github.com:dingo-gw/dingo i…
nihargupte-ph Jul 29, 2025
14c279b
Update pytest.yml
nihargupte-ph Jul 29, 2025
12a0a1c
replaced default SVD from randomized_svd to scipy svd
nihargupte-ph Jul 29, 2025
6f6451c
SEOBNRv5EHM changes
nihargupte-ph Jul 29, 2025
d26bc96
Merge branch 'injections-pipe-stephen' into seobnrv5ehm
nihargupte-ph Jul 29, 2025
4383e38
resolve merge conflicts
nihargupte-ph Nov 3, 2025
3f65567
fixed merge issues
nihargupte-ph Nov 3, 2025
64b38db
removing data_generationextra lines
nihargupte-ph Nov 3, 2025
bd2a323
clarifying docstrings
nihargupte-ph Nov 3, 2025
9603192
added tests for decimation and mode resummation for v5EHM
nihargupte-ph Nov 3, 2025
91e615e
removed extra allowed kwargs
nihargupte-ph Nov 3, 2025
1ae0d76
teobresums-dali implementation
nihargupte-ph Nov 13, 2025
01040c7
updated f_min typo!
nihargupte-ph Nov 13, 2025
ba09888
2 sided fft
nihargupte-ph Nov 18, 2025
10db6cd
renamed mean_anomaly to mean_per_ano
nihargupte-ph Nov 27, 2025
e654345
teob support with synthetic phase
nihargupte-ph Jan 20, 2026
966861c
removed special TEOB tapering
nihargupte-ph Jan 23, 2026
8db341d
updated teob functions
nihargupte-ph Feb 2, 2026
b3ef311
merged main
nihargupte-ph Feb 13, 2026
59387b0
implemented TEOB synthetic phase'
nihargupte-ph Feb 16, 2026
206da83
Refactor TEOB mode generation and remove dead code
nihargupte-ph Feb 16, 2026
6a77483
Fix TEOB mode decomposition to use parameters["phase"] and update test
nihargupte-ph Feb 17, 2026
1569790
updated pesummary to not require phi_jl
nihargupte-ph Feb 19, 2026
bf249d5
allowed for more waveform failures
nihargupte-ph Mar 20, 2026
5830821
Add comment explaining zero-padding for short TD waveforms
Mar 23, 2026
609ad08
added deffered phase reconstruction
nihargupte-ph Apr 27, 2026
fd6ef59
Fix test_wfg_m.py CI collection failure
nihargupte-ph Apr 27, 2026
6545dcc
Disable debug plotting in test_generate_hplus_hcross_m
nihargupte-ph Apr 28, 2026
ee62fd4
Reuse gwsignal taper in TEOB mode conditioning
nihargupte-ph Apr 28, 2026
d5f0b77
rename chi_1/chi_2 -> spin_1z/spin_2z for pesummary
nihargupte-ph May 6, 2026
e3ec166
Merge branch 'seobnrv4ehm' of https://github.com/dingo-gw/dingo into …
nihargupte-ph May 6, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions dingo/asimov/dingo.ini
Original file line number Diff line number Diff line change
Expand Up @@ -203,9 +203,9 @@ prior-dict-updates = {
{%- assign p = priors['eccentricity'] %}
eccentricity = {{ p['type'] }}(name='eccentricity', minimum={{ p['minimum'] }}, maximum={{ p['maximum'] }}),
{%- endif %}
{%- if priors.keys() contains "mean_anomaly" %}
{%- assign p = priors['mean_anomaly'] %}
mean_anomaly = {{ p['type'] }}(name='mean_anomaly', minimum={{ p['minimum'] }}, maximum={{ p['maximum'] }}, boundary={{ p['boundary'] | default: 'periodic' }} ),
{%- if priors.keys() contains "mean_per_ano" %}
{%- assign p = priors['mean_per_ano'] %}
mean_per_ano = {{ p['type'] }}(name='mean_per_ano', minimum={{ p['minimum'] }}, maximum={{ p['maximum'] }}, boundary={{ p['boundary'] | default: 'periodic' }} ),
{%- endif %}
{%- if priors.keys() contains "luminosity distance" %}
{%- assign p = priors['luminosity distance'] %}
Expand Down
64 changes: 63 additions & 1 deletion dingo/gw/likelihood.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
DecimateWaveformsAndASDS,
create_mask_based_on_frequency_update,
)
from dingo.gw.waveform_generator import WaveformGenerator
from dingo.gw.waveform_generator import WaveformGenerator, wfg_utils
from dingo.gw.domains import (
Domain,
UniformFrequencyDomain,
Expand Down Expand Up @@ -382,6 +382,18 @@ def _log_likelihood_phase_grid_mode_decomposed(self, theta, phases=None):
pol_m = self.signal_m({**theta, "phase": 0})
pol_m = {k: pol["waveform"] for k, pol in pol_m.items()}

# For TEOB, generate_hplus_hcross_m applies a phase-dependent time shift
# bookkept in wfg._deferred_timeshift_data. The analytical precomputation
# below assumes mu(phi) = sum_m mu_m(0) * exp(-i m phi), which is only
# valid when that timeshift is absent. When it's present we fall back to
# a per-phase resum so the phase-grid likelihood stays consistent with
# the full direct likelihood.
dts = getattr(self.waveform_generator, "_deferred_timeshift_data", None)
if dts is not None:
return self._log_likelihood_phase_grid_mode_decomposed_with_dts(
pol_m, d, phases, dts
)

# Step 2: Precompute complex inner products (mu, mu) and (d, mu) for the
# individual modes m.
min_idx = self.data_domain.min_idx
Expand Down Expand Up @@ -475,6 +487,56 @@ def _log_likelihood_phase_grid_mode_decomposed(self, theta, phases=None):

return log_likelihoods

def _log_likelihood_phase_grid_mode_decomposed_with_dts(
self, pol_m, d, phases, dts
):
"""Variant of _log_likelihood_phase_grid_mode_decomposed for approximants
(currently TEOB) whose mode decomposition carries a phase-dependent time
shift recorded in `dts` (= wfg._deferred_timeshift_data).

We cannot use the analytical precomputation trick because the timeshift
depends on the argmax of the TD-resummed h+, which varies with phase.
Instead we resum modes per phase and apply the exp(-2 pi i f dt(phi))
correction before computing inner products. The geocenter-level time
shift commutes with detector projection, so we can apply it directly to
the per-detector signals returned by signal_m.
"""
m_vals = sorted(pol_m.keys())
ifos = list(d.keys())
freqs = self.data_domain()

log_likelihoods = np.empty(len(phases))
for idx, phi in enumerate(phases):
# Analytical resum of per-detector mode contributions.
mu = {
ifo: sum(
pol_m[m][ifo] * np.exp(-1j * m * phi) for m in m_vals
)
for ifo in ifos
}
# Deferred-timeshift correction (no-op when phi == 0.0).
if phi != 0.0:
target_phase = dts["phase_ref"] + phi
epoch_target = wfg_utils.compute_epoch_from_resized_td_modes(
dts["resized_td_modes"], dts["iota"], target_phase,
dts["delta_t"],
)
dt_target = 1.0 / dts["delta_f"] + epoch_target
dt_correction = dt_target - dts["dt_ref"]
shift = np.exp(-2j * np.pi * dt_correction * freqs)
for ifo in ifos:
mu[ifo] = mu[ifo] * shift

rho2opt = sum(
inner_product(mu_ifo, mu_ifo) for mu_ifo in mu.values()
)
kappa2 = sum(
inner_product(d_ifo, mu_ifo)
for d_ifo, mu_ifo in zip(d.values(), mu.values())
)
log_likelihoods[idx] = self.log_Zn + kappa2 - 0.5 * rho2opt
return log_likelihoods

def _log_likelihood_phase_marginalized(self, theta):
"""

Expand Down
36 changes: 27 additions & 9 deletions dingo/gw/result.py
Original file line number Diff line number Diff line change
Expand Up @@ -701,6 +701,10 @@ def get_pesummary_samples(self, num_processes=1):
* The spin angles phi_jl and theta_jn are transformed to account for a
difference in phase definition.
* Some columns are dropped: delta_log_prob_target, log_prob
* Aligned-spin columns ``chi_1``/``chi_2`` are renamed to
``spin_1z``/``spin_2z`` so that PESummary's standard-name
dictionary recognises them and derives ``a_1``, ``a_2``,
``chi_eff``, etc.
"""
if hasattr(self, "_pesummary_samples"):
return self._pesummary_samples
Expand All @@ -727,18 +731,27 @@ def get_pesummary_samples(self, num_processes=1):
if "time" in col:
samples.loc[:, col] += self.t_ref

# Rename aligned-spin columns to match PESummary's standard names.
# PESummary's standard_names.py maps spin_1z/spin_2z but not chi_1/chi_2,
# so without this rename pesummary cannot derive a_1, chi_eff, chi_p, etc.
samples.rename(
columns={"chi_1": "spin_1z", "chi_2": "spin_2z"}, inplace=True
)

spin_conversion_phase_old = self.base_metadata["dataset_settings"][
"waveform_generator"
].get("spin_conversion_phase")

# Redefine phase parameter to be consistent with Bilby. COMMENTED BECAUSE SLOW
samples = change_spin_conversion_phase(
samples,
self.f_ref,
spin_conversion_phase_old,
None,
num_processes=num_processes,
)
# Redefine phase parameter to be consistent with Bilby.
# Only apply spin conversion when precessing spin parameters are present.
if "phi_jl" in samples.columns:
samples = change_spin_conversion_phase(
samples,
self.f_ref,
spin_conversion_phase_old,
None,
num_processes=num_processes,
)

self._pesummary_samples = samples

Expand All @@ -750,7 +763,9 @@ def pesummary_prior(self):

By convention, Dingo stores all times *relative* to a reference time, typically
the trigger time for an event. The prior returned here corrects for that offset to
be consistent with other codes.
be consistent with other codes. Aligned-spin keys ``chi_1``/``chi_2`` are
renamed to ``spin_1z``/``spin_2z`` to match the renaming applied in
:meth:`get_pesummary_samples`.
"""
prior = copy.deepcopy(self.prior)
for p in prior:
Expand All @@ -760,4 +775,7 @@ def pesummary_prior(self):
prior[p].minimum += self.t_ref
except AttributeError:
continue
for old, new in (("chi_1", "spin_1z"), ("chi_2", "spin_2z")):
if old in prior and new not in prior:
prior[new] = prior.pop(old)
return prior
Loading