Skip to content

Commit 01fa6b6

Browse files
committed
Adding comments
1 parent 021cacf commit 01fa6b6

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

contourusv/detection.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,6 @@ def detect_contours(cleaned_image, start_time, end_time, freq_min, freq_max,
4747
Call type definitions
4848
processing : str
4949
Thresholding method ("adaptive" or "Otsu")
50-
manual_annots : pd.DataFrame or None
51-
Optional DataFrame of ground truth annotations with columns
52-
["begin_time", "end_time"]
5350
5451
Returns
5552
-------
@@ -60,7 +57,7 @@ def detect_contours(cleaned_image, start_time, end_time, freq_min, freq_max,
6057
"""
6158
if call_type_defs is None:
6259
call_type_defs = {
63-
"22kHz": {"freq_min": 25,
60+
"22kHz": {"freq_min": 15, # 25kh works to eliminate false low call detections, but is incorrect logically
6461
"freq_max": 45,
6562
"freq_span_max": 10,
6663
"duration_min": 0.03,

contourusv/main.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,10 @@ def run_detection(root_path, file_name, experiment, trial, overlap=3,
274274

275275

276276
# Find index where frequency >= 40 kHz (f is in kHz)
277-
split_idx = np.argmax(f >= 40)
277+
278+
split = 40
279+
280+
split_idx = np.argmax(f >= split)
278281

279282
# Store original upper half from *raw* Sxx for later restoration
280283
Sxx_high_original = Sxx[split_idx:, :]

0 commit comments

Comments
 (0)