Skip to content
Snippets Groups Projects
Select Git revision
  • f7a0a77eb0390291d6043d085a996f2f4ba4cb59
  • master default protected
  • develop-GA
  • timeFstatmap
  • add-higher-spindown-components
  • develop-DK
  • adds-header-to-grid-search
  • v1.2
  • v1.1.2
  • v1.1.0
  • v1.0.1
11 results

fully_coherent_search_using_MCMC_on_glitching_data.py

Blame
  • Forked from Gregory Ashton / PyFstat
    Source project has a limited visibility.
    • Gregory Ashton's avatar
      89f200ed
      Renames sftfilepath -> sftfilepattern · 89f200ed
      Gregory Ashton authored
      This renames the input sftfilepath to sftfilepattern and adds
      documentation on how that should be used, i.e. a colon separated list of
      wildstring or exact matches. In globbing for all matches, the colon
      split is added in. sftfilepath is still used by `Writer` since
      an exact path is known.
      89f200ed
      History
      Renames sftfilepath -> sftfilepattern
      Gregory Ashton authored
      This renames the input sftfilepath to sftfilepattern and adds
      documentation on how that should be used, i.e. a colon separated list of
      wildstring or exact matches. In globbing for all matches, the colon
      split is added in. sftfilepath is still used by `Writer` since
      an exact path is known.
    fully_coherent_search_using_MCMC_on_glitching_data.py 984 B
    import numpy as np
    from pyfstat import MCMCSearch
    
    F0 = 30.0
    F1 = -1e-10
    F2 = 0
    Alpha = np.radians(83.6292)
    Delta = np.radians(22.0144)
    
    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
                   }
    
    ntemps = 2
    log10temperature_min = -0.01
    nwalkers = 100
    nsteps = [500, 500]
    
    mcmc = MCMCSearch('fully_coherent_search_using_MCMC_on_glitching_data', 'data',
                      sftfilepattern='data/*_glitch*.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()