From dcc68beeba118055c47b0cbc1452b451152f907c Mon Sep 17 00:00:00 2001 From: Gregory Ashton <gregory.ashton@ligo.org> Date: Tue, 15 Aug 2017 13:51:47 +0200 Subject: [PATCH] Fixes Issue #3 --- pyfstat/mcmc_based_searches.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pyfstat/mcmc_based_searches.py b/pyfstat/mcmc_based_searches.py index e2836b1..f16ff82 100644 --- a/pyfstat/mcmc_based_searches.py +++ b/pyfstat/mcmc_based_searches.py @@ -266,7 +266,7 @@ class MCMCSearch(core.BaseSearchClass): if test_type in ['autocorr']: self._get_convergence_test = self.test_autocorr_convergence elif test_type in ['GR']: - self._get_convergence_test= self.test_GR_convergence + self._get_convergence_test = self.test_GR_convergence else: raise ValueError('test_type {} not understood'.format(test_type)) @@ -282,6 +282,10 @@ class MCMCSearch(core.BaseSearchClass): acors[temp, :] = emcee.autocorr.exponential_time(x) c = np.max(acors, axis=0) except emcee.autocorr.AutocorrError: + logging.info('Failed to calculate exponential autocorrelation') + c = np.zeros(self.ndim) + np.nan + except AttributeError: + logging.info('Unable to calculate exponential autocorrelation') c = np.zeros(self.ndim) + np.nan self.convergence_diagnosticx.append(i - self.convergence_n/2.) -- GitLab