diff --git a/PTMCMCSampler/PTMCMCSampler.py b/PTMCMCSampler/PTMCMCSampler.py index a59c46c..4dbb6a7 100755 --- a/PTMCMCSampler/PTMCMCSampler.py +++ b/PTMCMCSampler/PTMCMCSampler.py @@ -179,7 +179,7 @@ def initialize( self.neff = neff self.tstart = 0 - N = int(maxIter / thin) + N = int(np.ceil(maxIter / thin)) self._lnprob = np.zeros(N) self._lnlike = np.zeros(N) @@ -710,9 +710,9 @@ def temperatureLadder(self, Tmin, Tmax=None, tstep=None): def _writeToFile(self, iter): """ - Function to write chain file. File has 3+ndim columns, - the first is log-posterior (unweighted), log-likelihood, - and acceptance probability, followed by parameter values. + Function to write chain file. File has ndim+4 columns, + appended to the parameter values are log-posterior (unnormalized), + log-likelihood, acceptance rate, and PT acceptance rate. @param iter: Iteration of sampler