Skip to content

Commit 740cba2

Browse files
Merge pull request #42 from Kitware/tas/update_slopes
Updated slope definitions
2 parents 9f96c5f + 1c808dd commit 740cba2

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

batbot/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333

3434
from batbot import spectrogram # NOQA
3535

36-
VERSION = '0.1.3'
36+
VERSION = '0.1.4'
3737
version = VERSION
3838
__version__ = VERSION
3939

batbot/spectrogram/__init__.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1114,9 +1114,11 @@ def extract_contour_keypoints(
11141114
'slope/mid[avg].y_px/x_px': float(np.mean(der1[knee_idx : heel_idx + 1])),
11151115
'slope/lo[avg].y_px/x_px': float(np.mean(der1[heel_idx:])),
11161116
'slope[box].y_px/x_px': -float((y_[-1] - y_[0]) / (x_[-1] - x_[0] + 1e-10)),
1117-
'slope/hi[box].y_px/x_px': -float((y_[fc_idx] - y_[0]) / (x_[fc_idx] - x_[0] + 1e-10)),
1117+
'slope/hi[box].y_px/x_px': -float(
1118+
(y_[knee_idx] - y_[0]) / (x_[knee_idx] - x_[0] + 1e-10)
1119+
),
11181120
'slope/lo[box].y_px/x_px': -float(
1119-
(y_[-1] - y_[fc_idx]) / (x_[-1] - x_[fc_idx] + 1e-10)
1121+
(y_[fc_idx] - y_[knee_idx]) / (x_[fc_idx] - x_[knee_idx] + 1e-10)
11201122
),
11211123
}
11221124

0 commit comments

Comments
 (0)