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

Vetoes #4702

Closed
3 tasks
pannarale opened this issue Apr 18, 2024 · 3 comments
Closed
3 tasks

Vetoes #4702

pannarale opened this issue Apr 18, 2024 · 3 comments
Assignees
Labels
PyGRB PyGRB development

Comments

@pannarale
Copy link
Contributor

pannarale commented Apr 18, 2024

  • In def load_triggers(input_file, vetoes): (pycbc/pycbc/results/pygrb_postprocessing_utils.py) the vetoes need to be implemented. There should be old (xml) code in PR PyGRB post-processing #3972. A rough scheme is
# =============================================================================
 # Veto trigger
 # =============================================================================
 def veto_trig(trigs, trial_dict):
    """Remove trigs that are not in trial dict"""
     mask = []
     for time in trigs['network/end_time_gc']:
        mask.append(any([time in trial for trial in trial_dict]))
     return {key: trigs[key][mask] for key in trigs.keys()}

but we are using hdf and not dictionaries so the last line needs updating.

  • pycbc_multi_inspiral contains
[...]
from pycbc.vetoes import sgchisq
[...]
sgchisq.SingleDetSGChisq.insert_option_group(parser)
[...]

which does not do anything productive [we would need to call sg_chisq = sgchisq.SingleDetSGChisq.from_cli(opt, bank, opt.chisq_bins) and output `sg_chisq.values(...)]. Having said that, PyGRB uses banks with long templates (NSBH, BNS): we should simply remove this veto for short transients (BBHs with mass above $60 M_\odot$), but if one day anyone uses PyGRB with high-mass BBHs, then it would turn out to be a shortcoming.

  • The vetoed injections category is ambiguous in pycbc_pygrb_page_tables. It used to contain vetoed injections by looking for cases with reweighted SNR = 0, but now the cut by reweighted SNR threshold happens here (and similarly in other post-processing scripts) and not in pycbc_multi_inspiral. At the same time, vetoes are not in yet, so we are simply counting injections cut away by the reweighted SNR threshold.
@MarcoCusinato
Copy link
Contributor

A bit more refined, and working, version of the function at the first point can be found here

@pannarale pannarale mentioned this issue Oct 10, 2024
2 tasks
@pannarale pannarale self-assigned this Nov 15, 2024
@pannarale
Copy link
Contributor Author

pannarale commented Nov 15, 2024

#4929 has started the work to incorporate detchar vetoes in PyGRB analyses.

@pannarale
Copy link
Contributor Author

This saga ends with PR #4979: data quality veto handling is in PyGRB to the best of our knowledge. We will keep the SingleDetSGChisq veto in to avoid having users need to insert it back in if they want to run with high-mass BBHs in their template banks.

@github-project-automation github-project-automation bot moved this from In Progress to Done in PyGRB Development Dec 10, 2024
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

No branches or pull requests

3 participants