Add heterodyning transforms for BNS chirp mass GNPE#355
Open
stephengreen wants to merge 2 commits into
Open
Conversation
Add factor_fiducial_waveform() and HeterodynePhase transform for phase heterodyning, and GNPEChirp transform for chirp mass GNPE conditioning. These enable removing the dominant chirp phase evolution from BNS waveforms, which is critical for neural network training. Based on Max Dax's implementation on bns_add_dingo_pipe_max. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
ApplySVD and WhitenFixedASD now operate on sample["waveform"] instead of flat dicts, matching the interface used by all other transforms. This enables HeterodynePhase (which needs sample["parameters"]) to be part of the compression/decompression chain. Also wires in HeterodynePhase to compression (generate_dataset.py) and decompression (waveform_dataset.py), and wraps data as sample dicts in WaveformGenerator and WaveformDataset before passing to transforms. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Member
Author
|
Added a second commit that updates the compression transform interface: ApplySVD and WhitenFixedASD now operate on sample dicts ( |
1 task
stephengreen
added a commit
that referenced
this pull request
Jul 7, 2026
From PR #355: factor_fiducial_waveform and HeterodynePhase (leading-order chirp heterodyning with an optional 1PN correction; a fixed-parameters mode for inference-time use) and the GNPEChirp proxy transform, with their tests -- including a slow integration test on real NRTidal waveforms (roundtrip mismatch < 1e-14, an order of magnitude fewer zero crossings after heterodyning). From PR #354: d_inner_h_complex_multi gains return_rho2opt, returning (h|h) alongside (d|h) so the full likelihood decomposition log L = log_Zn + Re[(d|h) e^(2i phase)] - (h|h)/2 is available from a single waveform generation (the basis for the chirp-mass sweep), with its tests. The synthetic-phase profile path is unchanged (re-verified bit-exact). PR #354's sampler extensions (fixed_context_parameters, _preprocess_data) are deliberately not ported: the composed spine already expresses them as a DeltaFactor pin and the context's one-time prepared_data. The remaining #355 changes (the sample-dict interface for the dataset-compression transforms) are training-side and come later as a package. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Based on Max Dax's implementation on bns_add_dingo_pipe_max.
Note
A future PR will update ApplySVD, WhitenFixedASD, WaveformDataset, and WaveformGenerator to use a wrapped dict interface so HeterodynePhase can be used in decompression/compression chains.
Test plan