forked from gwastro/pycbc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Preparing for veto file handling in PyGRB (gwastro#4929)
* Missing empty line * grb_utils.py preparation to handle veto-files and segment files * pycbc_make_offline_grb_workflow update based on grb_utils.py upgrade * Updated hacky pygrb stuff in jobsetup.py * First batch of updates to handle the VDF in PyGRB and streamline pygrb_postprocessing_utils.py * Removing build_veto_filelist from pycbc_pygrb_minifollowups * Better variable naming and string search in jobsetup.py * Removing redundant variables * Corrected call to segments plots * Better argparse syntax * No f-string in logging * assert instead of if
- Loading branch information
Showing
6 changed files
with
199 additions
and
310 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,7 +36,6 @@ import pycbc.events | |
import pycbc.results.pygrb_postprocessing_utils as ppu | ||
from pycbc.results import layout | ||
from pycbc.workflow.plotting import PlotExecutable | ||
from pycbc.workflow.grb_utils import build_veto_filelist | ||
from pycbc.io.hdf import HFile | ||
|
||
__author__ = "Francesco Pannarale <[email protected]>" | ||
|
@@ -72,10 +71,6 @@ def make_timeseries_plot(workflow, trig_file, snr_type, central_time, | |
ifos=workflow.ifos, out_dir=out_dir, | ||
tags=tags+extra_tags).create_node() | ||
node.add_input_opt('--trig-file', trig_file) | ||
# Pass the veto files | ||
if workflow.cp.has_option('workflow', 'veto-files'): | ||
veto_files = build_veto_filelist(workflow) | ||
node.add_input_list_opt('--veto-files', veto_files) | ||
node.new_output_file_opt(workflow.analysis_time, '.png', | ||
'--output-file', tags=extra_tags) | ||
# Quantity to be displayed on the y-axis of the plot | ||
|
@@ -112,9 +107,6 @@ parser.add_argument('--followups-file', | |
help="HDF file with the triggers/injections to follow up") | ||
parser.add_argument('--wiki-file', | ||
help="Name of file to save wiki-formatted table in") | ||
parser.add_argument('--veto-files', nargs='+', action="store", | ||
default=None, help="The location of the CATX veto " + | ||
"files provided as a list of space-separated values.") | ||
wf.add_workflow_command_line_group(parser) | ||
wf.add_workflow_settings_cli(parser, include_subdax_opts=True) | ||
ppu.pygrb_add_bestnr_cut_opt(parser) | ||
|
@@ -143,8 +135,10 @@ num_events = int(workflow.cp.get_opt_tags('workflow-minifollowups', | |
'num-events', '')) | ||
num_events = min(num_events, len(fp['BestNR'][:])) | ||
|
||
# Determine ifos used in the analysis | ||
# File instance of the input trigger file | ||
trig_file = resolve_url_to_file(os.path.abspath(args.trig_file)) | ||
|
||
# Determine ifos used in the analysis | ||
ifos = ppu.extract_ifos(os.path.abspath(args.trig_file)) | ||
num_ifos = len(ifos) | ||
|
||
|
Oops, something went wrong.