Skip to content
Snippets Groups Projects
Select Git revision
  • 0624fc7e66ae71427aea08df6d44103a7b0da578
  • master default protected
  • Binary
  • add-version-information
  • os-path-join
  • develop-GA
  • timeFstatmap
  • add-higher-spindown-components
  • develop-DK
  • adds-header-to-grid-search
  • v1.3
  • v1.2
  • v1.1.2
  • v1.1.0
  • v1.0.1
15 results

semi_coherent_search_using_MCMC.py

Blame
  • Forked from Gregory Ashton / PyFstat
    442 commits behind the upstream repository.
    Gregory Ashton's avatar
    Gregory Ashton authored
    - Also changes the parameter vector in the normal fully coherent search
      to remove the tstart and tend. This is done by wrappin the
      run_computefstatistic_single_point in a compute_fullycoherent_det_stat
      function
    - Removes theta0 from the saved data dict for the MCMCSearch
    - Adds example usage of the semi-coherent search
    0624fc7e
    History
    semi_coherent_search_using_MCMC.py 891 B
    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': 'unif', 'lower': F0*(1-1e-6), 'upper': F0*(1+1e-5)},
                   'F1': {'type': 'unif', 'lower': F1*(1+1e-2), 'upper': F1*(1-1e-2)},
                   'F2': F2,
                   'Alpha': Alpha,
                   'Delta': Delta
                   }
    
    ntemps = 1
    log10temperature_min = -1
    nwalkers = 100
    nsteps = [500, 500, 500]
    
    mcmc = pyfstat.MCMCSemiCoherentSearch(
        label='semi_coherent_search_using_MCMC', outdir='data', nsegs=20,
        sftfilepath='data/*basic*sft', theta_prior=theta_prior, tref=tref,
        minStartTime=tstart, maxStartTime=tend, nsteps=nsteps, nwalkers=nwalkers,
        ntemps=ntemps, log10temperature_min=log10temperature_min)
    mcmc.run()
    mcmc.plot_corner(add_prior=True)
    mcmc.print_summary()