From 40a6118d07ac30beec3263883cbb902600dc8e28 Mon Sep 17 00:00:00 2001
From: Gregory Ashton <gregory.ashton@ligo.org>
Date: Sun, 13 May 2018 18:03:37 +1000
Subject: [PATCH] Make the returned prior explicit

Functionally, this changes nothing, but it makes it clear that the
filled priors are the dictionary `priors`.
---
 tupak/prior.py   | 2 ++
 tupak/sampler.py | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/tupak/prior.py b/tupak/prior.py
index d0fd5a7f8..fec2d9579 100644
--- a/tupak/prior.py
+++ b/tupak/prior.py
@@ -449,6 +449,8 @@ def fill_priors(prior, waveform_generator):
     for key in bad_keys:
         prior.pop(key)
 
+    return prior
+
 
 def write_priors_to_file(priors, outdir):
     """
diff --git a/tupak/sampler.py b/tupak/sampler.py
index 3b4af657b..85d25c6bb 100644
--- a/tupak/sampler.py
+++ b/tupak/sampler.py
@@ -398,7 +398,7 @@ def run_sampler(likelihood, priors=None, label='label', outdir='outdir',
 
     if priors is None:
         priors = dict()
-    fill_priors(priors, likelihood.waveform_generator)
+    priors = fill_priors(priors, likelihood.waveform_generator)
     tupak.prior.write_priors_to_file(priors, outdir)
 
     if implemented_samplers.__contains__(sampler.title()):
-- 
GitLab