-
Notifications
You must be signed in to change notification settings - Fork 352
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
Function to setup pygrb_grb_info_table jobs #4875
Changes from 5 commits
116d60f
1738bfc
754223c
42ce417
238645a
e364aea
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -560,30 +560,37 @@ 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_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('--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')) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why do these need to be read from |
||
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 | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can the function be a bit more specific
make_grb_info_table
at least?