From c3c6c5f154cefc6746261535c695ed7a5e085d39 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 3 Mar 2023 20:50:56 -0500 Subject: [PATCH] python2 compatibility (or rather scipy of python2) and avoid NaNs --- tools/tabulate/pair_bi_tabulate.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/tabulate/pair_bi_tabulate.py b/tools/tabulate/pair_bi_tabulate.py index 5d225ce6fc..615f7db14f 100755 --- a/tools/tabulate/pair_bi_tabulate.py +++ b/tools/tabulate/pair_bi_tabulate.py @@ -69,11 +69,11 @@ class BI(PairTabulate): # savgol_filter is an example of smoothing. # Other filters/functions can be used. - g = savgol_filter(g, 10, 5) + g = savgol_filter(g, 9, 5) return self.inversion(r, g) def inversion(self, r, g): - e = -self.kbT * np.log(g) + e = -self.kbT * np.log(np.clip(g,1.0e-100,1.0e100)) e = self.complete_exponential(r, e) return r, e,