Skip to content
Snippets Groups Projects
Commit 4cd917c7 authored by Gregory Ashton's avatar Gregory Ashton
Browse files

Minor polishing to follow-up method

- Adds labels of each stage along the top
- Fixes bug when re-running
- Improves column title of run_setup table
parent 827d72a2
No related branches found
No related tags found
No related merge requests found
......@@ -1874,7 +1874,8 @@ class MCMCFollowUpSearch(MCMCSemiCoherentSearch):
d = dict(nwalkers=self.nwalkers, ntemps=self.ntemps,
theta_keys=self.theta_keys, theta_prior=self.theta_prior,
log10beta_min=self.log10beta_min,
BSGL=self.BSGL, run_setup=self.run_setup)
BSGL=self.BSGL, minStartTime=self.minStartTime,
maxStartTime=self.maxStartTime, run_setup=self.run_setup)
return d
def update_search_object(self):
......@@ -2001,7 +2002,7 @@ class MCMCFollowUpSearch(MCMCSemiCoherentSearch):
f.write(r'\begin{tabular}{c|ccc}' + '\n')
f.write(r'Stage & $N_\mathrm{seg}$ &'
r'$T_\mathrm{coh}^{\rm days}$ &'
r'$\mathcal{N}^*$ \\ \hline'
r'$\mathcal{N}^*(\Nseg^{(\ell)}, \Delta\mathbf{\lambda}^{(0)})$ \\ \hline'
'\n')
for i, rs in enumerate(run_setup):
Tcoh = float(
......@@ -2107,6 +2108,19 @@ class MCMCFollowUpSearch(MCMCSemiCoherentSearch):
nsteps_total += nburn+nprod
if create_plots:
nstep_list = np.array(
[el[0][0] for el in run_setup] + [run_setup[-1][0][1]])
mids = np.cumsum(nstep_list) - nstep_list/2
mid_labels = ['{:1.0f}'.format(i) for i in np.arange(0, len(mids)-1)]
mid_labels += ['Production']
for ax in axes[:self.ndim]:
axy = ax.twiny()
axy.tick_params(pad=6, axis='x', which='major')
axy.set_xlim(ax.get_xlim())
axy.set_xticks(mids)
axy.set_xticklabels(mid_labels)
samples = sampler.chain[0, :, nburn:, :].reshape((-1, self.ndim))
lnprobs = sampler.logprobability[0, :, nburn:].reshape((-1))
lnlikes = sampler.loglikelihood[0, :, nburn:].reshape((-1))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment