Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Gregory Ashton
PyFstat
Commits
f0b06a90
Commit
f0b06a90
authored
Oct 03, 2016
by
Gregory Ashton
Browse files
Updates all examples and existing docs to lates user interface
parent
87604fa0
Changes
6
Hide whitespace changes
Inline
Side-by-side
docs/fully_coherent_search.md
View file @
f0b06a90
...
...
@@ -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
`sft
label`
and
`sftdir`
which defines
which
data to use in the search
directory to save the data and provide
`sft
filepath`
, a string matching
the
data to use in the search
```
mcmc = MCMCSearch('fully_coherent', 'data', sft
label='basic', sftdir='data
',
mcmc = MCMCSearch('fully_coherent', 'data', sft
filepath='data/*basic*sft
',
theta_prior=theta_prior, tref=tref, tstart=tstart, tend=tend,
nsteps=nsteps, nwalkers=nwalkers, ntemps=ntemps,
scatter_val=1e-10)
...
...
docs/fully_coherent_search_on_glitching_data.md
View file @
f0b06a90
...
...
@@ -47,11 +47,10 @@ nwalkers = 500
nsteps = [100, 100, 100]
mcmc = MCMCSearch('fully_coherent_on_glitching_data', 'data',
sft
label='glitch', sftdir='data
',
sft
filepath='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)
```
...
...
examples/fully_coherent_search.py
View file @
f0b06a90
...
...
@@ -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'
,
sft
label
=
'basic'
,
sftdir
=
'data
'
,
mcmc
=
MCMCSearch
(
'fully_coherent'
,
'data'
,
sft
filepath
=
'data/*basic*sft
'
,
theta_prior
=
theta_prior
,
tref
=
tref
,
tstart
=
tstart
,
tend
=
tend
,
nsteps
=
nsteps
,
nwalkers
=
nwalkers
,
ntemps
=
ntemps
,
scatter_val
=
1e-10
)
...
...
examples/fully_coherent_search_on_glitching_data.py
View file @
f0b06a90
...
...
@@ -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'
,
sft
label
=
'glitch'
,
sftdir
=
'data
'
,
sft
filepath
=
'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
()
examples/semi_coherent_glitch_search.py
View file @
f0b06a90
...
...
@@ -28,7 +28,7 @@ nwalkers = 500
nsteps
=
[
1000
,
1000
,
1000
]
mcmc
=
pyfstat
.
MCMCGlitchSearch
(
'semi_coherent_glitch_search'
,
'data'
,
sft
label
=
'glitch'
,
sftdir
=
'data
'
,
'semi_coherent_glitch_search'
,
'data'
,
sft
filepath
=
'data/*_glitch*sft
'
,
theta_prior
=
theta_prior
,
tref
=
tref
,
tstart
=
tstart
,
tend
=
tend
,
nsteps
=
nsteps
,
nwalkers
=
nwalkers
,
scatter_val
=
1e-10
,
nglitch
=
1
)
...
...
examples/semi_coherent_twoglitch_search.py
View file @
f0b06a90
...
...
@@ -28,8 +28,8 @@ nwalkers = 100
nsteps
=
[
500
,
500
,
500
]
mcmc
=
pyfstat
.
MCMCGlitchSearch
(
'semi_coherent_twoglitch_search'
,
'data'
,
sft
label
=
'
twoglitch'
,
sftdir
=
'data'
,
theta_prior
=
theta_prior
,
tref
=
tref
,
tstart
=
tstart
,
'semi_coherent_twoglitch_search'
,
'data'
,
sft
filepath
=
'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
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment