Skip to content
Snippets Groups Projects
Commit 02c1d970 authored by Patrick Godwin's avatar Patrick Godwin
Browse files

gstlal_inspiral_rerank_pipe, inspiral_pipe.py: fix some leftover...

gstlal_inspiral_rerank_pipe, inspiral_pipe.py: fix some leftover issues/missing opts causing problems with DAG generation
parent ffba89f3
No related branches found
No related tags found
No related merge requests found
Pipeline #77630 passed with warnings
......@@ -86,6 +86,11 @@ def parse_command_line():
parser.add_option("--verbose", action = "store_true", help = "Be verbose")
parser.add_option("--ranking-stat-samples", metavar = "N", default = 2**24, type = "int", help = "Construct ranking statistic histograms by drawing this many samples from the ranking statistic generator (default = 2^24).")
# veto options
parser.add_option("--vetoes", metavar = "filename", help = "Set the veto xml file.")
parser.add_option("--frame-segments-file", metavar = "filename", help = "Set the name of the LIGO light-weight XML file from which to load frame segments. Optional iff --data-source=frames")
parser.add_option("--frame-segments-name", metavar = "name", help = "Set the name of the segments to extract from the segment tables. Required iff --frame-segments-file is given")
# FIXME: uhhhhh... yeah
parser.add_option("--injections", action = "append", help = "append injection files to analyze. Must prepend filename with X:Y:, where X and Y are floats, e.g. 1.2:3.1:filename, so that the injections are only searched for in regions of the template bank with X <= chirp mass < Y.")
......@@ -249,7 +254,7 @@ if __name__ == '__main__':
# Setup clustering and/or merging
# after all of the likelihood ranking and preclustering is finished put everything into single databases based on the injection file (or lack thereof)
injdbs, noninjdb, final_sqlite_nodes, dbs_to_delete = inspiral_pipe.sql_cluster_and_merge_layer(dag, jobs, likelihood_nodes, ligolw_add_nodes, options, boundary_seg, instruments)
injdbs, noninjdb, final_sqlite_nodes, dbs_to_delete = inspiral_pipe.sql_cluster_and_merge_layer(dag, jobs, likelihood_nodes, [], options, boundary_seg, instruments)
# Compute FAR
farnode = inspiral_pipe.compute_far_layer(dag, jobs, final_marg_nodes, injdbs, noninjdb, final_sqlite_nodes, options)
......
......@@ -41,6 +41,7 @@
# imports
#
from collections import defaultdict
import copy
import doctest
import functools
......@@ -619,7 +620,7 @@ def marginalize_layer(dag, jobs, svd_nodes, lloid_output, lloid_diststats, optio
svd_file = one_ifo_svd_nodes[bin_key].output_files["write-svd"]
else:
parent_nodes = model_node
svd_file = dagparts.T050017_filename(ifo, '%s_SVD' % bin_key, boundary_arg, '.xml.gz', path = jobs['svd'].output_path)
svd_file = dagparts.T050017_filename(instrument_set[0], '%s_SVD' % bin_key, boundary_seg, '.xml.gz', path = jobs['svd'].output_path)
# FIXME we keep this here in case we someday want to have a
# mass bin dependent prior, but it really doesn't matter for
......@@ -1033,7 +1034,7 @@ def webserver_url():
def load_analysis_output(options):
# load triggers
bgbin_lloid_map = {}
bgbin_lloid_map = defaultdict(dict)
for ce in map(CacheEntry, open(options.lloid_cache)):
try:
bgbin_idx, _, inj = ce.description.split('_', 2)
......@@ -1041,7 +1042,7 @@ def load_analysis_output(options):
bgbin_idx, _ = ce.description.split('_', 1)
inj = None
finally:
bgbin_lloid_map.setdefault(sim_tag_from_inj_file(inj), []).append(ce.path)
bgbin_lloid_map[sim_tag_from_inj_file(inj)].setdefault(bgbin_idx, []).append((ce.path, []))
# load dist stats
lloid_diststats = {}
......@@ -1062,6 +1063,10 @@ def load_analysis_output(options):
for i, individual_svd_cache in enumerate(ce.path for ce in map(CacheEntry, open(svd_caches))):
svd_dtdphi_map["%04d" % (i+bin_offset)] = options.dtdphi_file[j]
# modify injections option, as is done in 'adapt_inspiral_output'
# FIXME: don't do this, find a cleaner way of handling this generally
options.injections = [inj.split(':')[-1] for inj in options.injections]
return bgbin_lloid_map, lloid_diststats, svd_dtdphi_map, instrument_set, boundary_seg
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment