Commit 07290f73 authored by Gregory Ashton's avatar Gregory Ashton Committed by Moritz Huebner
Browse files

Resolve "Failure to create dynesty run plot at checkpoint"

parent 0140d1e7
...@@ -433,6 +433,8 @@ class Dynesty(NestedSampler): ...@@ -433,6 +433,8 @@ class Dynesty(NestedSampler):
sampler_kwargs['add_live'] = True sampler_kwargs['add_live'] = True
self._run_nested_wrapper(sampler_kwargs) self._run_nested_wrapper(sampler_kwargs)
return self.sampler.results return self.sampler.results
def _remove_checkpoint(self): def _remove_checkpoint(self):
...@@ -577,7 +579,8 @@ class Dynesty(NestedSampler): ...@@ -577,7 +579,8 @@ class Dynesty(NestedSampler):
plt.close("all") plt.close("all")
try: try:
filename = "{}/{}_checkpoint_run.png".format(self.outdir, self.label) filename = "{}/{}_checkpoint_run.png".format(self.outdir, self.label)
fig, axs = dyplot.runplot(self.sampler.results) fig, axs = dyplot.runplot(
self.sampler.results, logplot=False, use_math_text=False)
fig.tight_layout() fig.tight_layout()
plt.savefig(filename) plt.savefig(filename)
except (RuntimeError, np.linalg.linalg.LinAlgError, ValueError) as e: except (RuntimeError, np.linalg.linalg.LinAlgError, ValueError) as e:
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment