Skip to content
Snippets Groups Projects
Commit e743c84a authored by Gregory Ashton's avatar Gregory Ashton
Browse files

Add a check that the outdir exists to plot_trace

Solves a bug where run will crash if plot=True using dynesty and the
outdir had not previously been made.
parent 8bf37565
No related branches found
No related tags found
1 merge request!287Add a check that the outdir exists to plot_trace
Pipeline #39415 passed
......@@ -393,6 +393,7 @@ class Dynesty(NestedSampler):
self.sampler.saved_scale = [self.sampler.saved_scale[-1]]
def generate_trace_plots(self, dynesty_results):
check_directory_exists_and_if_not_mkdir(self.outdir)
filename = '{}/{}_trace.png'.format(self.outdir, self.label)
logger.debug("Writing trace plot to {}".format(filename))
from dynesty import plotting as dyplot
......
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