From 55896adc502bf59e93a0c7e61634e3aa08a2a57b Mon Sep 17 00:00:00 2001
From: Gregory Ashton <gregory.ashton@ligo.org>
Date: Thu, 4 Jun 2020 19:14:09 -0500
Subject: [PATCH] Minor fixes to the logger output

1) Print message when generating live points
2) Downgrade warning message to debug for returning random point
---
 bilby/core/sampler/base_sampler.py | 1 +
 bilby/core/sampler/dynesty.py      | 8 ++++----
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/bilby/core/sampler/base_sampler.py b/bilby/core/sampler/base_sampler.py
index 2ae872b33..74e880fbb 100644
--- a/bilby/core/sampler/base_sampler.py
+++ b/bilby/core/sampler/base_sampler.py
@@ -430,6 +430,7 @@ class Sampler(object):
             likelihood evaluations.
 
         """
+        logger.info("Generating initial points from the prior")
         unit_cube = []
         parameters = []
         likelihood = []
diff --git a/bilby/core/sampler/dynesty.py b/bilby/core/sampler/dynesty.py
index a89e8f55a..cdf584640 100644
--- a/bilby/core/sampler/dynesty.py
+++ b/bilby/core/sampler/dynesty.py
@@ -257,11 +257,11 @@ class Dynesty(NestedSampler):
         # Constructing output.
         string = []
         string.append("bound:{:d}".format(bounditer))
-        string.append("nc:{:d}".format(nc))
-        string.append("ncall:{:d}".format(ncall))
+        string.append("nc:{:3d}".format(nc))
+        string.append("ncall:{:.1e}".format(ncall))
         string.append("eff:{:0.1f}%".format(eff))
         string.append("{}={:0.2f}+/-{:0.2f}".format(key, logz, logzerr))
-        string.append("dlogz:{:0.3f}>{:0.2f}".format(delta_logz, dlogz))
+        string.append("dlogz:{:0.3f}>{:0.2g}".format(delta_logz, dlogz))
 
         self.pbar.set_postfix_str(" ".join(string), refresh=False)
         self.pbar.update(niter - self.pbar.n)
@@ -793,7 +793,7 @@ def sample_rwalk_bilby(args):
         v = v_list[idx]
         logl = logl_list[idx]
     else:
-        logger.warning("Unable to find a new point using walk: returning a random point")
+        logger.debug("Unable to find a new point using walk: returning a random point")
         u = np.random.uniform(size=n)
         v = prior_transform(u)
         logl = loglikelihood(v)
-- 
GitLab