Pop the frequency bin edges for the BNS RB source model to match the BBH case - #1127
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR aligns the BNS relative-binning source model behavior with the BBH case by removing frequency_bin_edges from waveform_kwargs in the fiducial path, preventing _base_lal_cbc_fd_waveform from raising a ValueError for unused kwargs.
Changes:
- Pop
frequency_bin_edgesfromwaveform_kwargswhenfiducial == 1inlal_binary_neutron_star_relative_binningto match the BBH relative-binning implementation.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
785
to
+786
| if fiducial == 1: | ||
| _ = waveform_kwargs.pop("frequency_bin_edges", None) |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1127 +/- ##
==========================================
- Coverage 72.12% 72.11% -0.01%
==========================================
Files 86 86
Lines 15371 15372 +1
Branches 2333 2333
==========================================
Hits 11086 11086
Misses 3578 3578
- Partials 707 708 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
ColmTalbot
approved these changes
Aug 17, 2026
adivijaykumar
approved these changes
Aug 17, 2026
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.
In this line of
lal_binary_black_hole_relative_binning, BBH RB source model pops thefrequency_bin_edges. However, the same pop is not applied to the BNS RB source model. In the past, this raised a warning, but since 9d7efe0, this is now a ValueError. AFAICT, this means This PR adds the pop to enable use of the BNS RB likelihood.