From 5fb7f9459b8bd79923f9c0ec649e016d1cbc9217 Mon Sep 17 00:00:00 2001 From: "gregory.ashton" <gregory.ashton@ligo.org> Date: Fri, 18 Aug 2017 14:11:58 +0200 Subject: [PATCH] Adds autocorr_time to saved data --- pyfstat/mcmc_based_searches.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pyfstat/mcmc_based_searches.py b/pyfstat/mcmc_based_searches.py index 649e1c8..96a601e 100644 --- a/pyfstat/mcmc_based_searches.py +++ b/pyfstat/mcmc_based_searches.py @@ -361,9 +361,11 @@ class MCMCSearch(core.BaseSearchClass): logging.info("Tswap acceptance fraction: {}" .format(sampler.tswap_acceptance_fraction)) try: + self.autocorr_time = sampler.get_autocorr_time(c=4) logging.info("Autocorrelation length: {}".format( - sampler.get_autocorr_time(c=5))) + self.autocorr_time)) except emcee.autocorr.AutocorrError as e: + self.autocorr_time = np.nan logging.warning( 'Autocorrelation calculation failed with message {}'.format(e)) -- GitLab