Skip to content

Commit bbba04a

Browse files
author
trevor.stout
committed
Updated slope definitions to be consistent with other software
1 parent 9f96c5f commit bbba04a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

batbot/spectrogram/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1114,9 +1114,9 @@ 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((y_[knee_idx] - y_[0]) / (x_[knee_idx] - x_[0] + 1e-10)),
11181118
'slope/lo[box].y_px/x_px': -float(
1119-
(y_[-1] - y_[fc_idx]) / (x_[-1] - x_[fc_idx] + 1e-10)
1119+
(y_[fc_idx] - y_[knee_idx]) / (x_[fc_idx] - x_[knee_idx] + 1e-10)
11201120
),
11211121
}
11221122

0 commit comments

Comments
 (0)