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

inspiral_extrinsics: increase marginalization accuracy in dt / dphi code and broaden the covariance

parent 7caa5078
No related branches found
No related tags found
No related merge requests found
......@@ -1027,9 +1027,9 @@ def margprob(Dmat):
out = []
for D in Dmat:
D = D[numpy.isfinite(D)]
step = max(int(len(D) / 2048.), 1)
step = max(int(len(D) / 65536.), 1)
D = D[::step]
if len(D) == 2049:
if len(D) == 65537:
out.append(step * scipy.integrate.romb(numpy.exp(-D**2/2.)))
else:
out.append(step * scipy.integrate.simps(numpy.exp(-D**2/2.)))
......@@ -1145,14 +1145,14 @@ class TimePhaseSNR(object):
numchunks = 20
# These are generated by running
# ./gstlal_inspiral_compute_dtdphideff_cov_matrix --psd-xml 2019-05-09-H1L1V1psd_new.xml.gz --H-snr 5.0 --L-snr 7.0 --V-snr 2.25
# ./gstlal_inspiral_compute_dtdphideff_cov_matrix --psd-xml gstlal-inspiral/share/O3/2019-05-09-H1L1V1psd_new.xml.gz --H-snr 4.3 --L-snr 6.0 --V-snr 2.
# NOTE NOTE NOTE: You cannot just change these without fully rebuilding
# the trees and the marginalized distributions.
transtt = {frozenset(("H1", "L1")): 5.19313416e+04, frozenset(("H1", "V1")): 1.39663777e+04, frozenset(("L1", "V1")): 3.98320074e+04}
transpp = {frozenset(("H1", "L1")): 3.50152221e+00, frozenset(("H1", "V1")): 1.56080114e+00, frozenset(("L1", "V1")): 1.63248925e+00}
transtp = {frozenset(("H1", "L1")): -6.51410977e+01, frozenset(("H1", "V1")): -2.07581116e+01, frozenset(("L1", "V1")): -6.05964763e+01}
transpt = {frozenset(("H1", "L1")): 0.0, frozenset(("H1", "V1")): 0.0, frozenset(("L1", "V1")): 0.0}
transdd = {frozenset(("H1", "L1")): 5.0 , frozenset(("H1", "V1")): 5.0, frozenset(("L1", "V1")): 5.0}
transtt = {frozenset(['V1', 'H1']): 12069.320302753127, frozenset(['H1', 'L1']): 44554.743732089875, frozenset(['V1', 'L1']): 34221.089108680397}
transtp = {frozenset(['V1', 'H1']): -17.906651775391733, frozenset(['H1', 'L1']): -55.897144921848493, frozenset(['V1', 'L1']): -52.035238588072133}
transpt = {frozenset(['V1', 'H1']): 0.0, frozenset(['H1', 'L1']): 0.0, frozenset(['V1', 'L1']): 0.0}
transpp = {frozenset(['V1', 'H1']): 1.3806845740864522, frozenset(['H1', 'L1']): 3.0084592948751365, frozenset(['V1', 'L1']): 1.4477360415175331}
transdd = {frozenset(['V1', 'H1']): 5.0, frozenset(['H1', 'L1']): 5.0, frozenset(['V1', 'L1']): 5.0}
def __init__(self, tree_data = None, margsky = None, verbose = False, margstart = 0, margstop = None):
"""
......@@ -1236,7 +1236,7 @@ class TimePhaseSNR(object):
for cnt, points in enumerate(chunker(self.tree_data[:,slcs], self.numchunks, margstart, margstop)):
if verbose:
print >> sys.stderr, "%d/%d" % (cnt * self.numchunks, num_points)
Dmat = self.KDTree[combo].query(points, k=num_points, distance_upper_bound = 8.5)[0]
Dmat = self.KDTree[combo].query(points, k=num_points, distance_upper_bound = 15.0)[0]
marg[margstart + self.numchunks * cnt : margstart + self.numchunks * (cnt+1)] = margprob(Dmat)
self.margsky[combo] = numpy.array(marg, dtype="float32")
......
No preview for this file type
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