6 matplotlib.rcParams[
'text.usetex'] = True
7 matplotlib.rcParams[
'lines.markersize'] = 2
8 matplotlib.rcParams[
'lines.linewidth'] = 1
9 matplotlib.rcParams[
'font.size'] = 10
10 matplotlib.rcParams[
'savefig.dpi'] = 300
11 matplotlib.rcParams[
'text.latex.preamble'].append(r
'\usepackage{amsmath}')
12 matplotlib.rcParams[
'legend.fontsize'] = 10
14 from matplotlib
import pyplot
15 from gstlal.stats
import inspiral_extrinsics
17 TPDPDF = inspiral_extrinsics.InspiralExtrinsics()
20 dts = numpy.linspace(-0.030, 0.030, num)
21 dphis = numpy.linspace(-numpy.pi*1.99, numpy.pi*1.99, num)
22 jointpdf = numpy.zeros((num,num))
23 tpdf = numpy.zeros((num))
24 phipdf = numpy.zeros((num))
26 for detector in (
"H1",
"L1"):
28 for i, dt in enumerate(dts):
29 for j, dphi in enumerate(dphis):
30 t = {detector: 0,
"V1": dt}
31 phi = {detector: 0,
"V1": dphi}
32 snr = {detector: 10.,
"V1": 10.}
33 horizon = {detector: 200.,
"V1": 200.}
34 # signature is (time, phase, snr, horizon)
35 prob = TPDPDF.time_phase_snr(t, phi, snr, horizon)
39 print(
"evaluated %d probabilities in %f seconds" % (num**2, time.time()-s))
40 f = pyplot.figure(figsize=(10,10))
42 pyplot.plot(dts, tpdf)
#, drawstyle="steps-mid")
44 pyplot.plot(phipdf, dphis)#, drawstyle=
"steps-mid")
45 pyplot.gca().invert_xaxis()
47 pyplot.pcolor(dts, dphis, jointpdf.T)
48 pyplot.xlabel(r
"$t_V -t_H$")
49 pyplot.ylabel(r
"$\phi_V-\phi_H$")
50 pyplot.savefig(
"%sV1dtdphdeff.png" % detector)