diff --git a/README.md b/README.md index d33c59682d4fd09081af015f64e2f732c3b43e2e..60152e7effb4a58fb6bcfc23e51a9f73c055a276 100644 --- a/README.md +++ b/README.md @@ -12,8 +12,10 @@ output which we list below. Before running any of the search examples, be sure to have run the [script to generate fake data](examples/make_fake_data.py). * [Making fake data with and without glitches](docs/make_fake_data.md) -* [Fully coherent MCMC search](docs/fully_coherent_search_using_MCMC.md) -* [Fully coherent MCMC search on data containing glitching signals](docs/fully_coherent_search_using_MCMC_on_glitching_data.md) +* [Fully-coherent MCMC search](docs/fully_coherent_search_using_MCMC.md) +* [Fully-coherent MCMC search on data containing a single glitch](docs/fully_coherent_search_using_MCMC_on_glitching_data.md) +* [Semi-coherent MCMC glitch-search on data containing a single glitch](docs/semi_coherent_glitch_search_using_MCMC_on_glitching_data.md) +* [Semi-coherent MCMC glitch-search on data containing two glitches](docs/semi_coherent_glitch_search_with_two_glitches_using_MCMC_on_glitching_data.md) ## Installation diff --git a/docs/semi_coherent_glitch_search_using_MCMC_on_glitching_data.md b/docs/semi_coherent_glitch_search_using_MCMC_on_glitching_data.md index cb376e898206d0be77b1751ebda292d93bea1389..d0f50254b175c4895dac0dc0335b980c65dd6dce 100644 --- a/docs/semi_coherent_glitch_search_using_MCMC_on_glitching_data.md +++ b/docs/semi_coherent_glitch_search_using_MCMC_on_glitching_data.md @@ -55,5 +55,9 @@ mcmc.plot_corner(add_prior=True) mcmc.print_summary() ``` -The posterior for this search demonstrates that we recover the input parameters: - +The output png's for the initialisation and burnin/production steps: + + + +and the final posterior estimates: + diff --git a/docs/semi_coherent_glitch_search_with_two_glitches_using_MCMC_on_glitching_data.md b/docs/semi_coherent_glitch_search_with_two_glitches_using_MCMC_on_glitching_data.md index 10eca7ae9c38e330e02a62a69cb6c7f20e302419..878910d11202d6144c73fed61d45bcfa8f0e9f7a 100644 --- a/docs/semi_coherent_glitch_search_with_two_glitches_using_MCMC_on_glitching_data.md +++ b/docs/semi_coherent_glitch_search_with_two_glitches_using_MCMC_on_glitching_data.md @@ -1,4 +1,51 @@ # Semi-coherent glitch search on data with two-glitches using MCMC +In this example, based on [this +script](../examples/semi_coherent_twoglitch_search_using_MCMC.py), we show the +basic setup for a two-glitch search. We begin by defining the prior: + +```python +import pyfstat + +F0 = 30.0 +F1 = -1e-10 +F2 = 0 +Alpha = 5e-3 +Delta = 6e-2 +tref = 362750407.0 + +tstart = 1000000000 +duration = 100*86400 +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)}, + 'F2': F2, + 'Alpha': Alpha, + 'Delta': Delta, + 'delta_F0_0': {'type': 'halfnorm', 'loc': 0, + 'scale': 1e-7*F0}, + 'delta_F0_1': {'type': 'halfnorm', 'loc': 0, + 'scale': 1e-7*F0}, + 'delta_F1_0': 0, + 'delta_F1_1': 0, + 'tglitch_0': {'type': 'unif', + 'lower': tstart+0.01*duration, + 'upper': tstart+0.5*duration}, + 'tglitch_1': {'type': 'unif', + 'lower': tstart+0.5*duration, + 'upper': tstart+0.99*duration}, + } + +``` + +Note that, in this case, we define a prior for each of the two glitches. +Alternatively, one can provide a prior (with no indexing) which is applied to +all glitches. The sampler has a prior specification to sort the glitches such +that `tglitch_0 < tglitch_1 < ...`. + +The outputs plots: + +   diff --git a/examples/semi_coherent_twoglitch_search.py b/examples/semi_coherent_twoglitch_search_using_MCMC.py similarity index 100% rename from examples/semi_coherent_twoglitch_search.py rename to examples/semi_coherent_twoglitch_search_using_MCMC.py