Skip to content
Snippets Groups Projects
Commit fb5fd6eb authored by Stephane Chavin's avatar Stephane Chavin
Browse files

add correction to < 0Hz values

parent f7ac4847
Branches
No related tags found
No related merge requests found
...@@ -435,6 +435,7 @@ def detection2time_freq(annotations_folder, duration, outdir, rf, names, wav, ra ...@@ -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['pos'] = (df['x'] * duration) + df['offset'].astype(int)
df['Low Freq (Hz)'] = (1 - df['y']) * (rf / 2) - (df['h'] * (rf / 2)) / 2 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['High Freq (Hz)'] = (1 - df['y']) * (rf / 2) + (df['h'] * (rf / 2)) / 2
df['Begin Time (s)'] = df['pos'] - (df['w'] * duration) / 2 df['Begin Time (s)'] = df['pos'] - (df['w'] * duration) / 2
df['End Time (s)'] = df['pos'] + (df['w'] * duration) / 2 df['End Time (s)'] = df['pos'] + (df['w'] * duration) / 2
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment