From aabd5b083f2814f0292774941ac13a4eec4d8bac Mon Sep 17 00:00:00 2001 From: Joshua Nielsen Date: Mon, 19 Feb 2024 10:37:48 -0700 Subject: [PATCH] add small error so we don't take log of 0 (#105) --- lppls/lppls.py | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lppls/lppls.py b/lppls/lppls.py index c46668a..1410133 100644 --- a/lppls/lppls.py +++ b/lppls/lppls.py @@ -614,7 +614,7 @@ def _is_D_in_range(self, m, w, b, c, D_min): return False if m <= 0 or w <= 0 else abs((m * b) / (w * c)) > D_min def get_oscillations(self, w, tc, t1, t2): - dt = np.abs(tc - t2) + dt = np.abs(tc - t2) + 1e-8 return (w / (2.0 * np.pi)) * np.log((tc - t1) / dt) def get_damping(self, m, w, b, c): diff --git a/setup.py b/setup.py index 733c525..ef134dd 100644 --- a/setup.py +++ b/setup.py @@ -4,7 +4,7 @@ long_description = fh.read() setuptools.setup(name='lppls', - version='0.6.14', + version='0.6.15', description='A Python module for fitting the LPPLS model to data.', packages=['lppls'], author='Josh Nielsen',