Commit 629667a3 authored by Gregory Ashton's avatar Gregory Ashton
Browse files

Fix multi-stage set-up when using convergence testing (adds test)

parent 90df76df
......@@ -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 """
......@@ -232,6 +232,21 @@ class TestMCMCSearch(Test):
FS > predicted_FS or np.abs((FS-predicted_FS))/predicted_FS < 0.3)
def test_multi_stage(self):
Writer = pyfstat.Writer()
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)
class TestAuxillaryFunctions(Test):
nsegs = 10
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment