Commit f4e17188 authored by Patrick Godwin's avatar Patrick Godwin
Browse files

Revert "CoincRates: remove hard-coded fast-path from __init__()"

This reverts commit 543ffff2.
parent 23a9d225
Pipeline #144331 failed with stages
in 107 minutes and 26 seconds
......@@ -1160,6 +1160,37 @@ class CoincRates(object):
# of these proportionality constants keyed by instrument
# set.
# fast-path for gstlal-inspiral pipeline: hard-coded
# result for any subset of the H,K,L,V network, 5 ms
# coincidence window, 1 or 2 minimum instruments required.
# computed using qhull's half-plane intersection code on a
# machine where that's available. FIXME: remove when we
# can rely on scipy 0.12 being available and can switch to
# the qhull implementation
if self.instruments <= set(("H1", "K1", "L1", "V1")) and self.delta_t == 0.005 and self.min_instruments in (1, 2):
# full network, min instruments = 1
self.rate_factors = {
frozenset(['H1']): 1.0,
frozenset(['L1']): 1.0,
frozenset(['K1']): 1.0,
frozenset(['V1']): 1.0,
frozenset(['K1', 'H1']): 0.060316211581788876,
frozenset(['H1', 'L1']): 0.030025692304447849,
frozenset(['V1', 'H1']): 0.064575959867688451,
frozenset(['K1', 'L1']): 0.060316211581788876,
frozenset(['V1', 'K1']): 0.068403224361103951,
frozenset(['V1', 'L1']): 0.062896682033452986,
frozenset(['K1', 'H1', 'L1']): 0.001751496699356366,
frozenset(['V1', 'K1', 'H1']): 0.003097226972688342,
frozenset(['V1', 'H1', 'L1']): 0.0016876366183778862,
frozenset(['V1', 'K1', 'L1']): 0.0035073680570131662,
frozenset(['V1', 'K1', 'H1', 'L1']): 8.2083215897439879e-05
}
# remove entries that are invalid for the desired
# network
self.rate_factors = dict((key, value) for key, value in self.rate_factors.items() if len(key) >= self.min_instruments and key <= self.instruments)
return
self.rate_factors = {}
for instruments in self.all_instrument_combos:
# choose the instrument whose TOA forms the "epoch" of the
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment