docs: fix matched filter SNR docstrings (closes #731)#1069
Open
christianescamilla15-cell wants to merge 1 commit intobilby-dev:mainfrom
Open
docs: fix matched filter SNR docstrings (closes #731)#1069christianescamilla15-cell wants to merge 1 commit intobilby-dev:mainfrom
christianescamilla15-cell wants to merge 1 commit intobilby-dev:mainfrom
Conversation
The docstring for matched_filter_snr() incorrectly stated it returned
the SNR squared, but the function actually returns the complex matched
filter SNR (not squared):
rho_mf = <s|h> / sqrt(<s|s>)
This is the standard complex matched filter SNR, where <.|.> is the
noise-weighted inner product. The denominator sqrt(<s|s>) is the
optimal SNR, so dividing by it yields the matched filter SNR directly.
Additionally, updated the optimal_snr_squared() docstring to be more
precise by calling it "the square of the optimal matched filter SNR"
as suggested by @ColmTalbot in the issue discussion.
References:
- Maggiore, "Gravitational Waves Vol 1", Chapter 7
- Finn 1992 (PRD 46, 5236)
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
Fixes #731 — the docstrings for
matched_filter_snrandoptimal_snr_squaredinbilby/gw/utils.pywere inaccurate.Changes
matched_filter_snr()(line 158)The docstring stated the function returned the matched filter SNR squared, but it actually returns the complex matched filter SNR (not squared). The function computes:
This is the standard complex matched filter SNR. Dividing by
sqrt(<s|s>)(the optimal SNR) gives the matched filter SNR directly, not its square.Before:
After:
optimal_snr_squared()(line 187)Following @ColmTalbot's suggestion in the issue discussion, updated the docstring to be more precise — calling it "the square of the optimal matched filter SNR" rather than just "matched filter SNR squared".
Before:
After:
Test plan
[Unreleased]References