Commit f0b06a90 authored by Gregory Ashton's avatar Gregory Ashton
Browse files

Updates all examples and existing docs to lates user interface

parent 87604fa0
......@@ -66,11 +66,11 @@ simply called `nsteps = [500, 1000]`). Finally, the simulation run for `500`
steps of burn-in then `1000` steps of production to estimate the posterior.
Passing all this to the MCMC search, we also need to give it a label and
directory to save the data and provide `sftlabel` and `sftdir` which defines
which data to use in the search
directory to save the data and provide `sftfilepath`, a string matching
the data to use in the search
```
mcmc = MCMCSearch('fully_coherent', 'data', sftlabel='basic', sftdir='data',
mcmc = MCMCSearch('fully_coherent', 'data', sftfilepath='data/*basic*sft',
theta_prior=theta_prior, tref=tref, tstart=tstart, tend=tend,
nsteps=nsteps, nwalkers=nwalkers, ntemps=ntemps,
scatter_val=1e-10)
......
......@@ -47,11 +47,10 @@ nwalkers = 500
nsteps = [100, 100, 100]
mcmc = MCMCSearch('fully_coherent_on_glitching_data', 'data',
sftlabel='glitch', sftdir='data',
sftfilepath='data/*_glitch*.sft',
theta_prior=theta_prior, tref=tref, tstart=tstart, tend=tend,
nsteps=nsteps, nwalkers=nwalkers, ntemps=ntemps, betas=betas,
scatter_val=1e-6)
nsteps=nsteps, nwalkers=nwalkers, ntemps=ntemps,
log10temperature_min=log10temperature_min, scatter_val=1e-6)
mcmc.run()
mcmc.plot_corner(add_prior=True)
```
......
......@@ -9,7 +9,7 @@ tref = 362750407.0
tstart = 1000000000
duration = 100*86400
tend = tstart = duration
tend = tstart + duration
theta_prior = {'F0': {'type': 'norm', 'loc': F0, 'scale': abs(1e-6*F0)},
'F1': {'type': 'norm', 'loc': F1, 'scale': abs(1e-6*F1)},
......@@ -22,7 +22,7 @@ ntemps = 1
nwalkers = 100
nsteps = [100, 500, 1000]
mcmc = MCMCSearch('fully_coherent', 'data', sftlabel='basic', sftdir='data',
mcmc = MCMCSearch('fully_coherent', 'data', sftfilepath='data/*basic*sft',
theta_prior=theta_prior, tref=tref, tstart=tstart, tend=tend,
nsteps=nsteps, nwalkers=nwalkers, ntemps=ntemps,
scatter_val=1e-10)
......
......@@ -10,7 +10,7 @@ tref = 362750407.0
tstart = 1000000000
duration = 100*86400
tend = tstart = duration
tend = tstart + duration
theta_prior = {'F0': {'type': 'unif', 'lower': F0-5e-5,
'upper': F0+5e-5},
......@@ -21,15 +21,15 @@ theta_prior = {'F0': {'type': 'unif', 'lower': F0-5e-5,
}
ntemps = 10
betas = np.logspace(0, -30, ntemps)
log10temperature_min = -30
nwalkers = 500
nsteps = [100, 100, 100]
mcmc = MCMCSearch('fully_coherent_on_glitching_data', 'data',
sftlabel='glitch', sftdir='data',
sftfilepath='data/*_glitch*.sft',
theta_prior=theta_prior, tref=tref, tstart=tstart, tend=tend,
nsteps=nsteps, nwalkers=nwalkers, ntemps=ntemps, betas=betas,
scatter_val=1e-6)
nsteps=nsteps, nwalkers=nwalkers, ntemps=ntemps,
log10temperature_min=log10temperature_min, scatter_val=1e-6)
mcmc.run()
mcmc.plot_corner(add_prior=True)
mcmc.print_summary()
......@@ -28,7 +28,7 @@ nwalkers = 500
nsteps = [1000, 1000, 1000]
mcmc = pyfstat.MCMCGlitchSearch(
'semi_coherent_glitch_search', 'data', sftlabel='glitch', sftdir='data',
'semi_coherent_glitch_search', 'data', sftfilepath='data/*_glitch*sft',
theta_prior=theta_prior, tref=tref, tstart=tstart, tend=tend,
nsteps=nsteps, nwalkers=nwalkers, scatter_val=1e-10, nglitch=1)
......
......@@ -28,8 +28,8 @@ nwalkers = 100
nsteps = [500, 500, 500]
mcmc = pyfstat.MCMCGlitchSearch(
'semi_coherent_twoglitch_search', 'data', sftlabel='twoglitch',
sftdir='data', theta_prior=theta_prior, tref=tref, tstart=tstart,
'semi_coherent_twoglitch_search', 'data', sftfilepath='data/*twoglitch*sft',
theta_prior=theta_prior, tref=tref, tstart=tstart,
tend=tend, nsteps=nsteps, nwalkers=nwalkers, scatter_val=1e-10, nglitch=2)
mcmc.run()
......
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