Skip to content
Snippets Groups Projects
Commit 55854308 authored by Moritz Huebner's avatar Moritz Huebner
Browse files

Merge branch 'dynesty-unit-plot' into 'master'

Add dynesty unit plot

See merge request lscsoft/bilby!954
parents dcf90857 fd5315e1
No related branches found
No related tags found
1 merge request!954Add dynesty unit plot
Pipeline #224777 passed
......@@ -615,6 +615,19 @@ class Dynesty(NestedSampler):
logger.warning('Failed to create dynesty state plot at checkpoint')
finally:
plt.close("all")
try:
filename = "{}/{}_checkpoint_trace_unit.png".format(self.outdir, self.label)
from copy import deepcopy
temp = deepcopy(self.sampler.results)
temp["samples"] = temp["samples_u"]
fig = dyplot.traceplot(temp, labels=labels)[0]
fig.tight_layout()
fig.savefig(filename)
except (RuntimeError, np.linalg.linalg.LinAlgError, ValueError, OverflowError, Exception) as e:
logger.warning(e)
logger.warning('Failed to create dynesty unit state plot at checkpoint')
finally:
plt.close("all")
try:
filename = "{}/{}_checkpoint_run.png".format(self.outdir, self.label)
fig, axs = dyplot.runplot(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment