diff --git a/geobipy/src/inversion/Inference1D.py b/geobipy/src/inversion/Inference1D.py index 815b9420..447c8d37 100644 --- a/geobipy/src/inversion/Inference1D.py +++ b/geobipy/src/inversion/Inference1D.py @@ -1146,7 +1146,6 @@ def fromHdf(cls, hdfFile, index=None, fiducial=None): s = s_[index, :] self.nSystems = array(hdfFile.get('nsystems')) - self.acceptance_x = hdfRead.readKeyFromFile(hdfFile, '', '/', 'ratex') key = 'iteration' if 'iteration' in hdfFile else 'i' self.iteration = hdfRead.readKeyFromFile(hdfFile, '', '/', key, index=index) @@ -1160,6 +1159,10 @@ def fromHdf(cls, hdfFile, index=None, fiducial=None): key = 'acceptance_rate' if 'acceptance_rate' in hdfFile else 'rate' self.acceptance_rate = hdfRead.readKeyFromFile(hdfFile, '', '/', key, index=s) + # Compute the x axis for acceptance since its every X iterations. + n = 2 * int32(self.n_markov_chains / self.update_plot_every) + self.acceptance_x = StatArray.StatArray(arange(1, n + 1) * self.update_plot_every, name='Iteration #') + self.best_datapoint = self.datapoint self.data_misfit_v = hdfRead.readKeyFromFile(hdfFile, '', '/', 'phids', index=s)