Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
P
PyFstat
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 0
    • Merge Requests 0
  • Operations
    • Operations
    • Incidents
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
  • Gregory Ashton
  • PyFstat
  • Wiki
    • Docs
  • fully coherent search using MCMC on glitching data

Last edited by Gregory Ashton Apr 03, 2017
Page history

fully coherent search using MCMC on glitching data

Fully coherent search on glitching data using MCMC

This example applies the basic fully coherent search using MCMC, to the glitching signal data set created in make fake data. 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 here.

After importing pyfstat, We setup a flat prior on F0 and F1, based on the values used to generate the signal:

from pyfstat import MCMCSearch

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': '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
               }

In this search, we will use paralllel tempering (to help the walkers move between the different peaks in the posterior).

ntemps = 2
log10temperature_min = -0.01
nwalkers = 100
nsteps = [500, 500]

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)
mcmc.run()
mcmc.plot_corner(add_prior=True)

Running this example, we obtain traces of the walkers like this:

Although it is not obvious at first, the large widths of these traces in fact show that the walkers are jumping between multiple peaks (for both F0 and `F1): this is possible, due to the tuning of the parallel tempering. To see this clearly, we also plot the corner plot:

From this corner plot, we that unlike the in the single glitch fully-coherent search, the posterior, even after a large number of steps, is multimodal. However, these two peaks do not correspond exactly to the two frequencies before and after the glitch, which would be 30 and 30+4e5 (to see this, see how the data is generated). This is partly due to the noise and partly due to the fact that the maximum detection statistic in the case of glitches can occur at point in between the two frequencies. Moreover, we see bimodality in F1, which did does not change during the glitch.

>>> mcmc.print_summary()
Max twoF: 422.97

That is, compared to the basic search (on a smooth signal) which had a twoF of ~1764 (in agreement with the predicted twoF), we have lost a large fraction of the SNR due to the glitch.

Clone repository
  • docs
    • file formats used by pyfstat
    • follow up
    • fully coherent search using MCMC on glitching data
    • fully coherent search using MCMC
    • glitch robust search
    • make fake data
    • prior specification
    • semi coherent glitch search using MCMC on glitching data
    • semi coherent glitch search with two glitches using MCMC on glitching data
    • transient search using MCMC
    • tuning parameters
  • Home