From fb5fd6eb00f9ba40ab1bc7efc91816d97f9919b4 Mon Sep 17 00:00:00 2001 From: Stephane Chavin <stephane.chavin@lis-lab.fr> Date: Tue, 7 Jan 2025 15:07:31 +0100 Subject: [PATCH] add correction to < 0Hz values --- utils.py | 1 + 1 file changed, 1 insertion(+) diff --git a/utils.py b/utils.py index 9c8cb07..104c4ca 100755 --- a/utils.py +++ b/utils.py @@ -435,6 +435,7 @@ def detection2time_freq(annotations_folder, duration, outdir, rf, names, wav, ra df['pos'] = (df['x'] * duration) + df['offset'].astype(int) df['Low Freq (Hz)'] = (1 - df['y']) * (rf / 2) - (df['h'] * (rf / 2)) / 2 + df.loc[df['Low Freq (Hz)'] < 0, 'Low Freq (Hz)'] = 0 df['High Freq (Hz)'] = (1 - df['y']) * (rf / 2) + (df['h'] * (rf / 2)) / 2 df['Begin Time (s)'] = df['pos'] - (df['w'] * duration) / 2 df['End Time (s)'] = df['pos'] + (df['w'] * duration) / 2 -- GitLab