-
Notifications
You must be signed in to change notification settings - Fork 356
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PyGRB reweighted SNR cut bug #5023
Merged
Merged
Conversation
This file contains 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
Applying reweighted SNR cut to found injections also to the key storing reweighted SNR itself!
For reference, I am posting the output of two
|
Thomas-JACQUOT
approved these changes
Jan 24, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've tested this modification on my jobs and it worked ! 🎉
…plot_null_stats without vetos file
@Thomas-JACQUOT's comment above refers to |
Thomas-JACQUOT
approved these changes
Jan 27, 2025
titodalcanton
approved these changes
Jan 27, 2025
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.
@Thomas-JACQUOT uncovered two bugs when running PyGRB without vetoes.
First bug
pycbc_pygrb_plot_injs_results
was not applying the reweighted SNR cut to the reweighted SNR values of found injections. This would then lead to indexing errors such asThis PR adds one line to
pycbc_pygrb_plot_injs_results
to get it to run correctly, even when vetoes are not used.Second bug
pycbc_pygrb_plot_null_stats
also does not work correctly when using it without vetoes. Namely, it does not find the key for coincident SNR. This happens because these values are calculated upon the user's request, in an if statement that checks whether vetos are being used.This PR fixes the function
apply_vetoes_to_found_injs
inpycbc.results.pygrb_postprocessing_utils.py
so that regardless of whether the user passes vetoed times or not, the same final quantities to be plotted are calculated and stored.This PR only affects PyGRB and fixes both problems.
I encourage @Thomas-JACQUOT to use this branch to ensure that his run goes to completion.