@@ -32,6 +32,7 @@ from optparse import OptionParser
importnumpy
importscipy
fromcollectionsimportdefaultdict
importwarnings
fromligo.lwimportligolw
fromligo.lwimportlsctables
...
...
@@ -76,6 +77,7 @@ def parse_command_line():
# FIXME: default must be identical to gstlal_inspiral's default
parser.add_option("--min-instruments",metavar="count",type="int",default=2,help="Set the minimum number of instruments that must contribute triggers to form a candidate (default = 2).")
parser.add_option("--write-likelihood",metavar="filename",help="Write merged raw likelihood data to this file.")
parser.add_option("--seed-likelihood",metavar="filename",help="Start with a likelihood file and only update certain components. This is incompatible with --coincidence-threshold, --min-instruments, --instrument, and --background-prior so these options will be ignored")
parser.add_option("--instrument",action="append",help="Append to a list of instruments to create dist stats for. List must be whatever instruments you intend to analyze.")
parser.add_option("-p","--background-prior",metavar="N",default=1,type="float",help="Include an exponential background prior with the maximum bin count = N, default 1")
parser.add_option("--df",metavar="N",default=40,help="set the degrees of freedom for the background chisq prior: default 40. You can also use template bandwidth to set this by setting it to 'bandwidth' or the values analytically derived from auto-correlations by setting it to 'analytic'.")
...
...
@@ -91,15 +93,6 @@ def parse_command_line():
process_params=dict(options.__dict__)
ifnotoptions.instrument:
raiseValueError("must specify at least one --instrument")
raiseValueError("--min-instruments is greater than the number of unique --instrument's")
iffilenames:
raiseValueError("unrecognized arguments after options: %s"%"".join(filenames))
...
...
@@ -158,6 +151,23 @@ def parse_command_line():
# don't let the bandwidth get too small
options.df=max(int(min(bandwidths))+1,10)*3
ifoptions.seed_likelihood:
warnings.warn("--seed-likelihood given, the following options will be ignored: --coincidence-threshold, --min-instruments, --instrument, and --background-prior")
options.coincidence_threshold=None
options.min_instruments=None
options.instrument=None
options.background_prior=None
else:
ifnotoptions.instrument:
raiseValueError("must specify at least one --instrument")