Skip to content

Commit

Permalink
add small error so we don't take log of 0
Browse files Browse the repository at this point in the history
  • Loading branch information
Joshwani committed Feb 19, 2024
1 parent 2055170 commit 8427f04
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lppls/lppls.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit 8427f04

Please sign in to comment.