diff --git a/batbot/__init__.py b/batbot/__init__.py index 585ce0a..a432684 100644 --- a/batbot/__init__.py +++ b/batbot/__init__.py @@ -33,7 +33,7 @@ from batbot import spectrogram # NOQA -VERSION = '0.1.3' +VERSION = '0.1.4' version = VERSION __version__ = VERSION diff --git a/batbot/spectrogram/__init__.py b/batbot/spectrogram/__init__.py index bf51efb..255c1fa 100644 --- a/batbot/spectrogram/__init__.py +++ b/batbot/spectrogram/__init__.py @@ -1114,9 +1114,11 @@ def extract_contour_keypoints( 'slope/mid[avg].y_px/x_px': float(np.mean(der1[knee_idx : heel_idx + 1])), 'slope/lo[avg].y_px/x_px': float(np.mean(der1[heel_idx:])), 'slope[box].y_px/x_px': -float((y_[-1] - y_[0]) / (x_[-1] - x_[0] + 1e-10)), - 'slope/hi[box].y_px/x_px': -float((y_[fc_idx] - y_[0]) / (x_[fc_idx] - x_[0] + 1e-10)), + 'slope/hi[box].y_px/x_px': -float( + (y_[knee_idx] - y_[0]) / (x_[knee_idx] - x_[0] + 1e-10) + ), 'slope/lo[box].y_px/x_px': -float( - (y_[-1] - y_[fc_idx]) / (x_[-1] - x_[fc_idx] + 1e-10) + (y_[fc_idx] - y_[knee_idx]) / (x_[fc_idx] - x_[knee_idx] + 1e-10) ), }