Commit cc79c29d authored by Gregory Ashton's avatar Gregory Ashton
Browse files

Remove obsolete outdir and label

parent 3a5771ef
......@@ -77,15 +77,14 @@ class Result(dict):
logging.debug("Unable to decode item")
return item
def get_result_dictionary(self):
return dict(self)
def save_to_file(self, outdir, label):
def save_to_file(self):
""" Writes the Result to a deepdish h5 file """
file_name = result_file_name(outdir, label)
if os.path.isdir(outdir) is False:
os.makedirs(outdir)
file_name = result_file_name(self.outdir, self.label)
if os.path.isdir(self.outdir) is False:
os.makedirs(self.outdir)
if os.path.isfile(file_name):
logging.info(
'Renaming existing file {} to {}.old'.format(file_name,
......
......@@ -526,7 +526,7 @@ def run_sampler(likelihood, priors=None, label='label', outdir='outdir',
# result.prior = prior # Removed as this breaks the saving of the data
result.samples_to_data_frame(likelihood=likelihood, priors=priors, conversion_function=conversion_function)
result.kwargs = sampler.kwargs
result.save_to_file(outdir=outdir, label=label)
result.save_to_file()
if plot:
result.plot_corner()
return result
......
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