transient_search_using_MCMC.py 1.06 KB
Newer Older
Gregory Ashton's avatar
Gregory Ashton committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
from pyfstat import MCMCTransientSearch

F0 = 30.0
F1 = -1e-10
F2 = 0
Alpha = 5e-3
Delta = 6e-2
tref = 362750407.0

tstart = 1000000000
duration = 100*86400
tstart = 1000000000 - duration
tend = tstart + 3*duration

theta_prior = {'F0': {'type': 'unif', 'lower': F0*(1-1e-6), 'upper': F0*(1+1e-6)},
               'F1': {'type': 'unif', 'lower': F1*(1+1e-2), 'upper': F1*(1-1e-2)},
               'F2': F2,
               'Alpha': Alpha,
               'Delta': Delta,
               'transient_tstart': {'type': 'unif', 'lower': tstart, 'upper': tend},
               'transient_duration': {'type': 'halfnorm', 'loc':0, 'scale': duration}
               }

ntemps = 4
log10temperature_min = -1
nwalkers = 100
nsteps = [1000, 1000]

mcmc = MCMCTransientSearch(
    label='transient_search_using_MCMC', outdir='data',
    sftfilepath='data/*transient*sft', theta_prior=theta_prior, tref=tref,
    tstart=tstart, tend=tend, nsteps=nsteps, nwalkers=nwalkers, ntemps=ntemps,
    log10temperature_min=log10temperature_min)
mcmc.run()
mcmc.plot_corner(add_prior=True)
mcmc.print_summary()