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

Open
2 tasks
pannarale opened this issue Apr 18, 2024 · 1 comment
Open
2 tasks

Vetoes #4702

pannarale opened this issue Apr 18, 2024 · 1 comment
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.

@MarcoCusinato
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PyGRB PyGRB development
Projects
Status: In Progress
Development

No branches or pull requests

3 participants