Skip to content
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

Introducing syntax for vetoing injections in PyGRB and final version of pycbc_pygrb_plot_null_stats #4947

Merged
merged 5 commits into from
Nov 20, 2024

Conversation

pannarale
Copy link
Contributor

This PR is the fourth in the series started in PR #4929.

Standard information about the request (and the following ones that will be linked to this)

This is a: a new feature enabling veto definer file usage in PyGRB. Utilities and scripts in results production are being streamlined along the way.

This change affects: PyGRB

This change changes: result presentation / plotting and scientific output.

Should this change break the standard automated test running --help for PyGRB plotting scripts, I will add some workarounds to avoid this. If needed, these will likely be empty functions: the plotting scripts will be progressively renovated in the whole series of PRs.

Motivation

Now that the workflow generator passes the veto definer file to the jobs where needed, its usage in the PyGRB results scripts is possible.

Contents

  • Enable using veto and segments files in pycbc_pygrb_plot_null_stats.
  • The function apply_vetoes_to_found_injs is introduced. At the moment it does not veto any injections (this will be a dedicated PR) but it introduces the syntax all results scripts will need to follow.

Testing performed

The totality of the changes that will be broken down in multiple PRs was tested on GRB 170817A data by producing a full results webpage (see here).

  • The author of this pull request confirms they will adhere to the code of conduct

@pannarale pannarale added the PyGRB PyGRB development label Nov 19, 2024
@pannarale pannarale self-assigned this Nov 19, 2024
@pannarale
Copy link
Contributor Author

@MarcoCusinato, thinking about your comments in #4941, I introduced a new function (apply_vetoes_to_found_injs) which does not do anything right now but imposes the syntax to request vetoing injections. pycbc_pygrb_plot_null_stats is in its final version and calls this mute function. The next PRs will do the same with all other scripts, and then we will have a PR for the content of apply_vetoes_to_found_injs.

pycbc/results/pygrb_postprocessing_utils.py Outdated Show resolved Hide resolved
bin/pygrb/pycbc_pygrb_plot_null_stats Outdated Show resolved Hide resolved
bin/pygrb/pycbc_pygrb_plot_null_stats Outdated Show resolved Hide resolved
@MarcoCusinato MarcoCusinato enabled auto-merge (squash) November 20, 2024 15:15
Copy link
Contributor

@MarcoCusinato MarcoCusinato left a comment

Choose a reason for hiding this comment

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

Addressed few typos in the comments

@pannarale
Copy link
Contributor Author

Addressed few typos in the comments

Thanks!

@pannarale pannarale enabled auto-merge (squash) November 20, 2024 16:05
@pannarale pannarale merged commit 97e27db into gwastro:master Nov 20, 2024
29 checks passed
@pannarale pannarale deleted the pygrb_vetoes branch November 20, 2024 16:31
prayush pushed a commit to prayush/pycbc that referenced this pull request Nov 21, 2024
…of `pycbc_pygrb_plot_null_stats` (gwastro#4947)

* Introducing a (mute) apply_vetoes_to_found_injs function in PyGRB

* Version of pycbc_pygrb_plot_null_stats with vetoes (albeit with a mute apply_vetoes_to_found_injs for the time being)

* Small cleanup

* Addresing typos

* Update bin/pygrb/pycbc_pygrb_plot_null_stats

---------

Co-authored-by: Marco Cusinato <marco.cusinato.96@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PyGRB PyGRB development
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants