weak_signal_follow_up.py 1.65 KB
Newer Older
1
2
3
import pyfstat

F0 = 30.0
4
F1 = -1e-10
5
F2 = 0
6
7
Alpha = 1.0
Delta = 0.5
8
9
10
11
12
13

# Properties of the GW data
sqrtSX = 1e-23
tstart = 1000000000
duration = 100*86400
tend = tstart+duration
14
tref = .5*(tstart+tend)
15

16
depth = 50
17
data_label = 'weak_signal_follow_up_depth_{:1.0f}'.format(depth)
18
19
20
21

h0 = sqrtSX / depth

data = pyfstat.Writer(
22
    label=data_label, outdir='data', tref=tref,
23
24
25
26
27
28
29
30
31
    tstart=tstart, F0=F0, F1=F1, F2=F2, duration=duration, Alpha=Alpha,
    Delta=Delta, h0=h0, sqrtSX=sqrtSX)
data.make_data()

# The predicted twoF, given by lalapps_predictFstat can be accessed by
twoF = data.predict_fstat()
print 'Predicted twoF value: {}\n'.format(twoF)

# Search
32
33
theta_prior = {'F0': {'type': 'unif', 'lower': F0*(1-1e-6),
                      'upper': F0*(1+1e-6)},
34
35
               'F1': {'type': 'unif', 'lower': F1*(1+1e-2),
                      'upper': F1*(1-1e-2)},
36
37
38
               'F2': F2,
               'Alpha': {'type': 'unif', 'lower': Alpha-1e-2,
                         'upper': Alpha+1e-2},
39
40
               'Delta': {'type': 'unif', 'lower': Delta-1e-2,
                         'upper': Delta+1e-2},
41
42
               }

43
ntemps = 3
44
45
log10temperature_min = -0.5
nwalkers = 100
46
scatter_val = 1e-10
47
nsteps = [100, 100]
48
49
50

mcmc = pyfstat.MCMCFollowUpSearch(
    label='weak_signal_follow_up', outdir='data',
51
    sftfilepath='data/*'+data_label+'*sft', theta_prior=theta_prior, tref=tref,
52
    minStartTime=tstart, maxStartTime=tend, nwalkers=nwalkers, nsteps=nsteps,
53
54
    ntemps=ntemps, log10temperature_min=log10temperature_min,
    scatter_val=scatter_val)
55
mcmc.run(R=10, Nsegs0=50, subtractions=[F0, Alpha, Delta], context='paper')
56
57
mcmc.plot_corner(add_prior=True)
mcmc.print_summary()