diff --git a/pyfstat/mcmc_based_searches.py b/pyfstat/mcmc_based_searches.py index cf548a97a3b5e61465c829eb49f8e050ffce98ca..dacfbe016495f944e40660f26a8c52e74a427e3d 100644 --- a/pyfstat/mcmc_based_searches.py +++ b/pyfstat/mcmc_based_searches.py @@ -638,7 +638,7 @@ class MCMCSearch(BaseSearchClass): raise ValueError("dist_type {} unknown".format(dist_type)) def plot_walkers(self, sampler, symbols=None, alpha=0.4, color="k", temp=0, - lw=0.1, nprod=None, add_det_stat_burnin=False, + lw=0.1, nprod=0, add_det_stat_burnin=False, fig=None, axes=None, xoffset=0, plot_det_stat=True, context='classic', subtractions=None, labelpad=0.05): """ Plot all the chains from a sampler """ diff --git a/tests.py b/tests.py index 64d19658191dd541bbd19405c483eb36997e7060..69e332025a69edf266e7f71f8ae4f496e84a59cc 100644 --- a/tests.py +++ b/tests.py @@ -232,6 +232,21 @@ class TestMCMCSearch(Test): self.assertTrue( FS > predicted_FS or np.abs((FS-predicted_FS))/predicted_FS < 0.3) + def test_multi_stage(self): + Writer = pyfstat.Writer() + Writer.make_cff() + + theta = {'F0': {'type': 'norm', 'loc': 10, 'scale': 1e-2}, + 'F1': 0, 'F2': 0, 'Alpha': 0, 'Delta': 0} + + search = pyfstat.MCMCSearch( + label=self.label, outdir=outdir, theta_prior=theta, + tref=Writer.tref, injectSources=Writer.config_file_name, + minStartTime=Writer.minStartTime, maxStartTime=Writer.maxStartTime, + nsteps=[5, 5], nwalkers=20, ntemps=1, detectors='H1', + minCoverFreq=9, maxCoverFreq=11) + search.run(create_plots=False) + class TestAuxillaryFunctions(Test): nsegs = 10