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

gstlal_compute_far_from_snr_chisq_histograms:

- don't remove coincident sngls from the background counts because
  gstlal_inspiral and friends now do this themselves
parent 239650d3
No related branches found
No related tags found
No related merge requests found
......@@ -86,26 +86,15 @@ else:
from glue.ligolw import dbtables
#
# remove zero lag from bins if we are computing faps
# generate trials table
#
if options.compute_fap is not None:
working_filename = dbtables.get_connection_filename(options.non_injection_db, tmp_path = options.tmp_space, verbose = options.verbose)
connection = sqlite3.connect(working_filename)
# remove zero lag triggers from the background bins
# FIXME this is supposed to pull out only triggers found in zero lag, is it correct?
if options.verbose:
print >>sys.stderr, "num sngl trigs before", " ".join(["%s:%d" % (ifo, cnts.array.sum()) for (ifo, cnts) in Far.distribution_stats.raw_distributions.background_rates.items()])
for ifo, snr, chisq in connection.cursor().execute("SELECT ifo, snr, chisq FROM sngl_inspiral WHERE sngl_inspiral.event_id IN (SELECT event_id FROM coinc_event_map JOIN coinc_event ON (coinc_event_map.table_name == 'sngl_inspiral' AND coinc_event.coinc_event_id == coinc_event_map.coinc_event_id) WHERE NOT EXISTS (SELECT * FROM time_slide WHERE time_slide.time_slide_id == coinc_event.time_slide_id AND time_slide.offset != 0))"):
Far.distribution_stats.raw_distributions.background_rates[ifo+"_snr_chi"][snr, chisq**.5 / snr] -= 1
if options.verbose:
print >>sys.stderr, "num sngl trigs after", " ".join(["%s:%d" % (ifo, cnts.array.sum()) for (ifo, cnts) in Far.distribution_stats.raw_distributions.background_rates.items()])
Far.set_trials_table(connection)
connection.close()
dbtables.discard_connection_filename(options.non_injection_db, working_filename, 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