Skip to content
Snippets Groups Projects
Commit b1c824cd authored by Kipp Cannon's avatar Kipp Cannon
Browse files

gstlal_inspiral:

- add optional --likelihood-file command line option, enabling the
  assignment of likelihoods to coincs at runtime
parent 4d124b3d
No related branches found
No related tags found
No related merge requests found
......@@ -105,6 +105,7 @@ def parse_command_line():
parser.add_option("--ht-gate-threshold", metavar = "threshold", type = "float", help = "Set the threshold on whitened h(t) to mark samples as gaps (glitch removal)")
parser.add_option("--chisq-type", metavar = "type", default = "autochisq", help = "Choose the type of chisq computation to perform. Must be one of (autochisq|timeslicechisq). The default is autochisq.")
parser.add_option("--coincidence-threshold", metavar = "value", type = "float", default = 0.020, help = "Set the coincidence window in seconds (default = 0.020). The light-travel time between instruments will be added automatically in the coincidence test.")
parser.add_option("--likelihood-file", metavar = "filename", help = "Set the name of the likelihood ratio data file to use (optional). If not specified, likelihood ratios will not be assigned to coincs.")
parser.add_option("--write-pipeline", metavar = "filename", help = "Write a DOT graph description of the as-built pipeline to this file (optional). The environment variable GST_DEBUG_DUMP_DOT_DIR must be set for this option to work.")
parser.add_option("--comment", help = "Set the string to be recorded in comment and tag columns in various places in the output file (optional).")
parser.add_option("-v", "--verbose", action = "store_true", help = "Be verbose (optional).")
......@@ -281,6 +282,18 @@ if options.verbose:
print >>sys.stderr, "done"
#
# Load likelihood ratio data
#
if options.likelihood_file is not None:
distribution_stats, distribution_seglists = inspiral.DistributionsStats.from_filenames([options.likelihood_file], verbose = options.verbose)
distribution_stats.synthesize_injections(verbose = options.verbose)
else:
distribution_stats = inspiral.DistributionsStats()
#
# build output document
#
......@@ -297,6 +310,8 @@ output = inspiral.Data(
injection_filename = options.injections,
time_slide_file = options.time_slide_file,
coincidence_threshold = options.coincidence_threshold,
distribution_stats = distribution_stats,
assign_likelihoods = options.likelihood_file is not None,
comment = options.comment,
tmp_path = options.tmp_space,
verbose = options.verbose
......
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