Skip to content

Pop the frequency bin edges for the BNS RB source model to match the BBH case - #1127

Merged
ColmTalbot merged 2 commits into
mainfrom
pop-waveform-kwargs-for-rb
Aug 17, 2026
Merged

Pop the frequency bin edges for the BNS RB source model to match the BBH case#1127
ColmTalbot merged 2 commits into
mainfrom
pop-waveform-kwargs-for-rb

Conversation

@GregoryAshton

Copy link
Copy Markdown
Collaborator

In this line of lal_binary_black_hole_relative_binning, BBH RB source model pops the frequency_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.

Copilot AI lite review requested due to automatic review settings August 17, 2026 08:59

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_edges from waveform_kwargs when fiducial == 1 in lal_binary_neutron_star_relative_binning to 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 thread bilby/gw/source.py
Comment on lines 785 to +786
if fiducial == 1:
_ = waveform_kwargs.pop("frequency_bin_edges", None)
@codecov

codecov Bot commented Aug 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 72.11%. Comparing base (a139afa) to head (f463aa9).

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     
Flag Coverage Δ
python311 72.04% <100.00%> (-0.01%) ⬇️
python312 72.04% <100.00%> (-0.04%) ⬇️
python313 72.07% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ColmTalbot
ColmTalbot added this pull request to the merge queue Aug 17, 2026
Merged via the queue into main with commit f44cc6d Aug 17, 2026
21 checks passed
@ColmTalbot
ColmTalbot deleted the pop-waveform-kwargs-for-rb branch August 17, 2026 19:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants