Skip to content
Snippets Groups Projects
Commit 255b559d authored by Chad Hanna's avatar Chad Hanna
Browse files

gstlal_inspiral_create_prior_diststats: allow user to specify df

parent 0145ce69
No related branches found
No related tags found
No related merge requests found
......@@ -75,6 +75,7 @@ def parse_command_line():
parser.add_option("--write-likelihood", metavar = "filename", help = "Write merged raw likelihood data to this file.")
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, type = "int", help = "set the degrees of freedom for the background chisq prior: default 40")
parser.add_option("--svd-file", metavar = "filename", help = "The SVD file to read the template ids from")
parser.add_option("--mass-model-file", metavar = "filename", help = "The mass model file to read from (hdf5 format)")
options, filenames = parser.parse_args()
......@@ -137,7 +138,7 @@ process = ligolw_process.register_to_xmldoc(xmldoc, u"gstlal_inspiral_create_pri
rankingstat = far.RankingStat(template_ids = template_ids, instruments = options.instrument, delta_t = options.coincidence_threshold, min_instruments = options.min_instruments, population_model_file = options.mass_model_file, horizon_factors = horizon_factors)
if options.background_prior > 0:
rankingstat.denominator.add_noise_model(number_of_events = options.background_prior)
rankingstat.denominator.add_noise_model(number_of_events = options.background_prior, df = options.df)
if options.synthesize_numerator:
rankingstat.numerator.add_signal_model()
......
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