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

Basic timing model printout - incorrect

parent 5fb7f945
No related branches found
No related tags found
No related merge requests found
...@@ -371,6 +371,17 @@ class MCMCSearch(core.BaseSearchClass): ...@@ -371,6 +371,17 @@ class MCMCSearch(core.BaseSearchClass):
return sampler return sampler
def _estimate_run_time(self):
tau0S = 2.7e-8
tau0LD = 1.6e-7
Nsfts = (self.maxStartTime - self.minStartTime) / 1800.
average_numb_evals = np.sum(self.nsteps)*self.nwalkers*self.ntemps
a = tau0S * Nsfts * average_numb_evals
b = tau0LD * Nsfts * average_numb_evals
print(a, b, Nsfts)
logging.info('Estimated run-time = {} s = {:1.0f}:{:1.0f} m'.format(
a+b, *divmod(a+b, 60)))
def run(self, proposal_scale_factor=2, create_plots=True, c=5, **kwargs): def run(self, proposal_scale_factor=2, create_plots=True, c=5, **kwargs):
""" Run the MCMC simulatation """ Run the MCMC simulatation
...@@ -404,6 +415,7 @@ class MCMCSearch(core.BaseSearchClass): ...@@ -404,6 +415,7 @@ class MCMCSearch(core.BaseSearchClass):
return return
self._initiate_search_object() self._initiate_search_object()
self._estimate_run_time()
sampler = emcee.PTSampler( sampler = emcee.PTSampler(
self.ntemps, self.nwalkers, self.ndim, self.logl, self.logp, self.ntemps, self.nwalkers, self.ndim, self.logl, self.logp,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment