diff --git a/bin/pygrb/pycbc_pygrb_pp_workflow b/bin/pygrb/pycbc_pygrb_pp_workflow index 73620850291..a2954ac6c9d 100644 --- a/bin/pygrb/pycbc_pygrb_pp_workflow +++ b/bin/pygrb/pycbc_pygrb_pp_workflow @@ -144,7 +144,7 @@ files = _workflow.FileList([]) # # Create information table about the GRB trigger and plot the search grid # -info_table_node, grb_info_table = _workflow.make_info_table(wflow, out_dir) +info_table_node, grb_info_table = _workflow.make_info_table(wflow, 'pygrb_grb_info_table', out_dir) html_nodes.append(info_table_node) files.append(grb_info_table) # diff --git a/pycbc/workflow/grb_utils.py b/pycbc/workflow/grb_utils.py index 3ad2a4ddf4a..24d46232342 100644 --- a/pycbc/workflow/grb_utils.py +++ b/pycbc/workflow/grb_utils.py @@ -560,30 +560,33 @@ def make_pygrb_plot(workflow, exec_name, out_dir, return node, node.output_files -def make_info_table(workflow, out_dir, tags=None): - """Setup a job to create an html snippet with the GRB trigger information. +def make_pygrb_info_table(workflow, exec_name, out_dir, in_files=None, + tags=None): + """ + Setup a job to create an html snippet with the GRB trigger information + or exlusion distances information. """ + # Organize tags tags = [] if tags is None else tags - - # Executable - exec_name = 'pygrb_grb_info_table' + grb_name = workflow.cp.get('workflow', 'trigger-name') + extra_tags = ['GRB'+grb_name] # Initialize job node - grb_name = workflow.cp.get('workflow', 'trigger-name') - extra_tags = ['GRB'+grb_name, 'INFO_TABLE'] node = PlotExecutable(workflow.cp, exec_name, ifos=workflow.ifos, out_dir=out_dir, tags=tags+extra_tags).create_node() # Options - node.add_opt('--trigger-time', workflow.cp.get('workflow', 'trigger-time')) - node.add_opt('--ra', workflow.cp.get('workflow', 'ra')) - node.add_opt('--dec', workflow.cp.get('workflow', 'dec')) - node.add_opt('--sky-error', workflow.cp.get('workflow', 'sky-error')) - node.add_opt('--ifos', ' '.join(workflow.ifos)) + if exec_name == 'pygrb_grb_info_table': + node.add_opt('--ifos', ' '.join(workflow.ifos)) + elif exec_name == 'pygrb_exclusion_dist_table': + node.add_input_opt('--input-files', in_files) + + # Output node.new_output_file_opt(workflow.analysis_time, '.html', '--output-file', tags=extra_tags) + # Add job node to workflow workflow += node