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
620b8f5a
Commit
620b8f5a
authored
Oct 21, 2016
by
Gregory Ashton
Browse files
Incomplete work on updating the docs for fc search on glitching data
parent
967e1f7d
Changes
7
Hide whitespace changes
Inline
Side-by-side
docs/fully_coherent_search_using_MCMC.md
View file @
620b8f5a
...
...
@@ -2,8 +2,8 @@
In this example, we will show the basics of setting up and running a MCMC
search for a fully-coherent search. This is based on the example
[
fully_coherent_search.py
](
../example/fully_coherent_search
.py
)
. We will run
the search on the
`basic`
data generated in the
[
fully_coherent_search
_using_MCMC
.py
](
../example/fully_coherent_search
_using_MCMC.py
)
.
We will run
the search on the
`basic`
data generated in the
[
make_fake_data
](
make_fake_data.md
)
example.
First, we need to import the search tool, in this example we will use the
...
...
@@ -83,7 +83,7 @@ mcmc.run()
This produces two
`.png`
images. The first is the position of the
*walkers*
during the simulation:


This shows (in red) the position of the walkers during the burn-in stage. They
are initially defuse (they start from positions randomly picked from the prior),
but eventually converge to a single stable solution. The black is the production
...
...
@@ -99,7 +99,7 @@ To get posteriors, we call
mcmc
.
plot_corner
()
```
which produces a corner plot


illustrating the tightly constrained posteriors on
`F0`
and
`F1`
and their
covariance. Furthermore, one may wish to get a summary which can be printed
to the terminal via
...
...
docs/fully_coherent_search_on_glitching_data.md
→
docs/fully_coherent_search_
using_MCMC_
on_glitching_data.md
View file @
620b8f5a
# Fully coherent search on glitching data using MCMC
This example applies the basic
[
fully coherent
search
](
fully_coherent_search.md
)
, to the glitching signal data set created in
search
using MCMC
](
fully_coherent_search
_using_MCMC
.md
)
, to the glitching signal data set created in
[
make fake data
](
make_fake_data.md]
)
. The aim here is to illustrate the effect
such a signal can have on a fully-coherent search. The complete script for this
example canbe found
...
...
docs/img/fully_coherent_on_glitching_data_corner.png
deleted
100644 → 0
View file @
967e1f7d
163 KB
docs/img/semi_coherent_glitch_search_corner.png
deleted
100644 → 0
View file @
967e1f7d
190 KB
docs/img/semi_coherent_two_glitch_search_corner.png
deleted
100644 → 0
View file @
967e1f7d
373 KB
examples/fully_coherent_search_on_glitching_data.py
→
examples/fully_coherent_search_
using_MCMC_
on_glitching_data.py
View file @
620b8f5a
from
pyfstat
import
MCMCSearch
import
numpy
as
np
F0
=
30.0
F1
=
-
1e-10
...
...
@@ -12,9 +11,8 @@ tstart = 1000000000
duration
=
100
*
86400
tend
=
tstart
+
duration
theta_prior
=
{
'F0'
:
{
'type'
:
'unif'
,
'lower'
:
F0
-
5e-5
,
'upper'
:
F0
+
5e-5
},
'F1'
:
{
'type'
:
'norm'
,
'loc'
:
F1
,
'scale'
:
abs
(
1e-6
*
F1
)},
theta_prior
=
{
'F0'
:
{
'type'
:
'unif'
,
'lower'
:
F0
-
1e-4
,
'upper'
:
F0
+
1e-4
},
'F1'
:
{
'type'
:
'unif'
,
'lower'
:
F1
*
(
1
+
1e-3
),
'upper'
:
F1
*
(
1
-
1e-3
)},
'F2'
:
F2
,
'Alpha'
:
Alpha
,
'Delta'
:
Delta
...
...
@@ -25,11 +23,11 @@ log10temperature_min = -30
nwalkers
=
500
nsteps
=
[
100
,
100
,
100
]
mcmc
=
MCMCSearch
(
'fully_coherent_on_glitching_data'
,
'data'
,
mcmc
=
MCMCSearch
(
'fully_coherent_
search_using_MCMC_
on_glitching_data'
,
'data'
,
sftfilepath
=
'data/*_glitch*.sft'
,
theta_prior
=
theta_prior
,
tref
=
tref
,
tstart
=
tstart
,
tend
=
tend
,
nsteps
=
nsteps
,
nwalkers
=
nwalkers
,
ntemps
=
ntemps
,
log10temperature_min
=
log10temperature_min
,
scatter_val
=
1e-6
)
log10temperature_min
=
log10temperature_min
)
mcmc
.
run
()
mcmc
.
plot_corner
(
add_prior
=
True
)
mcmc
.
print_summary
()
examples/make_fake_data.py
View file @
620b8f5a
...
...
@@ -27,7 +27,7 @@ data.make_data()
# Next, taking the same signal parameters, we include a glitch half way through
dtglitch
=
duration
/
2.0
delta_F0
=
0.
4e-5
delta_F0
=
4e-5
delta_F1
=
0
glitch_data
=
Writer
(
...
...
@@ -45,7 +45,7 @@ print data.predict_fstat()
dtglitch
=
[
duration
/
4.0
,
4
*
duration
/
5.0
]
delta_phi
=
[
0
,
0
]
delta_F0
=
[
0.
4e-
5
,
0.
3e-
6
]
delta_F0
=
[
4e-
6
,
3e-
7
]
delta_F1
=
[
0
,
0
]
delta_F2
=
[
0
,
0
]
...
...
Write
Preview
Supports
Markdown
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