Skip to content
Snippets Groups Projects
Commit 620b8f5a authored by Gregory Ashton's avatar Gregory Ashton
Browse files

Incomplete work on updating the docs for fc search on glitching data

parent 967e1f7d
No related branches found
No related tags found
No related merge requests found
......@@ -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:
![](img/fully_coherent_using_MCMC_walkers.png)
![](img/fully_coherent_search_using_MCMC_walkers.png)
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
![](img/fully_coherent_using_MCMC_corner.png)
![](img/fully_coherent_search_using_MCMC_corner.png)
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
......
# 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

163 KiB

docs/img/semi_coherent_glitch_search_corner.png

190 KiB

docs/img/semi_coherent_two_glitch_search_corner.png

373 KiB

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()
......@@ -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]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment