Skip to content
Snippets Groups Projects
Commit 3614416c authored by Loic-Lenof's avatar Loic-Lenof
Browse files

Initial commit

parents
Branches
No related tags found
No related merge requests found
Showing
with 1925 additions and 0 deletions
# Auto detect text files and perform LF normalization
* text=auto
# -*- coding: utf-8 -*-
"""
Created on Sun Dec 24 10:41:58 2022
@author: Loïc
title: detection of BBP in audios
"""
#%% Packages importations
print("\rImportation of packages...", end="\r")
import os
from datetime import datetime
import numpy as np
import pandas as pd
from librosa import load
import matplotlib.pyplot as plt
from matplotlib.patches import Ellipse
from scipy.signal import find_peaks, correlate
from scipy.stats import linregress
print("Importation of packages done!")
#%% Parameters
# Paths
print("\rSetting up parameters...", end="\r")
audio_f = "/media/loic/DOLPHINFREE/Acoustique" # Path to recordings
csv_f = "./../CSV_data" # Path to data in csv
save_f = "./Results" # Path to results
# For functions
sr = 512000 # sample rate of the recordings
cut_low = 50000 # frequency cut in highpass
num_order = 1 # order of the highpass filter
sound_thresh = 1e-5 # arbitrary threshold used for noise detection
click_size = 100 # mean size of a click (observations) for rolling average
max_length = 500 # maximum length to consider a sound as a click
nfft = 8192 # it is high to estimate freq precisely (we dont need good time location)
hop_length = nfft//2 # if needed, reduce hop_length to be more precise in time
flip = 60 # if there are two many BBPs selected, uses more strict criteria
# soft criteria, we will have false positives but at least we detect all BBPs
mini_space = click_size*5 # minimal space between two clicks (avoids echoes)
ICI_space = int(0.020*sr) # maximal space between two clicks to be a BBP
nb_mini_clicks = 15 # minimal number of clicks to be a BBP
d_amp = 0.1 # max difference of amplitude between clicks of a BBP
irregularity = 2 # limit for irregularity in a BBP (the closer to 1, the better)
mean_nrg = 0.1 # max mean energy for clicks in BBP
print("Parameters ready to use!")
#%% Data
print("\rImportation of csv data", end="\r")
from BBPUtils import get_csv, butter_pass_filter, TeagerKaiser_operator, OLDget_BBPs
data_20_21, audio_paths = get_csv(csv_f, slash="/")
print("Importation of csv data complete!")
#%%## Detection of clicks in environnement #####
print("\nMain execution: Looking for clicks in recordings.")
BBP_all = np.empty((0,3)) # [idx file, sample position, idx BBP in file]
for file in range(len(audio_paths)):
print(f"\r\tExecution for file {file+1} on {len(audio_paths)}", end='\r')
# load signal
signal = load(os.path.join(audio_f, audio_paths[file][4:8], audio_paths[file]),
sr=None)[0]
signal_high = butter_pass_filter(signal, cut_low, sr,
num_order, mode='high')
tk_signal = np.abs(TeagerKaiser_operator(signal_high))
# load or find clicks
signal_peaks = find_peaks(tk_signal, prominence=sound_thresh, distance=mini_space,
width=[0,max_length])[0]
# security
if len(signal_peaks)==0:
# create empty list to avoid errors
signal_peaks = np.array([0])
# Compute ICI
peaks_selection = OLDget_BBPs(signal_peaks, ICI_space, nb_mini_clicks)
# security
if len(peaks_selection) > flip:
peaks_selection = OLDget_BBPs(signal_peaks, int(ICI_space/2), nb_mini_clicks)
# Apply selection criteria
d_amp_selection = np.array([np.mean(np.abs(tk_signal[selection[1:]]-tk_signal[selection[:-1]]))<d_amp
for selection in peaks_selection])
regularity = np.array([np.mean(np.abs(selection[1:]-selection[:-1])[1:]/np.abs(selection[1:]-selection[:-1])[:-1])<irregularity
for selection in peaks_selection])
nrg = np.array([np.mean(tk_signal[selection])< mean_nrg for selection in peaks_selection])
keeping = np.where(np.logical_and(d_amp_selection, regularity, nrg))[0]
# just to be sure, if linreg is negative then it is prbly a false positive (a click and its echoes (diminishing in amplitude))
linreg = np.array([linregress(tk_signal[selection],selection)[2]
for selection in peaks_selection])[keeping]
lengths = np.array([len(selection) for selection in peaks_selection])[keeping]
keeping = keeping[np.logical_or((linreg > -0.5),(lengths > 2*nb_mini_clicks))]
# save results
for i in keeping:
curr_BBP = np.append(peaks_selection[i][...,np.newaxis],
np.array([i]*len(peaks_selection[i]))[...,np.newaxis],
axis=1)
curr_BBP = np.append(np.array([file]*len(peaks_selection[i]))[...,np.newaxis],
curr_BBP, axis=1)
BBP_all = np.append(BBP_all, curr_BBP, axis=0)
np.save(os.path.join(save_f, datetime.now().strftime("%d-%m-%y_%Hh%M") + "_BBP_all.npy"),
BBP_all)
\ No newline at end of file
# -*- coding: utf-8 -*-
"""
Created on Thu Mar 24 10:41:58 2022
@author: Loïc
title: manual review of detected BBPs
"""
#%% Packages importations
print("\rImportation of packages...", end="\r")
import os
import json
from datetime import datetime
import numpy as np
from librosa import load, amplitude_to_db, stft, pcen
from matplotlib.widgets import Button
from matplotlib import use
use('TkAgg')
import matplotlib.pyplot as plt
from scipy.signal import find_peaks
print("Importation of packages done!")
#%% Parameters
print("\rSetting up parameters...", end="\r")
# Paths
audio_f = "/media/loic/DOLPHINFREE/Acoustique" # Path to recordings
csv_f = "./../CSV_data" # Path to data in csv
save_f = "./Results" # Path to results
# For functions
sr = 512000 # sample rate of the recordings
cut_low = 50000 # frequency cut in highpass
num_order = 1 # order of the highpass filter
sound_thresh = 1e-5 # arbitrary threshold used for noise detection (lowered here)
click_size = 100 # mean size of a click (observations) for rolling average
max_length = 500 # maximum length to consider a sound as a click
mini_space = click_size*5
nfft = 512
overlap = 0.9
hop_length = int(nfft*(1-overlap))
window = int(sr/2)
print("Parameters ready to use!")
#%% Functions (button's actions)
classes = ["Buzz", "Burst-pulse", "Error", "Undefined"]
def buzz_replace(*args, **kwargs):
global BBP_manual, main_col
BBP_manual[main_col] = 0
def burst_replace(*args, **kwargs):
global BBP_manual, main_col
BBP_manual[main_col] = 1
def error_replace(*args, **kwargs):
global BBP_manual, main_col
BBP_manual[main_col] = 2
def display_selection(*args, **kwargs):
global BBP_manual, main_col, text
text.set_text(f'Current selection: {classes[BBP_manual[main_col]]}')
def exit(*args, **kwargs):
global fig
plt.close(fig)
def break_all(event,*args, **kwargs):
global keep_go
if event.key == "ctrl+q":
keep_go = False
plt.close(fig)
#%% Import Data and functions
print("\rImportation of csv data", end="\r")
from BBPUtils import get_csv, butter_pass_filter, TeagerKaiser_operator
data_20_21, audio_paths = get_csv(csv_f, slash="/")
BBP_all = np.load(os.path.join(save_f, "07-06-22_19h49_BBP_all.npy"))
total_BBP_number = [len(np.unique(BBP_all[np.where(BBP_all[:,0]==file)[0], -1]))
for file in range(len(audio_paths))]
print("Importation of csv data complete!")
#%% Main execution
print("Beginning display of BBPs...")
print(f"\tYou have {np.sum(total_BBP_number)} BBPs to annotate... Gl & Hf")
dict_annot = {}
keep_go=True
for file in range(len(audio_paths)):
print(f"\r\tAnnotation of file {file+1} in {len(audio_paths)}", end="\r")
use = np.where(BBP_all[:,0] == file)[0]
idx_in_data = np.where(data_20_21['Fichier Audio'] == \
audio_paths[file].replace('\\','/'))
signals_data = data_20_21.iloc[idx_in_data[0][0],:]
cat_acoustic = signals_data.iloc[3:10].astype(int).idxmax(axis=0)
cat_behavior = signals_data.iloc[13:16].astype(int).idxmax(axis=0)
if (len(use) > 0) and keep_go:
signal = load(os.path.join(audio_f, audio_paths[file][4:8], audio_paths[file]),
sr=None)[0]
signal_high = butter_pass_filter(signal, cut_low, sr,
num_order, mode='high')
tk_signal = np.abs(TeagerKaiser_operator(signal_high))
signal_peaks = find_peaks(tk_signal, prominence=sound_thresh, distance=mini_space,
width=[0,max_length])[0]
Magnitude_audio = stft(signal_high, n_fft=nfft, hop_length=hop_length)
#spectre = amplitude_to_db(np.abs(Magnitude_audio))
spectre = pcen(np.abs(Magnitude_audio) * (2**31))
# show ICI of each BBP
n_BBP = np.unique(BBP_all[use,-1])
BBP_manual = [-1]*len(n_BBP)
for main_col, i in enumerate(n_BBP):
if keep_go:
BBP = BBP_all[use][BBP_all[use,-1]==i,1]
lower = max(int(BBP.min())-window, 0)
upper = min(int(BBP.max())+window, len(signal))
peaks = np.copy(signal_peaks)
peaks = peaks[peaks > lower]
peaks = peaks[peaks < upper] - lower
ICI = peaks[1:]-peaks[:-1]
ICI = np.append(ICI, ICI[-1])
fig, axs = plt.subplots(5,1, figsize=(32,18), gridspec_kw=
{'height_ratios': [1,6,3,3,.5]})
fig.suptitle(f"BBP {int(main_col)+1}/{len(n_BBP)} in file {file}: {audio_paths[file]}.\nSequence: {cat_acoustic}, Behaviour: {cat_behavior}\nPress 'Ctrl+q' to exit")
axs[0].plot(tk_signal, color="black")
axs[0].set_title("Full recording (for context)")
for col, j in enumerate(n_BBP):
axs[0].plot(BBP_all[use][BBP_all[use,-1]==j,1],
tk_signal[BBP_all[use][BBP_all[use,-1]==j,1].astype(int)],
'.', color="C"+str(col))
axs[0].set_ylabel("Amplitude")
axs[0].axis(xmin=lower, xmax=upper)
axs[0].tick_params('x', labelbottom=False, bottom=False)
axs[1].imshow(spectre[::-1][:,int(lower/hop_length):int(upper/hop_length)],
aspect='auto', interpolation='none', cmap='jet',
extent=(0,(upper-lower)/sr,0,int(sr/2)))
axs[1].set_title("Spectrogram (dB scale)")
axs[1].set_ylabel("Frequencies")
axs[1].tick_params('x', labelbottom=False, bottom=False)
axs[2].plot(np.linspace(0, (upper-lower)/sr, num=len(tk_signal[lower:upper])),
tk_signal[lower:upper], color="black")
axs[2].set_title("Signal (filtered > 50kHz)")
axs[2].set_ylabel("Amplitude")
axs[2].plot(peaks/sr, tk_signal[peaks], '.', color="black")
axs[2].plot((BBP-lower)/sr, tk_signal[BBP.astype(int)],
'.', color="C"+str(main_col))
axs[2].sharex(axs[1])
axs[2].axis(ymin=-1e-4, ymax=1e-3)
axs[2].tick_params('x', labelbottom=False, bottom=False)
axs[3].plot(peaks/sr, np.log(ICI), '.', color="red")
axs[3].set_title("log(ICI) = F(time)")
axs[3].set_ylabel("log(ICI)")
axs[3].sharex(axs[1])
text = axs[4].text(0.5, 0.5,
f'Current selection: {classes[BBP_manual[int(main_col)]]}',
horizontalalignment='center', verticalalignment='center',
transform=axs[4].transAxes, fontsize=18)
axs[4].axis('off')
pos_buzz = plt.axes([0.275, 0, 0.15, 0.05]) #left bottom width height
buzz = Button(pos_buzz, 'Buzz', color="yellow", hovercolor='green')
pos_burst = plt.axes([0.425, 0, 0.15, 0.05])
burst = Button(pos_burst, 'Burst-pulse', color="yellow", hovercolor='green')
pos_error = plt.axes([0.575, 0, 0.15, 0.05]) #left bottom width height
error = Button(pos_error, 'Error', color="yellow", hovercolor='green')
pos_next = plt.axes([0.85, 0, 0.15, 0.05])
nextB = Button(pos_next, 'Next', color="red", hovercolor='orange')
buzz.on_clicked(buzz_replace)
burst.on_clicked(burst_replace)
error.on_clicked(error_replace)
buzz.on_clicked(display_selection)
burst.on_clicked(display_selection)
error.on_clicked(display_selection)
nextB.on_clicked(exit)
fig.canvas.mpl_connect('key_press_event', break_all)
plt.show(block=True)
plt.close('all')
del signal, signal_high, signal_peaks, tk_signal,\
Magnitude_audio, spectre
dict_annot[audio_paths[file]] = BBP_manual
# Temp save (in case of a crash)
with open(os.path.join(save_f, "_temp_annot.json"),'w') as f:
json.dump(dict_annot, f, indent=4, sort_keys=True)
f.close()
# Save it
with open(os.path.join(save_f, datetime.now().strftime("%d-%m-%y_%Hh%M") + "_annot.json"),'w') as f:
json.dump(dict_annot, f, indent=4, sort_keys=True)
f.close()
# remove temp file
os.remove(os.path.join(save_f, "_temp_annot.json"))
print("\nTHE END")
# -*- coding: utf-8 -*-
"""
Created on Thu Mar 24 15:05:33 2022
@author: loic
title: Oops i did the clicks again
"""
#%% Packages
import os
import json
import numpy as np
import pandas as pd
from datetime import datetime
#%% Parameters
print("\rSetting up parameters...", end="\r")
csv_f = "./../CSV_data" # Path to data in csv
save_f = "./Results" # Path to results
file_BBP_all = "07-06-22_19h49_BBP_all.npy"
file_annotations = "08-06-22_15h11_annot.json"
sr = 512000
print("Parameters ready to use!")
#%% Importation of ata and function
print("\rImportation of csv data", end="\r")
from FuncUtils import get_csv, get_category
data_20_21, audio_paths = get_csv(csv_f, slash="/")
print("Importation of csv data complete!")
#%% Main
files = np.arange(len(audio_paths))
files_in_folder = np.array([audio_path[-27:-4] for audio_path in audio_paths])
BBP_all = np.load(os.path.join(save_f, file_BBP_all))
f = open(os.path.join(save_f, file_annotations),)
annotations = json.load(f)
f.close()
BBP_per_file = np.zeros(len(files))
Buzz_per_file = np.zeros(len(files))
Burst_per_file = np.zeros(len(files))
for file in files:
if audio_paths[file] in list(annotations.keys()):
Buzz_per_file[file] = len(np.where(np.array(annotations[audio_paths[file]]) == 0)[0])
Burst_per_file[file] = len(np.where(np.array(annotations[audio_paths[file]]) == 1)[0])
BBP_per_file[file] = Buzz_per_file[file] + Burst_per_file[file]
print(f"We found {int(np.sum(BBP_per_file))} BBP in the audios:\
{int(np.sum(Buzz_per_file))} Buzzes & {int(np.sum(Burst_per_file))} Burst-pulses\n")
# get a handful of interesting features
ICI_Buzz = np.array([])
numbers_Buzz = np.array([])
duration_Buzz = np.array([])
ICI_Burst = np.array([])
numbers_Burst = np.array([])
duration_Burst = np.array([])
count=0
for file in files:
if (audio_paths[file] in list(annotations.keys())) and (data_20_21['T'][file]==0):
count+= 1
use = np.where(BBP_all[:,0] == file)[0]
detections = np.unique(BBP_all[use,-1])
for n_detection, detection in enumerate(detections):
BBP = BBP_all[use][np.where(BBP_all[use,-1] == detection)[0]]
BBP_label = annotations[audio_paths[file]][n_detection]
if BBP_label == 0:
ICI_Buzz = np.append(ICI_Buzz, np.mean(BBP[1:,1]-BBP[:-1,1]))
numbers_Buzz = np.append(numbers_Buzz, BBP.shape[0])
duration_Buzz = np.append(duration_Buzz, BBP[-1,1]-BBP[0,1])
elif BBP_label == 1:
ICI_Burst = np.append(ICI_Burst, np.mean(BBP[1:,1]-BBP[:-1,1]))
numbers_Burst = np.append(numbers_Burst, BBP.shape[0])
duration_Burst = np.append(duration_Burst, BBP[-1,1]-BBP[0,1])
print(f"Excluding control sequences, we found {len(ICI_Buzz)+len(ICI_Burst)} BBP in the audios:\
{len(ICI_Buzz)} Buzzes & {len(ICI_Burst)} Burst-pulses")
print(f"\nMean durations are: \n\t{round(np.mean(duration_Buzz)/sr,3)} sec for Buzzes\
\n\t{round(np.mean(duration_Burst)/sr,3)} sec for Burst-pulses")
print(f"\nMean ICI are: \n\t{round(np.mean(ICI_Buzz)/sr,4)} sec for Buzzes\
\n\t{round(np.mean(ICI_Burst)/sr,4)} sec for Burst-pulses")
print(f"\nMean number of clicks are: \n\t{round(np.mean(numbers_Buzz),1)} for Buzzes\
\n\t{round(np.mean(numbers_Burst),1)} for Burst-pulses")
# save categories associated to each BBP
if input('\nSave table with categories [Y/n] ? ') == 'Y':
data_to_save = pd.DataFrame(BBP_per_file.astype(int), columns=['number_of_BBP'])
for cat in ['acoustic', 'fishing_net', 'behavior', 'beacon', 'date', 'number', 'net']:
data_to_save[cat] = get_category(files_in_folder, audio_paths, data_20_21, cat)
data_to_save['audio_names'] = [file[:-10] for file in files_in_folder]
data_to_save['Buzz'] = Buzz_per_file.astype(int)
data_to_save['Burst-pulse'] = Burst_per_file.astype(int)
data_to_save.to_csv(os.path.join(save_f, datetime.now().strftime("%d-%m-%y_%Hh%M")+"_number_of_BBP.csv"),
index=False, index_label=False)
# -*- coding: utf-8 -*-
"""
Created on Sun Dec 26 13:12:14 2021
@author: Loïc
"""
#%% Packages importations
import csv
import os
import numpy as np
import pandas as pd
from scipy.signal import butter, filtfilt
#%% Functions process
def import_csv(csv_name, folder, separator, useless=True):
"""
Parameters
----------
csv_name : STRING
Name of the csv file that needs to be imported
folder : STRING, optional
Path to the folder containing csv file.
The default is data_folder (see Parameters section).
useless : BOOLEAN, optional
Does the file contains useless infos after the table ?
If True, remove those infos
Returns
-------
data : LIST
List containing all rows of the csv file.
Exclusion of last lines if they don't end with .wav.
"""
data = []
# read data csv
with open(folder + separator + csv_name, newline="") as csv_file:
lines = csv.reader(csv_file, delimiter=',')
for row in lines:
data = data + [row]
csv_file.close()
# clean csv (last lines contain useless info)
n = 0
while useless:
# in case wrong use of the function
if n == len(data):
useless = False
n = 0
raise Exception("First column contains no audio file name")
# exit the loop when audio is found
if data[-n][0].endswith(".wav"):
useless = False
# search audio in next line
else:
n += 1
data = data[0:-n]
return data
def get_csv(csv_folder, slash="\\"):
"""
Parameters
----------
csv_folder : STRING
Path to a folder containing ONLY csv file.
slash : STRING
Separator for folders.
Returns
-------
data_20_21 : DATAFRAME
Contains the inforamtion inside the .CSVs.
audio_paths : LIST
Names corresponding to audio files in the first column of the .CSVs.
"""
csv_names = [a for a in os.listdir(csv_folder) if a.endswith('.csv')]
# import data
data = import_csv(csv_names[0], csv_folder, separator=slash)
for i in range(1,len(csv_names)):
data = data + import_csv(csv_names[i], csv_folder, separator=slash)[1:]
data_frame = pd.DataFrame(data=data[:][1:], columns=data[:][0])
# change dtype for selected columns
for i in range(3,17):
data_frame.iloc[:,i] = data_frame.iloc[:,i].astype(int)
# fetch audio files names
audio_names = np.copy([])
for filename in data_frame["Fichier Audio"]:
if filename.endswith(".wav"):
audio_names = np.append(audio_names, filename.replace('/', slash))
return data_frame, audio_names
def butter_pass_filter(data, cutoff, fs, order=1, mode='high'):
"""
Parameters
----------
data : NUMPY ARRAY
Audio signal (1D array)
cutoff : INT or FLOAT
Frequency limit for the filter.
fs : INT
Sample rate of the audio given as 'data'
order : INT, optional
Order of the highpass filter. The default is 1.
mode : STRING, optional
Mode of the filter (higpass or low pass). Must be 'high' or 'low'
Returns
-------
y : NUMPY ARRAY
Filtered signal.
"""
normal_cutoff = cutoff / (fs/2)
# Get the filter coefficients
b, a = butter(order, normal_cutoff, btype=mode, analog=False)
y = filtfilt(b, a, data)
return y
def TeagerKaiser_operator(audio):
"""
Parameters
----------
audio : NUMPY ARRAY
Audio signal (1D array).
Returns
-------
tk_signal : NUMPY ARRAY
Signal energy computed with teager kaiser operator (1D array).
"""
# Define Teager-Kaiser operator
tk_signal = np.empty(audio.shape)
# Formula : TK = x(t)**2 - x(t-1)*x(t+1)
tk_signal[1:(audio.shape[0]-1)] = (audio[1:(audio.shape[0]-1)]**2) - \
(audio[0:(audio.shape[0]-2)]*audio[2:(audio.shape[0])])
tk_signal[0] = 0 # set first and last value to 0 (neutral)
tk_signal[-1] = 0
return tk_signal
def OLDget_BBPs(clicks_pos, max_interval, nb_min=30):
"""
Parameters
----------
clicks_pos : NUMPY ARRAY
Positions of clics in audio.
max_interval : INT
Maximum interval between 2 clicks to consider them close enough for a BBP
nb_min : INT, optional
Minimum number of clicks in a sequence to keep it, default is 30.
Returns
-------
ICI_selection : LIST OF LISTS
List of BBP found, aranged in lists
"""
ICI = np.append([0], clicks_pos[1:]-clicks_pos[:-1])
ICI_candidates = np.where(ICI < max_interval)[0]
candidates_pos = np.copy(clicks_pos[ICI_candidates])
ICI_selection = []
count_sequence=0
for peak in range(len(candidates_pos)-1):
cur_ICI = candidates_pos[peak+1]-candidates_pos[peak]
if cur_ICI < max_interval:
count_sequence+=1
else:
if count_sequence>=nb_min:
ICI_selection.append(candidates_pos[(peak-count_sequence):(peak)])
count_sequence=0
if count_sequence >= nb_min:
ICI_selection.append(candidates_pos[(peak-count_sequence):(peak)])
return ICI_selection
def get_category(samples, names, data_frame, category='acoustic'):
"""
Parameters
----------
samples : LIST OF STRINGS.
Origin of each click,
should be like ['SCW1807_20200711_083600_extract0.npy']).
names : LIST OF STRINGS
Names of each recording,
(should be like ['11072020/SCW1807_20200711_082400.wav']).
data_frame : PANDAS DATAFRAME
Dataframe containing all csv infos.
category : TYPE, optional
Category to extratc from dataframe. The default is 'acoustic'.
Should be 'acoustic', 'fishing_net', 'behavior', 'beacon', 'date',
'number', 'net' or 'none'
Returns
-------
TYPE
DESCRIPTION.
"""
use_samples = np.array([file[:23] for file in samples])
use_names = np.array([name.split('/')[-1][-27:-4] for name in names])
cat_list = np.zeros(use_samples.shape, dtype="object")
if category == 'acoustic':
start, stop = 3, 10
elif category == 'fishing_net':
start, stop = 10, 13
elif category == 'behavior':
start, stop = 13, 16
elif category == 'none':
return np.array(['none']*len(use_samples))
for i, file in enumerate(use_samples):
idx_ind = np.where(file == use_names)[0][0]
if category == 'beacon':
cat_list[i] = data_frame.iloc[idx_ind, 17]
elif category == 'date':
cat_list[i] = data_frame.iloc[idx_ind, 1]
elif category == 'number':
cat_list[i] = data_frame.iloc[idx_ind, 18]
elif category == 'net':
cat_list[i] = data_frame.iloc[idx_ind,19]
else:
column = np.argmax(data_frame.iloc[idx_ind, start:stop])+start
cat_list[i] = data_frame.columns[column]
if category == 'beacon':
NC = np.where(get_category(samples, names, data_frame, category='acoustic')
== 'AV')[0]
cat_list[NC] = 'NC'
return cat_list
File added
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Fichier Audio,Date,Heure (UTC),T,AV,AV+D,D,D+AP,AP,AP+AV,F,SSF,NSP,CHAS,SOCI,DEPL,SONAR,SIGNAL,C-GR,FILET
09072021-avec_sondeur/SCW6070_20210709_070500.wav,09/07/2021,7:5,0,1,0,0,0,0,0,0,1,0,0,0,1,1,DC,6,SSF
09072021-avec_sondeur/SCW6070_20210709_070600.wav,09/07/2021,7:6,0,0,1,0,0,0,0,0,1,0,0,0,1,1,DC,6,SSF
09072021-avec_sondeur/SCW6070_20210709_070700.wav,09/07/2021,7:7,0,0,0,1,0,0,0,0,1,0,0,0,1,1,DC,6,SSF
09072021-avec_sondeur/SCW6070_20210709_070800.wav,09/07/2021,7:8,0,0,0,1,0,0,0,0,1,0,0,0,1,1,DC,6,SSF
09072021-avec_sondeur/SCW6070_20210709_070900.wav,09/07/2021,7:9,0,0,0,1,0,0,0,0,1,0,0,0,1,1,DC,6,SSF
09072021-avec_sondeur/SCW6070_20210709_071000.wav,09/07/2021,7:10,0,0,0,1,0,0,0,0,1,0,0,0,1,1,DC,6,SSF
09072021-avec_sondeur/SCW6070_20210709_071100.wav,09/07/2021,7:11,0,0,0,0,1,0,0,0,1,0,0,0,1,1,DC,6,SSF
09072021-avec_sondeur/SCW6070_20210709_071200.wav,09/07/2021,7:12,0,0,0,0,0,1,0,0,1,0,0,0,1,1,DC,6,SSF
09072021-avec_sondeur/SCW6070_20210709_071300.wav,09/07/2021,7:13,0,0,0,0,0,1,0,0,1,0,0,0,1,1,DC,6,SSF
09072021-avec_sondeur/SCW6070_20210709_071400.wav,09/07/2021,7:14,0,0,0,0,0,1,0,0,1,0,0,0,1,1,DC,6,SSF
09072021-avec_sondeur/SCW6070_20210709_071500.wav,09/07/2021,7:15,0,0,0,0,0,1,0,0,1,0,0,0,1,1,DC,6,SSF
09072021-avec_sondeur/SCW6070_20210709_073400.wav,09/07/2021,7:34,0,1,0,0,0,0,0,0,1,0,0,0,1,1,DC,6,SSF
09072021-avec_sondeur/SCW6070_20210709_073500.wav,09/07/2021,7:35,0,0,1,0,0,0,0,0,1,0,0,0,1,1,DC,6,SSF
09072021-avec_sondeur/SCW6070_20210709_073600.wav,09/07/2021,7:36,0,0,0,1,0,0,0,0,1,0,0,0,1,1,DC,6,SSF
09072021-avec_sondeur/SCW6070_20210709_073700.wav,09/07/2021,7:37,0,0,0,1,0,0,0,0,1,0,0,0,1,1,DC,6,SSF
09072021-avec_sondeur/SCW6070_20210709_073800.wav,09/07/2021,7:38,0,0,0,1,0,0,0,0,1,0,0,0,1,1,DC,6,SSF
09072021-avec_sondeur/SCW6070_20210709_073900.wav,09/07/2021,7:39,0,0,0,1,0,0,0,0,1,0,0,0,1,1,DC,6,SSF
09072021-avec_sondeur/SCW6070_20210709_074000.wav,09/07/2021,7:40,0,0,0,0,1,0,0,0,1,0,0,0,1,1,DC,6,SSF
09072021-avec_sondeur/SCW6070_20210709_074700.wav,09/07/2021,7:47,0,0,1,0,0,0,0,0,1,0,0,0,1,1,DC,6,SSF
09072021-avec_sondeur/SCW6070_20210709_074800.wav,09/07/2021,7:48,0,0,0,1,0,0,0,0,1,0,0,0,1,1,DC,6,SSF
09072021-avec_sondeur/SCW6070_20210709_074900.wav,09/07/2021,7:49,0,0,0,1,0,0,0,0,1,0,0,0,1,1,DC,6,SSF
09072021-avec_sondeur/SCW6070_20210709_075000.wav,09/07/2021,7:50,0,0,0,1,0,0,0,0,1,0,0,0,1,1,DC,6,SSF
09072021-avec_sondeur/SCW6070_20210709_075100.wav,09/07/2021,7:51,0,0,0,0,1,0,0,0,1,0,0,0,1,1,DC,6,SSF
09072021-avec_sondeur/SCW6070_20210709_075200.wav,09/07/2021,7:52,0,0,0,0,0,1,0,0,1,0,0,0,1,1,DC,6,SSF
09072021-avec_sondeur/SCW6070_20210709_085500.wav,09/07/2021,8:55,0,1,0,0,0,0,0,0,1,0,0,0,1,1,DC,14,SSF
09072021-avec_sondeur/SCW6070_20210709_085600.wav,09/07/2021,8:56,0,0,1,0,0,0,0,0,1,0,0,0,1,1,DC,14,SSF
09072021-avec_sondeur/SCW6070_20210709_085700.wav,09/07/2021,8:57,0,0,0,1,0,0,0,0,1,0,0,0,1,1,DC,14,SSF
09072021-avec_sondeur/SCW6070_20210709_085800.wav,09/07/2021,8:58,0,0,0,1,0,0,0,0,1,0,0,0,1,1,DC,14,SSF
09072021-avec_sondeur/SCW6070_20210709_085900.wav,09/07/2021,8:59,0,0,0,1,0,0,0,0,1,0,0,0,1,1,DC,14,SSF
09072021-avec_sondeur/SCW6070_20210709_090000.wav,09/07/2021,9:0,0,0,0,0,1,0,0,0,1,0,0,0,1,1,DC,14,SSF
09072021-avec_sondeur/SCW6070_20210709_090100.wav,09/07/2021,9:1,0,0,0,0,0,1,0,0,1,0,0,0,1,1,DC,14,SSF
09072021-avec_sondeur/SCW6070_20210709_094400.wav,09/07/2021,9:44,0,0,1,0,0,0,0,0,1,0,0,0,1,1,DC,6,SSF
09072021-avec_sondeur/SCW6070_20210709_094500.wav,09/07/2021,9:45,0,0,0,0,1,0,0,0,1,0,0,0,1,1,DC,6,SSF
09072021-avec_sondeur/SCW6070_20210709_095300.wav,09/07/2021,9:53,0,1,0,0,0,0,0,0,1,0,0,0,1,1,DC,6,SSF
09072021-avec_sondeur/SCW6070_20210709_095400.wav,09/07/2021,9:54,0,0,1,0,0,0,0,0,1,0,0,0,1,1,DC,6,SSF
09072021-avec_sondeur/SCW6070_20210709_095500.wav,09/07/2021,9:55,0,0,0,1,0,0,0,0,1,0,0,0,1,1,DC,6,SSF
09072021-avec_sondeur/SCW6070_20210709_095600.wav,09/07/2021,9:56,0,0,0,1,0,0,0,0,1,0,0,0,1,1,DC,6,SSF
09072021-avec_sondeur/SCW6070_20210709_095700.wav,09/07/2021,9:57,0,0,0,1,0,0,0,0,1,0,0,0,1,1,DC,6,SSF
09072021-avec_sondeur/SCW6070_20210709_095800.wav,09/07/2021,9:58,0,0,0,1,0,0,0,0,1,0,0,0,1,1,DC,6,SSF
09072021-avec_sondeur/SCW6070_20210709_095900.wav,09/07/2021,9:59,0,0,0,1,0,0,0,0,1,0,0,0,1,1,DC,6,SSF
09072021-avec_sondeur/SCW6070_20210709_100000.wav,09/07/2021,10:0,0,0,0,1,0,0,0,1,0,0,0,0,1,1,DC,6,tremail
09072021-avec_sondeur/SCW6070_20210709_100100.wav,09/07/2021,10:1,0,0,0,1,0,0,0,1,0,0,0,0,1,1,DC,6,tremail
09072021-avec_sondeur/SCW6070_20210709_100200.wav,09/07/2021,10:2,0,0,0,1,0,0,0,1,0,0,0,0,1,1,DC,6,tremail
09072021-avec_sondeur/SCW6070_20210709_100300.wav,09/07/2021,10:3,0,0,0,1,0,0,0,1,0,0,0,0,1,1,DC,6,tremail
09072021-avec_sondeur/SCW6070_20210709_100400.wav,09/07/2021,10:4,0,0,0,0,1,0,0,1,0,0,0,0,1,1,DC,6,tremail
09072021-avec_sondeur/SCW6070_20210709_100500.wav,09/07/2021,10:5,0,0,0,0,0,1,0,1,0,0,0,0,1,1,DC,6,tremail
09072021-avec_sondeur/SCW6070_20210709_100600.wav,09/07/2021,10:6,0,0,0,0,0,1,0,1,0,0,0,0,1,1,DC,6,tremail
09072021-avec_sondeur/SCW6070_20210709_100700.wav,09/07/2021,10:7,0,0,0,0,0,1,0,1,0,0,0,0,1,1,DC,6,tremail
09072021-avec_sondeur/SCW6070_20210709_102700.wav,09/07/2021,10:27,1,0,0,0,0,0,0,1,0,0,0,0,1,1,DC,14,tremail
09072021-avec_sondeur/SCW6070_20210709_102800.wav,09/07/2021,10:28,1,0,0,0,0,0,0,1,0,0,0,0,1,1,DC,14,tremail
09072021-avec_sondeur/SCW6070_20210709_102900.wav,09/07/2021,10:29,1,0,0,0,0,0,0,1,0,0,0,0,1,1,DC,14,tremail
09072021-avec_sondeur/SCW6070_20210709_103000.wav,09/07/2021,10:30,1,0,0,0,0,0,0,1,0,0,0,0,1,1,DC,14,tremail
09072021-avec_sondeur/SCW6070_20210709_104100.wav,09/07/2021,10:41,1,0,0,0,0,0,0,0,1,0,1,0,0,1,DC,15,SSF
09072021-avec_sondeur/SCW6070_20210709_104200.wav,09/07/2021,10:42,1,0,0,0,0,0,0,0,1,0,1,0,0,1,DC,15,SSF
09072021-avec_sondeur/SCW6070_20210709_104300.wav,09/07/2021,10:43,1,0,0,0,0,0,0,0,1,0,1,0,0,1,DC,20,SSF
09072021-avec_sondeur/SCW6070_20210709_120800.wav,09/07/2021,12:8,0,1,0,0,0,0,0,0,1,0,0,0,1,1,DC,12,SSF
09072021-avec_sondeur/SCW6070_20210709_120900.wav,09/07/2021,12:9,0,0,1,0,0,0,0,0,1,0,1,0,0,1,DC,12,SSF
09072021-avec_sondeur/SCW6070_20210709_121000.wav,09/07/2021,12:10,0,0,0,1,0,0,0,0,1,0,1,0,0,1,DC,12,SSF
09072021-avec_sondeur/SCW6070_20210709_121100.wav,09/07/2021,12:11,0,0,0,1,0,0,0,0,1,0,1,0,0,1,DC,12,SSF
09072021-avec_sondeur/SCW6070_20210709_121200.wav,09/07/2021,12:12,0,0,0,1,0,0,0,0,1,0,1,0,0,1,DC,12,SSF
09072021-avec_sondeur/SCW6070_20210709_121300.wav,09/07/2021,12:13,0,0,0,0,1,0,0,0,1,0,1,0,0,1,DC,12,SSF
09072021-avec_sondeur/SCW6070_20210709_121400.wav,09/07/2021,12:14,0,0,0,0,0,1,0,0,1,0,1,0,0,1,DC,12,SSF
09072021-avec_sondeur/SCW6070_20210709_121500.wav,09/07/2021,12:15,0,0,0,0,0,1,0,0,1,0,1,0,0,1,DC,12,SSF
11072021/SCW6070_20210711_055700.wav,11/07/2021,5:57,1,0,0,0,0,0,0,0,1,0,0,0,1,0,DC70,10,SSF
11072021/SCW6070_20210711_055800.wav,11/07/2021,5:58,1,0,0,0,0,0,0,0,1,0,0,0,1,0,DC70,10,SSF
11072021/SCW6070_20210711_055900.wav,11/07/2021,5:59,1,0,0,0,0,0,0,0,1,0,0,0,1,0,DC70,10,SSF
11072021/SCW6070_20210711_060000.wav,11/07/2021,6:0,1,0,0,0,0,0,0,0,1,0,0,0,1,0,DC70,10,SSF
11072021/SCW6070_20210711_073300.wav,11/07/2021,7:33,0,1,0,0,0,0,0,0,1,0,1,0,0,0,DC70,5,SSF
11072021/SCW6070_20210711_073400.wav,11/07/2021,7:34,0,0,1,0,0,0,0,0,1,0,0,0,1,0,DC70,5,SSF
11072021/SCW6070_20210711_073500.wav,11/07/2021,7:35,0,0,0,1,0,0,0,0,1,0,0,0,1,0,DC70,5,SSF
11072021/SCW6070_20210711_073600.wav,11/07/2021,7:36,0,0,0,1,0,0,0,0,1,0,0,0,1,0,DC70,5,SSF
11072021/SCW6070_20210711_073700.wav,11/07/2021,7:37,0,0,0,0,1,0,0,0,1,0,0,0,1,0,DC70,5,SSF
11072021/SCW6070_20210711_073800.wav,11/07/2021,7:38,0,0,0,0,0,1,0,0,1,0,0,0,1,0,DC70,5,SSF
11072021/SCW6070_20210711_073900.wav,11/07/2021,7:39,0,0,0,0,0,0,1,0,1,0,0,0,1,0,DC70,5,SSF
11072021/SCW6070_20210711_074000.wav,11/07/2021,7:40,0,0,1,0,0,0,0,0,1,0,0,0,1,0,DC70,5,SSF
11072021/SCW6070_20210711_074100.wav,11/07/2021,7:41,0,0,0,1,0,0,0,0,1,0,0,0,1,0,DC70,5,SSF
11072021/SCW6070_20210711_074200.wav,11/07/2021,7:42,0,0,0,0,1,0,0,0,1,0,0,0,1,0,DC70,5,SSF
18072021/SCW6070_20210718_085800.wav,18/07/2021,8:58,0,1,0,0,0,0,0,0,1,0,0,0,1,0,DC70,12,SSF
18072021/SCW6070_20210718_085900.wav,18/07/2021,8:59,0,0,1,0,0,0,0,0,1,0,0,0,1,0,DC70,12,SSF
18072021/SCW6070_20210718_090000.wav,18/07/2021,9:0,0,0,0,1,0,0,0,0,1,0,0,0,1,0,DC70,12,SSF
18072021/SCW6070_20210718_090100.wav,18/07/2021,9:1,0,0,0,1,0,0,0,0,1,0,0,0,1,0,DC70,12,SSF
18072021/SCW6070_20210718_090200.wav,18/07/2021,9:2,0,0,0,0,1,0,0,0,1,0,0,0,1,0,DC70,12,SSF
18072021/SCW6070_20210718_090500.wav,18/07/2021,9:5,0,1,0,0,0,0,0,0,1,0,0,0,1,0,DC70,12,SSF
18072021/SCW6070_20210718_090600.wav,18/07/2021,9:6,0,0,1,0,0,0,0,0,1,0,0,0,1,0,DC70,12,SSF
18072021/SCW6070_20210718_090700.wav,18/07/2021,9:7,0,0,0,1,0,0,0,0,1,0,0,0,1,0,DC70,12,SSF
18072021/SCW6070_20210718_090800.wav,18/07/2021,9:8,0,0,0,0,1,0,0,0,1,0,0,0,1,0,DC70,12,SSF
18072021/SCW6070_20210718_091100.wav,18/07/2021,9:11,0,1,0,0,0,0,0,0,1,0,0,0,1,0,DC70,12,SSF
18072021/SCW6070_20210718_091200.wav,18/07/2021,9:12,0,0,1,0,0,0,0,0,1,0,0,0,1,0,DC70,12,SSF
18072021/SCW6070_20210718_091300.wav,18/07/2021,9:13,0,0,0,0,1,0,0,0,1,0,0,0,1,0,DC70,12,SSF
18072021/SCW6070_20210718_091400.wav,18/07/2021,9:14,0,0,0,0,0,1,0,0,1,0,0,0,1,0,DC70,12,SSF
18072021/SCW6070_20210718_091600.wav,18/07/2021,9:16,0,1,0,0,0,0,0,0,1,0,0,0,1,0,DC70,12,SSF
18072021/SCW6070_20210718_091700.wav,18/07/2021,9:17,0,0,1,0,0,0,0,0,1,0,0,0,1,0,DC70,12,SSF
18072021/SCW6070_20210718_100500.wav,18/07/2021,10:5,0,1,0,0,0,0,0,0,1,0,0,0,1,0,DC70,12,SSF
18072021/SCW6070_20210718_100600.wav,18/07/2021,10:6,0,0,1,0,0,0,0,0,1,0,0,0,1,0,DC70,12,SSF
18072021/SCW6070_20210718_100700.wav,18/07/2021,10:7,0,0,0,0,1,0,0,0,1,0,0,0,1,0,DC70,12,SSF
18072021/SCW6070_20210718_100800.wav,18/07/2021,10:8,0,0,0,0,0,1,0,0,1,0,0,0,1,0,DC70,12,SSF
,,,,,,,,,,,,,,,,,,,
TOTAUX,,,11,11,14,32,13,14,1,12,84,0,11,0,85,63,,,
,,,,,,,,,,,,,,,,,,,
NOMBRE,NOMBRE D'AUDIOS,96,,,96,,,,,,96,,,96,,,,,
\ No newline at end of file
This diff is collapsed.
Fichier Audio,Date,Heure (UTC),T,AV,AV+D,D,D+AP,AP,AP+AV,F,SSF,NSP,CHAS,SOCI,DEPL,SONAR,SIGNAL
09072021-avec_sondeur/SCW6070_20210709_070500.wav,09/07/2021,7:5,0,1,0,0,0,0,0,0,1,0,0,0,1,1,DC
09072021-avec_sondeur/SCW6070_20210709_070600.wav,09/07/2021,7:6,0,0,1,0,0,0,0,0,1,0,0,0,1,1,DC
09072021-avec_sondeur/SCW6070_20210709_070700.wav,09/07/2021,7:7,0,0,0,1,0,0,0,0,1,0,0,0,1,1,DC
09072021-avec_sondeur/SCW6070_20210709_070800.wav,09/07/2021,7:8,0,0,0,1,0,0,0,0,1,0,0,0,1,1,DC
09072021-avec_sondeur/SCW6070_20210709_070900.wav,09/07/2021,7:9,0,0,0,1,0,0,0,0,1,0,0,0,1,1,DC
09072021-avec_sondeur/SCW6070_20210709_071000.wav,09/07/2021,7:10,0,0,0,1,0,0,0,0,1,0,0,0,1,1,DC
09072021-avec_sondeur/SCW6070_20210709_071100.wav,09/07/2021,7:11,0,0,0,0,1,0,0,0,1,0,0,0,1,1,DC
09072021-avec_sondeur/SCW6070_20210709_071200.wav,09/07/2021,7:12,0,0,0,0,0,1,0,0,1,0,0,0,1,1,DC
09072021-avec_sondeur/SCW6070_20210709_071300.wav,09/07/2021,7:13,0,0,0,0,0,1,0,0,1,0,0,0,1,1,DC
09072021-avec_sondeur/SCW6070_20210709_071400.wav,09/07/2021,7:14,0,0,0,0,0,1,0,0,1,0,0,0,1,1,DC
09072021-avec_sondeur/SCW6070_20210709_071500.wav,09/07/2021,7:15,0,0,0,0,0,1,0,0,1,0,0,0,1,1,DC
09072021-avec_sondeur/SCW6070_20210709_073400.wav,09/07/2021,7:34,0,1,0,0,0,0,0,0,1,0,0,0,1,1,DC
09072021-avec_sondeur/SCW6070_20210709_073500.wav,09/07/2021,7:35,0,0,1,0,0,0,0,0,1,0,0,0,1,1,DC
09072021-avec_sondeur/SCW6070_20210709_073600.wav,09/07/2021,7:36,0,0,0,1,0,0,0,0,1,0,0,0,1,1,DC
09072021-avec_sondeur/SCW6070_20210709_073700.wav,09/07/2021,7:37,0,0,0,1,0,0,0,0,1,0,0,0,1,1,DC
09072021-avec_sondeur/SCW6070_20210709_073800.wav,09/07/2021,7:38,0,0,0,1,0,0,0,0,1,0,0,0,1,1,DC
09072021-avec_sondeur/SCW6070_20210709_073900.wav,09/07/2021,7:39,0,0,0,1,0,0,0,0,1,0,0,0,1,1,DC
09072021-avec_sondeur/SCW6070_20210709_074000.wav,09/07/2021,7:40,0,0,0,0,1,0,0,0,1,0,0,0,1,1,NC
09072021-avec_sondeur/SCW6070_20210709_074700.wav,09/07/2021,7:47,0,0,1,0,0,0,0,0,1,0,0,0,1,1,NC
09072021-avec_sondeur/SCW6070_20210709_074800.wav,09/07/2021,7:48,0,0,0,1,0,0,0,0,1,0,0,0,1,1,NC
09072021-avec_sondeur/SCW6070_20210709_074900.wav,09/07/2021,7:49,0,0,0,1,0,0,0,0,1,0,0,0,1,1,NC
09072021-avec_sondeur/SCW6070_20210709_075000.wav,09/07/2021,7:50,0,0,0,1,0,0,0,0,1,0,0,0,1,1,NC
09072021-avec_sondeur/SCW6070_20210709_075100.wav,09/07/2021,7:51,0,0,0,0,1,0,0,0,1,0,0,0,1,1,NC
09072021-avec_sondeur/SCW6070_20210709_075200.wav,09/07/2021,7:52,0,0,0,0,0,1,0,0,1,0,0,0,1,1,NC
09072021-avec_sondeur/SCW6070_20210709_085500.wav,09/07/2021,8:55,0,1,0,0,0,0,0,0,1,0,0,0,1,1,NC
09072021-avec_sondeur/SCW6070_20210709_085600.wav,09/07/2021,8:56,0,0,1,0,0,0,0,0,1,0,0,0,1,1,NC
09072021-avec_sondeur/SCW6070_20210709_085700.wav,09/07/2021,8:57,0,0,0,1,0,0,0,0,1,0,0,0,1,1,NC
09072021-avec_sondeur/SCW6070_20210709_085800.wav,09/07/2021,8:58,0,0,0,1,0,0,0,0,1,0,0,0,1,1,NC
09072021-avec_sondeur/SCW6070_20210709_085900.wav,09/07/2021,8:59,0,0,0,1,0,0,0,0,1,0,0,0,1,1,NC
09072021-avec_sondeur/SCW6070_20210709_090000.wav,09/07/2021,9:0,0,0,0,0,1,0,0,0,1,0,0,0,1,1,NC
09072021-avec_sondeur/SCW6070_20210709_090100.wav,09/07/2021,9:1,0,0,0,0,0,1,0,0,1,0,0,0,1,1,NC
09072021-avec_sondeur/SCW6070_20210709_094400.wav,09/07/2021,9:44,0,0,1,0,0,0,0,0,0,1,0,0,1,1,NC
09072021-avec_sondeur/SCW6070_20210709_094500.wav,09/07/2021,9:45,0,0,0,0,1,0,0,0,0,1,0,0,1,1,NC
09072021-avec_sondeur/SCW6070_20210709_095300.wav,09/07/2021,9:53,0,1,0,0,0,0,0,0,1,0,0,0,1,1,NC
09072021-avec_sondeur/SCW6070_20210709_095400.wav,09/07/2021,9:54,0,0,1,0,0,0,0,0,1,0,0,0,1,1,NC
09072021-avec_sondeur/SCW6070_20210709_095500.wav,09/07/2021,9:55,0,0,0,1,0,0,0,0,1,0,0,0,1,1,NC
09072021-avec_sondeur/SCW6070_20210709_095600.wav,09/07/2021,9:56,0,0,0,1,0,0,0,0,1,0,0,0,1,1,NC
09072021-avec_sondeur/SCW6070_20210709_095700.wav,09/07/2021,9:57,0,0,0,1,0,0,0,0,1,0,0,0,1,1,NC
09072021-avec_sondeur/SCW6070_20210709_095800.wav,09/07/2021,9:58,0,0,0,1,0,0,0,0,1,0,0,0,1,1,NC
09072021-avec_sondeur/SCW6070_20210709_095900.wav,09/07/2021,9:59,0,0,0,1,0,0,0,0,1,0,0,0,1,1,NC
09072021-avec_sondeur/SCW6070_20210709_100000.wav,09/07/2021,10:0,0,0,0,1,0,0,0,1,0,0,0,0,1,1,NC
09072021-avec_sondeur/SCW6070_20210709_100100.wav,09/07/2021,10:1,0,0,0,1,0,0,0,1,0,0,0,0,1,1,NC
09072021-avec_sondeur/SCW6070_20210709_100200.wav,09/07/2021,10:2,0,0,0,1,0,0,0,1,0,0,0,0,1,1,NC
09072021-avec_sondeur/SCW6070_20210709_100300.wav,09/07/2021,10:3,0,0,0,1,0,0,0,1,0,0,0,0,1,1,NC
09072021-avec_sondeur/SCW6070_20210709_100400.wav,09/07/2021,10:4,0,0,0,0,1,0,0,1,0,0,0,0,1,1,NC
09072021-avec_sondeur/SCW6070_20210709_100500.wav,09/07/2021,10:5,0,0,0,0,0,1,0,1,0,0,0,0,1,1,NC
09072021-avec_sondeur/SCW6070_20210709_100600.wav,09/07/2021,10:6,0,0,0,0,0,1,0,1,0,0,0,0,1,1,NC
09072021-avec_sondeur/SCW6070_20210709_100700.wav,09/07/2021,10:7,0,0,0,0,0,1,0,1,0,0,0,0,1,1,NC
09072021-avec_sondeur/SCW6070_20210709_102700.wav,09/07/2021,10:27,1,0,0,0,0,0,0,1,0,0,0,0,1,1,NC
09072021-avec_sondeur/SCW6070_20210709_102800.wav,09/07/2021,10:28,1,0,0,0,0,0,0,1,0,0,0,0,1,1,NC
09072021-avec_sondeur/SCW6070_20210709_102900.wav,09/07/2021,10:29,1,0,0,0,0,0,0,1,0,0,0,0,1,1,NC
09072021-avec_sondeur/SCW6070_20210709_103000.wav,09/07/2021,10:30,1,0,0,0,0,0,0,1,0,0,0,0,1,1,NC
09072021-avec_sondeur/SCW6070_20210709_104100.wav,09/07/2021,10:41,1,0,0,0,0,0,0,0,0,1,1,0,0,1,NC
09072021-avec_sondeur/SCW6070_20210709_104200.wav,09/07/2021,10:42,1,0,0,0,0,0,0,0,0,1,1,0,0,1,NC
09072021-avec_sondeur/SCW6070_20210709_104300.wav,09/07/2021,10:43,1,0,0,0,0,0,0,0,0,1,1,0,0,1,NC
09072021-avec_sondeur/SCW6070_20210709_111100.wav,09/07/2021,11:11,1,0,0,0,0,0,0,0,0,1,0,0,1,1,NC
09072021-avec_sondeur/SCW6070_20210709_111200.wav,09/07/2021,11:12,1,0,0,0,0,0,0,0,0,1,0,0,1,1,NC
09072021-avec_sondeur/SCW6070_20210709_111300.wav,09/07/2021,11:13,1,0,0,0,0,0,0,0,0,1,0,0,1,1,NC
09072021-avec_sondeur/SCW6070_20210709_111400.wav,09/07/2021,11:14,1,0,0,0,0,0,0,0,0,1,0,0,1,1,NC
09072021-avec_sondeur/SCW6070_20210709_111500.wav,09/07/2021,11:15,1,0,0,0,0,0,0,0,0,1,0,0,1,1,NC
09072021-avec_sondeur/SCW6070_20210709_111600.wav,09/07/2021,11:16,1,0,0,0,0,0,0,0,0,1,0,0,1,1,NC
09072021-avec_sondeur/SCW6070_20210709_111700.wav,09/07/2021,11:17,1,0,0,0,0,0,0,0,0,1,0,0,1,1,NC
09072021-avec_sondeur/SCW6070_20210709_111800.wav,09/07/2021,11:18,1,0,0,0,0,0,0,0,0,1,0,0,1,1,NC
09072021-avec_sondeur/SCW6070_20210709_111900.wav,09/07/2021,11:19,1,0,0,0,0,0,0,0,0,1,0,0,1,1,NC
09072021-avec_sondeur/SCW6070_20210709_112000.wav,09/07/2021,11:20,1,0,0,0,0,0,0,0,0,1,0,0,1,1,NC
09072021-avec_sondeur/SCW6070_20210709_112100.wav,09/07/2021,11:21,1,0,0,0,0,0,0,0,0,1,0,0,1,1,NC
09072021-avec_sondeur/SCW6070_20210709_112200.wav,09/07/2021,11:22,1,0,0,0,0,0,0,0,0,1,0,0,1,1,NC
09072021-avec_sondeur/SCW6070_20210709_112300.wav,09/07/2021,11:23,1,0,0,0,0,0,0,0,0,1,0,0,1,1,NC
09072021-avec_sondeur/SCW6070_20210709_112400.wav,09/07/2021,11:24,1,0,0,0,0,0,0,0,0,1,0,0,1,1,NC
09072021-avec_sondeur/SCW6070_20210709_112500.wav,09/07/2021,11:25,1,0,0,0,0,0,0,0,0,1,0,0,1,1,NC
09072021-avec_sondeur/SCW6070_20210709_112600.wav,09/07/2021,11:26,1,0,0,0,0,0,0,0,0,1,0,0,1,1,NC
09072021-avec_sondeur/SCW6070_20210709_112700.wav,09/07/2021,11:27,1,0,0,0,0,0,0,0,0,1,0,0,1,1,NC
09072021-avec_sondeur/SCW6070_20210709_112800.wav,09/07/2021,11:28,1,0,0,0,0,0,0,0,0,1,0,0,1,1,NC
09072021-avec_sondeur/SCW6070_20210709_112900.wav,09/07/2021,11:29,1,0,0,0,0,0,0,0,0,1,0,0,1,1,NC
09072021-avec_sondeur/SCW6070_20210709_113000.wav,09/07/2021,11:30,1,0,0,0,0,0,0,0,0,1,0,0,1,1,NC
09072021-avec_sondeur/SCW6070_20210709_113100.wav,09/07/2021,11:31,1,0,0,0,0,0,0,0,0,1,0,0,1,1,NC
09072021-avec_sondeur/SCW6070_20210709_113200.wav,09/07/2021,11:32,1,0,0,0,0,0,0,0,0,1,0,0,1,1,NC
09072021-avec_sondeur/SCW6070_20210709_113300.wav,09/07/2021,11:33,1,0,0,0,0,0,0,0,0,1,0,0,1,1,NC
09072021-avec_sondeur/SCW6070_20210709_113400.wav,09/07/2021,11:34,1,0,0,0,0,0,0,0,0,1,0,0,1,1,NC
09072021-avec_sondeur/SCW6070_20210709_113500.wav,09/07/2021,11:35,1,0,0,0,0,0,0,0,0,1,0,0,1,1,NC
09072021-avec_sondeur/SCW6070_20210709_113600.wav,09/07/2021,11:36,1,0,0,0,0,0,0,0,0,1,0,0,1,1,NC
09072021-avec_sondeur/SCW6070_20210709_113700.wav,09/07/2021,11:37,1,0,0,0,0,0,0,0,0,1,0,0,1,1,NC
09072021-avec_sondeur/SCW6070_20210709_120800.wav,09/07/2021,12:8,0,1,0,0,0,0,0,0,0,1,0,0,1,1,NC
09072021-avec_sondeur/SCW6070_20210709_120900.wav,09/07/2021,12:9,0,0,1,0,0,0,0,0,0,1,1,0,0,1,NC
09072021-avec_sondeur/SCW6070_20210709_121000.wav,09/07/2021,12:10,0,0,0,1,0,0,0,0,0,1,1,0,0,1,NC
09072021-avec_sondeur/SCW6070_20210709_121100.wav,09/07/2021,12:11,0,0,0,1,0,0,0,0,0,1,1,0,0,1,NC
09072021-avec_sondeur/SCW6070_20210709_121200.wav,09/07/2021,12:12,0,0,0,1,0,0,0,0,0,1,1,0,0,1,NC
09072021-avec_sondeur/SCW6070_20210709_121300.wav,09/07/2021,12:13,0,0,0,0,1,0,0,0,0,1,1,0,0,1,NC
09072021-avec_sondeur/SCW6070_20210709_121400.wav,09/07/2021,12:14,0,0,0,0,0,1,0,0,0,1,1,0,0,1,NC
09072021-avec_sondeur/SCW6070_20210709_121500.wav,09/07/2021,12:15,0,0,0,0,0,1,0,0,0,1,1,0,0,1,NC
11072021/SCW6070_20210711_055700.wav,11/07/2021,5:57,1,0,0,0,0,0,0,0,1,0,0,0,1,0,NC
11072021/SCW6070_20210711_055800.wav,11/07/2021,5:58,1,0,0,0,0,0,0,0,1,0,0,0,1,0,NC
11072021/SCW6070_20210711_055900.wav,11/07/2021,5:59,1,0,0,0,0,0,0,0,1,0,0,0,1,0,NC
11072021/SCW6070_20210711_060000.wav,11/07/2021,6:0,1,0,0,0,0,0,0,0,1,0,0,0,1,0,DC70
11072021/SCW6070_20210711_073300.wav,11/07/2021,7:33,0,1,0,0,0,0,0,0,1,0,1,0,0,0,DC70
11072021/SCW6070_20210711_073400.wav,11/07/2021,7:34,0,0,1,0,0,0,0,0,1,0,0,0,1,0,DC70
11072021/SCW6070_20210711_073500.wav,11/07/2021,7:35,0,0,0,1,0,0,0,0,1,0,0,0,1,0,DC70
11072021/SCW6070_20210711_073600.wav,11/07/2021,7:36,0,0,0,1,0,0,0,0,1,0,0,0,1,0,DC70
11072021/SCW6070_20210711_073700.wav,11/07/2021,7:37,0,0,0,0,1,0,0,0,1,0,0,0,1,0,DC70
11072021/SCW6070_20210711_073800.wav,11/07/2021,7:38,0,0,0,0,0,1,0,0,1,0,0,0,1,0,DC70
11072021/SCW6070_20210711_073900.wav,11/07/2021,7:39,0,0,0,0,0,0,1,0,1,0,0,0,1,0,DC70
11072021/SCW6070_20210711_074000.wav,11/07/2021,7:40,0,0,1,0,0,0,0,0,1,0,0,0,1,0,DC70
11072021/SCW6070_20210711_074100.wav,11/07/2021,7:41,0,0,0,1,0,0,0,0,1,0,0,0,1,0,DC70
11072021/SCW6070_20210711_074200.wav,11/07/2021,7:42,0,0,0,0,1,0,0,0,1,0,0,0,1,0,DC70
18072021/SCW6070_20210718_085800.wav,18/07/2021,8:58,0,1,0,0,0,0,0,0,1,0,0,0,1,0,DC70
18072021/SCW6070_20210718_085900.wav,18/07/2021,8:59,0,0,1,0,0,0,0,0,1,0,0,0,1,0,DC70
18072021/SCW6070_20210718_090000.wav,18/07/2021,9:0,0,0,0,1,0,0,0,0,1,0,0,0,1,0,DC70
18072021/SCW6070_20210718_090100.wav,18/07/2021,9:1,0,0,0,1,0,0,0,0,1,0,0,0,1,0,DC70
18072021/SCW6070_20210718_090200.wav,18/07/2021,9:2,0,0,0,0,1,0,0,0,1,0,0,0,1,0,DC70
18072021/SCW6070_20210718_090500.wav,18/07/2021,9:5,0,1,0,0,0,0,0,0,1,0,0,0,1,0,DC70
18072021/SCW6070_20210718_090600.wav,18/07/2021,9:6,0,0,1,0,0,0,0,0,1,0,0,0,1,0,DC70
18072021/SCW6070_20210718_090700.wav,18/07/2021,9:7,0,0,0,1,0,0,0,0,1,0,0,0,1,0,DC70
18072021/SCW6070_20210718_090800.wav,18/07/2021,9:8,0,0,0,0,1,0,0,0,1,0,0,0,1,0,DC70
18072021/SCW6070_20210718_091100.wav,18/07/2021,9:11,0,1,0,0,0,0,0,0,1,0,0,0,1,0,DC70
18072021/SCW6070_20210718_091200.wav,18/07/2021,9:12,0,0,1,0,0,0,0,0,1,0,0,0,1,0,DC70
18072021/SCW6070_20210718_091300.wav,18/07/2021,9:13,0,0,0,0,1,0,0,0,1,0,0,0,1,0,DC70
18072021/SCW6070_20210718_091400.wav,18/07/2021,9:14,0,0,0,0,0,1,0,0,1,0,0,0,1,0,DC70
18072021/SCW6070_20210718_091600.wav,18/07/2021,9:16,0,1,0,0,0,0,0,0,1,0,0,0,1,0,DC70
18072021/SCW6070_20210718_091700.wav,18/07/2021,9:17,0,0,1,0,0,0,0,0,1,0,0,0,1,0,DC70
18072021/SCW6070_20210718_100500.wav,18/07/2021,10:5,0,1,0,0,0,0,0,0,1,0,0,0,1,0,DC70
18072021/SCW6070_20210718_100600.wav,18/07/2021,10:6,0,0,1,0,0,0,0,0,1,0,0,0,1,0,DC70
18072021/SCW6070_20210718_100700.wav,18/07/2021,10:7,0,0,0,0,1,0,0,0,1,0,0,0,1,0,DC70
18072021/SCW6070_20210718_100800.wav,18/07/2021,10:8,0,0,0,0,0,1,0,0,1,0,0,0,1,0,DC70
,,,,,,,,,,,,,,,,,
TOTAUX,,,38,11,14,32,13,14,1,12,71,40,11,0,112,90,
,,,,,,,,,,,,,,,,,
NOMBRE,DOIT ETRE EGAL A,123,,,123,,,,,,123,,,123,,,
\ No newline at end of file
This diff is collapsed.
Fichier Audio,Date,Heure (UTC),T,AV,AV+D,D,D+AP,AP,AP+AV,F,SSF,NSP,CHAS,SOCI,DEPL,SONAR,SIGNAL,C-GR
09072021-avec_sondeur/SCW6070_20210709_070500.wav,09/07/2021,7:5,0,1,0,0,0,0,0,0,1,0,0,0,1,1,DC,6
09072021-avec_sondeur/SCW6070_20210709_070600.wav,09/07/2021,7:6,0,0,1,0,0,0,0,0,1,0,0,0,1,1,DC,6
09072021-avec_sondeur/SCW6070_20210709_070700.wav,09/07/2021,7:7,0,0,0,1,0,0,0,0,1,0,0,0,1,1,DC,6
09072021-avec_sondeur/SCW6070_20210709_070800.wav,09/07/2021,7:8,0,0,0,1,0,0,0,0,1,0,0,0,1,1,DC,6
09072021-avec_sondeur/SCW6070_20210709_070900.wav,09/07/2021,7:9,0,0,0,1,0,0,0,0,1,0,0,0,1,1,DC,6
09072021-avec_sondeur/SCW6070_20210709_071000.wav,09/07/2021,7:10,0,0,0,1,0,0,0,0,1,0,0,0,1,1,DC,6
09072021-avec_sondeur/SCW6070_20210709_071100.wav,09/07/2021,7:11,0,0,0,0,1,0,0,0,1,0,0,0,1,1,DC,6
09072021-avec_sondeur/SCW6070_20210709_071200.wav,09/07/2021,7:12,0,0,0,0,0,1,0,0,1,0,0,0,1,1,DC,6
09072021-avec_sondeur/SCW6070_20210709_071300.wav,09/07/2021,7:13,0,0,0,0,0,1,0,0,1,0,0,0,1,1,DC,6
09072021-avec_sondeur/SCW6070_20210709_071400.wav,09/07/2021,7:14,0,0,0,0,0,1,0,0,1,0,0,0,1,1,DC,6
09072021-avec_sondeur/SCW6070_20210709_071500.wav,09/07/2021,7:15,0,0,0,0,0,1,0,0,1,0,0,0,1,1,DC,6
09072021-avec_sondeur/SCW6070_20210709_073400.wav,09/07/2021,7:34,0,1,0,0,0,0,0,0,1,0,0,0,1,1,DC,6
09072021-avec_sondeur/SCW6070_20210709_073500.wav,09/07/2021,7:35,0,0,1,0,0,0,0,0,1,0,0,0,1,1,DC,6
09072021-avec_sondeur/SCW6070_20210709_073600.wav,09/07/2021,7:36,0,0,0,1,0,0,0,0,1,0,0,0,1,1,DC,6
09072021-avec_sondeur/SCW6070_20210709_073700.wav,09/07/2021,7:37,0,0,0,1,0,0,0,0,1,0,0,0,1,1,DC,6
09072021-avec_sondeur/SCW6070_20210709_073800.wav,09/07/2021,7:38,0,0,0,1,0,0,0,0,1,0,0,0,1,1,DC,6
09072021-avec_sondeur/SCW6070_20210709_073900.wav,09/07/2021,7:39,0,0,0,1,0,0,0,0,1,0,0,0,1,1,DC,6
09072021-avec_sondeur/SCW6070_20210709_074000.wav,09/07/2021,7:40,0,0,0,0,1,0,0,0,1,0,0,0,1,1,DC,6
09072021-avec_sondeur/SCW6070_20210709_074700.wav,09/07/2021,7:47,0,0,1,0,0,0,0,0,1,0,0,0,1,1,DC,6
09072021-avec_sondeur/SCW6070_20210709_074800.wav,09/07/2021,7:48,0,0,0,1,0,0,0,0,1,0,0,0,1,1,DC,6
09072021-avec_sondeur/SCW6070_20210709_074900.wav,09/07/2021,7:49,0,0,0,1,0,0,0,0,1,0,0,0,1,1,DC,6
09072021-avec_sondeur/SCW6070_20210709_075000.wav,09/07/2021,7:50,0,0,0,1,0,0,0,0,1,0,0,0,1,1,DC,6
09072021-avec_sondeur/SCW6070_20210709_075100.wav,09/07/2021,7:51,0,0,0,0,1,0,0,0,1,0,0,0,1,1,DC,6
09072021-avec_sondeur/SCW6070_20210709_075200.wav,09/07/2021,7:52,0,0,0,0,0,1,0,0,1,0,0,0,1,1,DC,6
09072021-avec_sondeur/SCW6070_20210709_085500.wav,09/07/2021,8:55,0,1,0,0,0,0,0,0,1,0,0,0,1,1,DC,14
09072021-avec_sondeur/SCW6070_20210709_085600.wav,09/07/2021,8:56,0,0,1,0,0,0,0,0,1,0,0,0,1,1,DC,14
09072021-avec_sondeur/SCW6070_20210709_085700.wav,09/07/2021,8:57,0,0,0,1,0,0,0,0,1,0,0,0,1,1,DC,14
09072021-avec_sondeur/SCW6070_20210709_085800.wav,09/07/2021,8:58,0,0,0,1,0,0,0,0,1,0,0,0,1,1,DC,14
09072021-avec_sondeur/SCW6070_20210709_085900.wav,09/07/2021,8:59,0,0,0,1,0,0,0,0,1,0,0,0,1,1,DC,14
09072021-avec_sondeur/SCW6070_20210709_090000.wav,09/07/2021,9:0,0,0,0,0,1,0,0,0,1,0,0,0,1,1,DC,14
09072021-avec_sondeur/SCW6070_20210709_090100.wav,09/07/2021,9:1,0,0,0,0,0,1,0,0,1,0,0,0,1,1,DC,14
09072021-avec_sondeur/SCW6070_20210709_094400.wav,09/07/2021,9:44,0,0,1,0,0,0,0,0,1,0,0,0,1,1,DC,6
09072021-avec_sondeur/SCW6070_20210709_094500.wav,09/07/2021,9:45,0,0,0,0,1,0,0,0,1,0,0,0,1,1,DC,6
09072021-avec_sondeur/SCW6070_20210709_095300.wav,09/07/2021,9:53,0,1,0,0,0,0,0,0,1,0,0,0,1,1,DC,6
09072021-avec_sondeur/SCW6070_20210709_095400.wav,09/07/2021,9:54,0,0,1,0,0,0,0,0,1,0,0,0,1,1,DC,6
09072021-avec_sondeur/SCW6070_20210709_095500.wav,09/07/2021,9:55,0,0,0,1,0,0,0,0,1,0,0,0,1,1,DC,6
09072021-avec_sondeur/SCW6070_20210709_095600.wav,09/07/2021,9:56,0,0,0,1,0,0,0,0,1,0,0,0,1,1,DC,6
09072021-avec_sondeur/SCW6070_20210709_095700.wav,09/07/2021,9:57,0,0,0,1,0,0,0,0,1,0,0,0,1,1,DC,6
09072021-avec_sondeur/SCW6070_20210709_095800.wav,09/07/2021,9:58,0,0,0,1,0,0,0,0,1,0,0,0,1,1,DC,6
09072021-avec_sondeur/SCW6070_20210709_095900.wav,09/07/2021,9:59,0,0,0,1,0,0,0,0,1,0,0,0,1,1,DC,6
09072021-avec_sondeur/SCW6070_20210709_100000.wav,09/07/2021,10:0,0,0,0,1,0,0,0,1,0,0,0,0,1,1,DC,6
09072021-avec_sondeur/SCW6070_20210709_100100.wav,09/07/2021,10:1,0,0,0,1,0,0,0,1,0,0,0,0,1,1,DC,6
09072021-avec_sondeur/SCW6070_20210709_100200.wav,09/07/2021,10:2,0,0,0,1,0,0,0,1,0,0,0,0,1,1,DC,6
09072021-avec_sondeur/SCW6070_20210709_100300.wav,09/07/2021,10:3,0,0,0,1,0,0,0,1,0,0,0,0,1,1,DC,6
09072021-avec_sondeur/SCW6070_20210709_100400.wav,09/07/2021,10:4,0,0,0,0,1,0,0,1,0,0,0,0,1,1,DC,6
09072021-avec_sondeur/SCW6070_20210709_100500.wav,09/07/2021,10:5,0,0,0,0,0,1,0,1,0,0,0,0,1,1,DC,6
09072021-avec_sondeur/SCW6070_20210709_100600.wav,09/07/2021,10:6,0,0,0,0,0,1,0,1,0,0,0,0,1,1,DC,6
09072021-avec_sondeur/SCW6070_20210709_100700.wav,09/07/2021,10:7,0,0,0,0,0,1,0,1,0,0,0,0,1,1,DC,6
09072021-avec_sondeur/SCW6070_20210709_102700.wav,09/07/2021,10:27,1,0,0,0,0,0,0,1,0,0,0,0,1,1,DC,14
09072021-avec_sondeur/SCW6070_20210709_102800.wav,09/07/2021,10:28,1,0,0,0,0,0,0,1,0,0,0,0,1,1,DC,14
09072021-avec_sondeur/SCW6070_20210709_102900.wav,09/07/2021,10:29,1,0,0,0,0,0,0,1,0,0,0,0,1,1,DC,14
09072021-avec_sondeur/SCW6070_20210709_103000.wav,09/07/2021,10:30,1,0,0,0,0,0,0,1,0,0,0,0,1,1,DC,14
09072021-avec_sondeur/SCW6070_20210709_104100.wav,09/07/2021,10:41,1,0,0,0,0,0,0,0,1,0,1,0,0,1,DC,15
09072021-avec_sondeur/SCW6070_20210709_104200.wav,09/07/2021,10:42,1,0,0,0,0,0,0,0,1,0,1,0,0,1,DC,15
09072021-avec_sondeur/SCW6070_20210709_104300.wav,09/07/2021,10:43,1,0,0,0,0,0,0,0,1,0,1,0,0,1,DC,20
09072021-avec_sondeur/SCW6070_20210709_120800.wav,09/07/2021,12:8,0,1,0,0,0,0,0,0,1,0,0,0,1,1,DC,12
09072021-avec_sondeur/SCW6070_20210709_120900.wav,09/07/2021,12:9,0,0,1,0,0,0,0,0,1,0,1,0,0,1,DC,12
09072021-avec_sondeur/SCW6070_20210709_121000.wav,09/07/2021,12:10,0,0,0,1,0,0,0,0,1,0,1,0,0,1,DC,12
09072021-avec_sondeur/SCW6070_20210709_121100.wav,09/07/2021,12:11,0,0,0,1,0,0,0,0,1,0,1,0,0,1,DC,12
09072021-avec_sondeur/SCW6070_20210709_121200.wav,09/07/2021,12:12,0,0,0,1,0,0,0,0,1,0,1,0,0,1,DC,12
09072021-avec_sondeur/SCW6070_20210709_121300.wav,09/07/2021,12:13,0,0,0,0,1,0,0,0,1,0,1,0,0,1,DC,12
09072021-avec_sondeur/SCW6070_20210709_121400.wav,09/07/2021,12:14,0,0,0,0,0,1,0,0,1,0,1,0,0,1,DC,12
09072021-avec_sondeur/SCW6070_20210709_121500.wav,09/07/2021,12:15,0,0,0,0,0,1,0,0,1,0,1,0,0,1,DC,12
11072021/SCW6070_20210711_055700.wav,11/07/2021,5:57,1,0,0,0,0,0,0,0,1,0,0,0,1,0,DC70,10
11072021/SCW6070_20210711_055800.wav,11/07/2021,5:58,1,0,0,0,0,0,0,0,1,0,0,0,1,0,DC70,10
11072021/SCW6070_20210711_055900.wav,11/07/2021,5:59,1,0,0,0,0,0,0,0,1,0,0,0,1,0,DC70,10
11072021/SCW6070_20210711_060000.wav,11/07/2021,6:0,1,0,0,0,0,0,0,0,1,0,0,0,1,0,DC70,10
11072021/SCW6070_20210711_073300.wav,11/07/2021,7:33,0,1,0,0,0,0,0,0,1,0,1,0,0,0,DC70,5
11072021/SCW6070_20210711_073400.wav,11/07/2021,7:34,0,0,1,0,0,0,0,0,1,0,0,0,1,0,DC70,5
11072021/SCW6070_20210711_073500.wav,11/07/2021,7:35,0,0,0,1,0,0,0,0,1,0,0,0,1,0,DC70,5
11072021/SCW6070_20210711_073600.wav,11/07/2021,7:36,0,0,0,1,0,0,0,0,1,0,0,0,1,0,DC70,5
11072021/SCW6070_20210711_073700.wav,11/07/2021,7:37,0,0,0,0,1,0,0,0,1,0,0,0,1,0,DC70,5
11072021/SCW6070_20210711_073800.wav,11/07/2021,7:38,0,0,0,0,0,1,0,0,1,0,0,0,1,0,DC70,5
11072021/SCW6070_20210711_073900.wav,11/07/2021,7:39,0,0,0,0,0,0,1,0,1,0,0,0,1,0,DC70,5
11072021/SCW6070_20210711_074000.wav,11/07/2021,7:40,0,0,1,0,0,0,0,0,1,0,0,0,1,0,DC70,5
11072021/SCW6070_20210711_074100.wav,11/07/2021,7:41,0,0,0,1,0,0,0,0,1,0,0,0,1,0,DC70,5
11072021/SCW6070_20210711_074200.wav,11/07/2021,7:42,0,0,0,0,1,0,0,0,1,0,0,0,1,0,DC70,5
18072021/SCW6070_20210718_085800.wav,18/07/2021,8:58,0,1,0,0,0,0,0,0,1,0,0,0,1,0,DC70,12
18072021/SCW6070_20210718_085900.wav,18/07/2021,8:59,0,0,1,0,0,0,0,0,1,0,0,0,1,0,DC70,12
18072021/SCW6070_20210718_090000.wav,18/07/2021,9:0,0,0,0,1,0,0,0,0,1,0,0,0,1,0,DC70,12
18072021/SCW6070_20210718_090100.wav,18/07/2021,9:1,0,0,0,1,0,0,0,0,1,0,0,0,1,0,DC70,12
18072021/SCW6070_20210718_090200.wav,18/07/2021,9:2,0,0,0,0,1,0,0,0,1,0,0,0,1,0,DC70,12
18072021/SCW6070_20210718_090500.wav,18/07/2021,9:5,0,1,0,0,0,0,0,0,1,0,0,0,1,0,DC70,12
18072021/SCW6070_20210718_090600.wav,18/07/2021,9:6,0,0,1,0,0,0,0,0,1,0,0,0,1,0,DC70,12
18072021/SCW6070_20210718_090700.wav,18/07/2021,9:7,0,0,0,1,0,0,0,0,1,0,0,0,1,0,DC70,12
18072021/SCW6070_20210718_090800.wav,18/07/2021,9:8,0,0,0,0,1,0,0,0,1,0,0,0,1,0,DC70,12
18072021/SCW6070_20210718_091100.wav,18/07/2021,9:11,0,1,0,0,0,0,0,0,1,0,0,0,1,0,DC70,12
18072021/SCW6070_20210718_091200.wav,18/07/2021,9:12,0,0,1,0,0,0,0,0,1,0,0,0,1,0,DC70,12
18072021/SCW6070_20210718_091300.wav,18/07/2021,9:13,0,0,0,0,1,0,0,0,1,0,0,0,1,0,DC70,12
18072021/SCW6070_20210718_091400.wav,18/07/2021,9:14,0,0,0,0,0,1,0,0,1,0,0,0,1,0,DC70,12
18072021/SCW6070_20210718_091600.wav,18/07/2021,9:16,0,1,0,0,0,0,0,0,1,0,0,0,1,0,DC70,12
18072021/SCW6070_20210718_091700.wav,18/07/2021,9:17,0,0,1,0,0,0,0,0,1,0,0,0,1,0,DC70,12
18072021/SCW6070_20210718_100500.wav,18/07/2021,10:5,0,1,0,0,0,0,0,0,1,0,0,0,1,0,DC70,12
18072021/SCW6070_20210718_100600.wav,18/07/2021,10:6,0,0,1,0,0,0,0,0,1,0,0,0,1,0,DC70,12
18072021/SCW6070_20210718_100700.wav,18/07/2021,10:7,0,0,0,0,1,0,0,0,1,0,0,0,1,0,DC70,12
18072021/SCW6070_20210718_100800.wav,18/07/2021,10:8,0,0,0,0,0,1,0,0,1,0,0,0,1,0,DC70,12
,,,,,,,,,,,,,,,,,,
TOTAUX,,,11,11,14,32,13,14,1,12,84,0,11,0,85,63,,
,,,,,,,,,,,,,,,,,,
NOMBRE,NOMBRE D'AUDIOS,96,,,96,,,,,,96,,,96,,,,
\ No newline at end of file
# -*- coding: utf-8 -*-
"""
Created on Sun Dec 26 13:05:58 2021
@author: Loïc
title: detection of clicks in audios
"""
# working directory should be set to "Clicks" folder
#%% Packages importations
print("\rImportation of packages...", end="\r")
import librosa
import os
import numpy as np
from scipy.signal import find_peaks
import matplotlib.pyplot as plt
print("Importation of packages done!")
#%% Parameters
# Paths
print("\rSetting up parameters...", end="\r")
audio_f = "/media/loic/DOLPHINFREE/Acoustique" # Path to audio data
csv_f = "./../CSV_data" # Path to csv data
save_f = "./Results/peaks_02052022" # Path to save results
# Audio parameters
sr = 512000 # sample rate of the recordings
cut_low = 50000 # frequency cut in highpass
num_order = 1 # order of the highpass filter
distance = int(sr*0.101) # 0.101 sec between two clicks from the beacon
tolerance = int(sr*0.001) # tolerance for beacon regularity
# User chosen parameters
sound_thresh = 0.001 # threshold for noise detection
click_size = int(sr*0.0002) # mean size of a click (observations)
max_length = 500 # maximum length of a click (observations)
mini_space = int(click_size*10) # minimal space between two clicks (observations)
print("Parameters ready to use!")
#%% Data importations
print("\rImportation of csv data", end="\r")
from ClickUtils import get_csv, butter_pass_filter, TeagerKaiser_operator
data_20_21, audio_paths = get_csv(csv_f, slash="/")
print("Importation of csv data complete!")
#%%## Detect clics in environnement #####
print("\nMain execution: Looking for clicks in recordings.")
for file in range(len(audio_paths)):
# Load audio
signal = librosa.load(os.path.join(audio_f, audio_paths[file][4:8], audio_paths[file]),
sr=None)[0]
# transform audio
signal_high = butter_pass_filter(signal, cut_low, sr,
num_order, mode='high')
tk_signal = TeagerKaiser_operator(signal_high)
# detection of peaks
signal_peaks = find_peaks(tk_signal, distance=mini_space, width=[0,max_length],
prominence=sound_thresh)[0]
map_peaks = np.zeros(60*sr, dtype=int)
map_peaks[signal_peaks] = 1
# clicks from beacon
idx_in_data = np.where(data_20_21['Fichier Audio'] == \
audio_paths[file].replace('\\','/'))
signals_data = data_20_21.iloc[idx_in_data[0][0],:]
cat_acoustic = signals_data.iloc[3:10].astype(int).idxmax(axis=0)
if ('D' in cat_acoustic):
# exclude them
map_clean = np.copy(map_peaks)
for peak in signal_peaks:
coord1_low = peak-distance-tolerance
coord1_up = peak-distance+tolerance
coord2_low = peak+distance-tolerance
coord2_up = peak+distance+tolerance
if (1 in map_peaks[coord1_low:coord1_up]) or (1 in map_peaks[coord2_low:coord2_up]):
map_clean[peak] = 0
else:
map_clean=np.copy(map_peaks)
# save detections
# np.save(os.path.join(save_f, audio_paths[file][-27:-4], "_peaks"),
# np.nonzero(map_clean)[0])
print(f"\r\t1- {file+1} on {len(audio_paths)}: Found {len(np.nonzero(map_clean)[0])} \
clicks", end='\t\r')
print("\nDetection of clicks in recordings complete!")
\ No newline at end of file
# -*- coding: utf-8 -*-
"""
Created on Fri Feb 4 16:03:01 2022
@author: loic
title: Make useful data from detections
"""
#%% Importations
import os
import numpy as np
import pandas as pd
#%% Parameters
# Paths
csv_f = "./../CSV_data" # Path to csv data
res_f = "./Results" # Path to save results
save_f = "peaks_02052022" # Folder containing detections
version = "02052022"
from ClickUtils import get_csv, get_category
data_20_21, audio_paths = get_csv(csv_f, slash="/")
#%% Main
files_in_folder = os.listdir(os.path.join(res_f, save_f))
# get number of clicks
click_per_file = np.zeros(len(files_in_folder))
for i,file in enumerate(files_in_folder):
click_per_file[i] = len(np.load(os.path.join(res_f, save_f, file)))
print(f"We detected {int(np.sum(click_per_file))} clicks in the audios")
# save each category associated to a click
if input('Save table with categories [Y/n] ? ') == 'Y':
data_to_save = pd.DataFrame(click_per_file.astype(int), columns=['number_of_clicks'])
for cat in ['acoustic', 'fishing_net', 'behavior', 'beacon', 'date', 'number', 'net']:
data_to_save[cat] = get_category(files_in_folder, audio_paths, data_20_21, cat)
data_to_save['audio_names'] = [file[:-10] for file in files_in_folder]
data_to_save.to_csv(os.path.join(res_f, "number_of_clicks_" + version + ".csv"),
index=False, index_label=False)
# -*- coding: utf-8 -*-
"""
Created on Tuesday Jul 05 13:34:38 2021
@author: Loïc
title: Projection of clicks (the complicated one)
"""
#%% Packages importations
print("Importation of packages...")
import os
import umap
import pickle
import numpy as np
import pandas as pd
import seaborn as sns
from tqdm import tqdm
from tabulate import tabulate
from datetime import datetime
import matplotlib.pyplot as plt
from matplotlib.patches import Ellipse
from sklearn.preprocessing import StandardScaler
print("Importation of packages done!")
#%% Parameters
print("\nSetting up parameters...")
csv_f = "./../CSV_data"
features_f = "./calcul_features_octave/clicks_features_octave"
res_f = "./Results"
peaks_f = "peaks_02052022"
save_f = "after_octave"
# For functions
features_name = ["audio_name",
"frequencepeak",
"frequencecentr",
"DeltaF_3dB",
"Deltat_10dB",
"DeltaF_10dB",
"Deltat_20dB",
"DeltaF_rms",
"Deltat_rms",
"ICI",
"SNR",
"sample_pos",
"acoustic",
"fishing_net",
"behavior",
"date"]
sr = 512000 # sample rate of recordings
len_audio = 60 # length of recordings (in sec)
rd_state = 42 # seed for randomness
print("Parameters ready to use!")
np.random.seed(rd_state)
from ClickUtils import get_csv, get_category
#%% Data
print("\nImportation of csv data")
data_20_21, audio_paths = get_csv(csv_f, slash="/")
# associate each click to its categories
if input("\tFetch data and features for each click [Y/n]? ") == "Y":
list_csv = os.listdir(features_f)
list_csv.sort()
list_csv = [csv_ for csv_ in list_csv if csv_.endswith('.csv')]
all_features = pd.DataFrame(data=None, columns=features_name)
for file in tqdm(list_csv):
if file.endswith(".csv"):
data_csv = pd.read_csv(os.path.join(features_f, file),
header=None, names=features_name[1:])
# add more informations
data_csv["audio_name"] = file[9:-4]
data_csv["acoustic"] = get_category([file[9:]], data_20_21["Fichier Audio"], data_20_21, "acoustic")[0]
data_csv["fishing_net"] = get_category([file[9:]], data_20_21["Fichier Audio"], data_20_21, "fishing_net")[0]
data_csv["behavior"] = get_category([file[9:]], data_20_21["Fichier Audio"], data_20_21, "behavior")[0]
data_csv["date"] = get_category([file[9:]], data_20_21["Fichier Audio"], data_20_21, "date")[0]
position_clicks = np.load(os.path.join(res_f, peaks_f, file[9:-4] + "_peaks.npy"))
if len(position_clicks) != len(data_csv):
position_clicks = position_clicks[position_clicks>500]
position_clicks = position_clicks[position_clicks<(sr*len_audio-500)]
data_csv["sample_pos"] = position_clicks
all_features = pd.read_csv(os.path.join(res_f, save_f, "all_features.csv"))
all_features = pd.concat([all_features, data_csv])
all_features.to_csv(os.path.join(res_f, save_f, "all_features.csv"), index=False)
else:
all_features = pd.read_csv(os.path.join(res_f, save_f, "all_features.csv"))
print("Importation of csv data complete!")
#%% UMAP Projection
print("\nUmap projection:")
if input("\tCompute UMAP projection [Y/n]? ") == "Y":
use_feature = all_features[["frequencepeak",
"frequencecentr",
"DeltaF_3dB",
"Deltat_10dB",
"DeltaF_10dB",
"Deltat_20dB",
"DeltaF_rms",
"Deltat_rms",
"ICI",
"SNR"]]
reducer = umap.UMAP(n_neighbors=150, min_dist=0,
random_state=42, low_memory=True, verbose=True)
reducer.fit(use_feature[::10])
embedding = reducer.transform(use_feature)
res_umap = pd.DataFrame({'UMAP1': embedding[:,0]})
for i in range(1, 2):
res_umap['UMAP'+str(i+1)] = embedding[:,i]
res_umap.to_csv(os.path.join(res_f, save_f, "all_features_projection-" +\
datetime.now().strftime("%d%m%Y") + ".csv"), index=False)
pickle.dump(reducer, open(os.path.join(res_f, "reducer-" +\
datetime.now().strftime("%d%m%Y") + ".sav"), 'wb'))
else:
res_umap = pd.read_csv(os.path.join(res_f, save_f, "all_features_projection-07072022.csv"),
index_col=False)
print("Umap complete and saved!")
#%% UMAP display
shuffle = np.random.permutation(res_umap.shape[0])
results = res_umap.iloc[shuffle]
feats = all_features.iloc[shuffle]
for cat in ["date"]:#,"acoustic","behavior","fishing_net"]:
plt.figure()
sns.scatterplot(data=results, x='UMAP1', y="UMAP2", hue=feats[cat]).set_title(
f'UMAP projection of {res_umap.shape[0]} clicks')
sns.set_theme(style="ticks", font_scale=1.5)
if cat=="date":
handles, labels = plt.gca().get_legend_handles_labels()
dates = [datetime.strptime(ts, "%d/%m/%Y") for ts in labels]
order = np.argsort(dates)
plt.legend([handles[idx] for idx in order],
[labels[idx] for idx in order],
loc='best')
else:
plt.legend(loc='best')
plt.show(block=True)
print("Displays are ready.")
#%% Ok, let's focus on the two groups at the bottom right of the projection
print("\nFind intruders (not clicks)")
# create an ellipse around each group
infos = np.array([
[13, .5, 5.1, 10, 44, 'green'],
[11.3, -4, 1, 4, -20, 'red']
])
fig = plt.figure()
ax = fig.add_subplot(1, 1, 1)
rad_cc = np.zeros((results.shape[0],(len(infos))))
colors_array = np.array(['black'] * results.shape[0])
for i in range(len(infos)):
ellipse = Ellipse(xy=(float(infos[i][0]),float(infos[i][1])),
width=float(infos[i][2]),
height=float(infos[i][3]),
angle=float(infos[i][4]),
edgecolor='r', fc='None', lw=2)
ax.add_patch(ellipse)
cos_angle = np.cos(np.radians(180.-float(infos[i][4])))
sin_angle = np.sin(np.radians(180.-float(infos[i][4])))
xc = np.array(results.iloc[:,0]) - float(infos[i][0])
yc = np.array(results.iloc[:,1]) - float(infos[i][1])
xct = xc * cos_angle - yc * sin_angle
yct = xc * sin_angle + yc * cos_angle
rad_cc[:,i] = (xct**2/(float(infos[i][2])/2.)**2) + (yct**2/(float(infos[i][3])/2.)**2)
colors_array[np.where(rad_cc[:,i] <= 1.)[0]] = infos[i][-1]
ax.scatter(results.iloc[:,0],results.iloc[:,1],
c=colors_array,linewidths=0.3)
plt.show(block=True)
# each group contains the following points
green_group = np.where(rad_cc[:,0] <= 1.)[0]
red_group = np.where(rad_cc[:,1] <= 1.)[0]
black_group = np.delete(np.arange(len(rad_cc)), np.unique(np.append(green_group, red_group)))
# select a random green click and a random red click
green_idx = np.random.choice(green_group)
red_idx = np.random.choice(red_group)
# Corresponding files and positions
green_name, green_pos = feats["audio_name"].iloc[green_idx], feats["sample_pos"].iloc[green_idx]
red_name, red_pos = feats["audio_name"].iloc[red_idx], feats["sample_pos"].iloc[red_idx]
print(f"\tCheck file {green_name} in position {green_pos} (in samples)")
print(f"\tAlso check file {red_name} in position {red_pos} (in samples)")
print("\tThese are clicks from a SONAR (and echoes of SONARS sometimes)")
# Manual checking all_features of files with audacity.
# => These clicks correspond to a SONAR and its echoes.
# Discard these two groups and do a new UMAP.
if input("Save new selection ? [Y/n] ") == "Y":
all_features.iloc[shuffle].iloc[black_group].to_csv(os.path.join(res_f, save_f, "nless_all_features-" +\
datetime.now().strftime("%d%m%Y") + ".csv"), index=False)
nless_all_features = pd.read_csv(os.path.join(res_f, save_f, "nless_all_features-07072022.csv"),
index_col=False)
print("FYI:")
data = [
["Clicks",
np.mean(feats["frequencepeak"].iloc[black_group]),
np.std(feats["frequencepeak"].iloc[black_group]),
np.mean(feats["frequencecentr"].iloc[black_group]),
np.std(feats["frequencecentr"].iloc[black_group]),
np.mean(feats["ICI"].iloc[black_group]),
np.std(feats["ICI"].iloc[black_group])
],
["Sonars",
np.mean(feats["frequencepeak"].iloc[np.append(red_group,green_group)]),
np.std(feats["frequencepeak"].iloc[np.append(red_group,green_group)]),
np.mean(feats["frequencecentr"].iloc[np.append(red_group,green_group)]),
np.std(feats["frequencecentr"].iloc[np.append(red_group,green_group)]),
np.mean(feats["ICI"].iloc[np.append(red_group,green_group)]),
np.std(feats["ICI"].iloc[np.append(red_group,green_group)])
]
]
print(tabulate(data, headers=["Mean frequency peak",
"Std frequency peak",
"Mean centroid",
"Std centroid",
"Mean ICI",
"Std ICI"]))
print("Excluded intruders")
#%% New Projection
print("\nRun new projection")
if input("\tCompute UMAP projection (Bis) [Y/n]? ") == "Y":
nless_use_feature = nless_all_features[["frequencepeak",
"frequencecentr",
"DeltaF_3dB",
"Deltat_10dB",
"DeltaF_10dB",
"Deltat_20dB",
"DeltaF_rms",
"Deltat_rms",
"ICI",
"SNR"]]
nless_reducer = umap.UMAP(n_neighbors=50, min_dist=1,
random_state=rd_state, low_memory=True, verbose=True)
nless_scaler = StandardScaler()
nless_use_feature = nless_scaler.fit_transform(nless_use_feature)
nless_reducer.fit(nless_use_feature)
nless_embedding = nless_reducer.transform(nless_use_feature)
nless_res_umap = pd.DataFrame({'UMAP1': nless_embedding[:,0]})
for i in range(1, 2):
nless_res_umap['UMAP'+str(i+1)] = nless_embedding[:,i]
nless_res_umap.to_csv(os.path.join(res_f, save_f, "nless_all_features_projection-" +\
datetime.now().strftime("%d%m%Y") + ".csv"), index=False)
pickle.dump(nless_reducer, open(os.path.join(res_f, save_f, "nless_reducer-" +\
datetime.now().strftime("%d%m%Y") + ".sav"), 'wb'))
else:
nless_res_umap = pd.read_csv(os.path.join(res_f, save_f, "nless_all_features_projection-07072022.csv"),
index_col=False)
print("Projection ready! (Again).")
#%% Displays
nless_shuffle = np.random.permutation(nless_res_umap.shape[0])
nless_results = nless_res_umap.iloc[nless_shuffle]
nless_feats = nless_all_features.iloc[nless_shuffle]
for cat in ["date"]: #,"acoustic","behavior","fishing_net"]:
plt.figure()
sns.scatterplot(data=nless_results, x='UMAP1', y="UMAP2", hue=nless_feats[cat]).set_title(
f'UMAP projection of {res_umap.shape[0]} clicks')
sns.set_theme(style="ticks", font_scale=1.5)
if cat=="date":
handles, labels = plt.gca().get_legend_handles_labels()
dates = [datetime.strptime(ts, "%d/%m/%Y") for ts in labels]
order = np.argsort(dates)
plt.legend([handles[idx] for idx in order],
[labels[idx] for idx in order],
loc='best')
else:
plt.legend(loc='best')
plt.show(block=True)
print("Displays are ready.")
print("\n...Nothing left...")
\ No newline at end of file
# -*- coding: utf-8 -*-
"""
Created on Sun Dec 26 13:05:58 2021
@author: Loïc
title: projection of detected clicks
"""
#%% Packages importations
print("\rImportation of packages...", end="\r")
import os
import numpy as np
import pandas as pd
from librosa import load, stft
from librosa.feature import spectral_centroid
from sklearn.preprocessing import StandardScaler
import umap
import pickle
import matplotlib.pyplot as plt
from matplotlib.patches import Ellipse
import seaborn as sns
from datetime import datetime
print("Importation of packages done!")
#%% Parameters
print("\rSetting up parameters...", end="\r")
audio_f = "/media/loic/DOLPHINFREE/Acoustique" # Path to audio data
csv_f = "./../CSV_data" # Path to csv data
res_f = "./Results" # Path to save results
peaks_f = "peaks_02052022" # Path to save results
save_features = "features_projections_02052022"
version = "02052022"
# For functions
sr = 512000 # sample rate of the recordings
cut_low = 50000 # frequency cut in highpass
num_order = 1 # order of the highpass filter
n_fft = 256 # size of the fft window
hop_length = n_fft//2 # % overlap of fft windows
print("Parameters ready to use!")
#%% Data
print("\rImportation of csv data", end="\r")
from ClickUtils import get_csv, butter_pass_filter, get_category
data_20_21, audio_paths = get_csv(csv_f, slash="/")
print("Importation of csv data complete!")
#%%## Extract features for each click #####
# mean freq, median freq, freq std
if input("(Re)compute features? [Y/n] ") == "Y":
features = np.zeros((0,3))
linked_files = np.zeros(0, dtype=int)
print("\nPre execution: Looking for clicks in recordings.")
for file in range(len(audio_paths)): #np.array([152])
# Load and transform audio
print(f"\r\tLoading features: file {file+1} on {len(audio_paths)}", end='\r')
signal = load(os.path.join(audio_f, audio_paths[file][4:8], audio_paths[file]),
sr=None)[0]
signal_high = butter_pass_filter(signal, cut_low, sr,
num_order, mode='high')
Amplitude_audio = stft(signal_high, n_fft=n_fft,
hop_length=hop_length, window='hamming')
# load clicks positions
clicks_pos = np.load(os.path.join(res_f, peaks_f, audio_paths[file][-27:-4] + "_peaks.npy"))
# for each click, extract features
clicks_pos_spec = np.round(clicks_pos/hop_length).astype(int)
mean_freq = spectral_centroid(signal_high, sr=sr, n_fft=n_fft,
hop_length=hop_length, window='hamming')[0,clicks_pos_spec]
median_freq = np.argsort(np.abs(Amplitude_audio[:,clicks_pos_spec]), axis=0)[(hop_length+1)//2,:]*sr/256
freq_std = np.std(Amplitude_audio[:,clicks_pos_spec], axis=0)
# expend results
features = np.append(features, np.array([mean_freq, median_freq, freq_std]).T, axis=0)
linked_files = np.append(linked_files, np.repeat(file, len(clicks_pos_spec)))
# save results
np.save(os.path.join(res_f, save_features, "features.npy"),
features)
np.save(os.path.join(res_f, save_features, "linked_files.npy"),
linked_files)
print("\nPre execution: Finished.")
### Make UMAP projection ###
print("\nMain execution: Projection.")
features = np.load(os.path.join(res_f, save_features, "features.npy"))
linked_files = np.load(os.path.join(res_f, save_features, "linked_files.npy"))
print(f"\tClassification of {len(linked_files)} clicks")
# fit UMAP
if input("Fit UMAP projection ? [Y/n] ") == "Y":
reducer = umap.UMAP(n_neighbors=150, min_dist=0, random_state=None, low_memory=True, verbose=True)
scaler = StandardScaler()
features_nrm = scaler.fit_transform(features)
reducer.fit(features_nrm[::10])
embedding1 = reducer.transform(features_nrm)
res_umap1 = pd.DataFrame({'UMAP1': embedding1[:,0]})
for i in range(1, 2):
res_umap1['UMAP'+str(i+1)] = embedding1[:,i]
res_umap1.to_csv(os.path.join(res_f, save_features, "projection.csv"))
f_name = os.path.join(res_f, save_features, "reducer.sav")
pickle.dump(reducer, open(f_name, 'wb'))
else:
res_umap1 = pd.read_csv(os.path.join(res_f, save_features, "projection.csv"))
print("\tUMAP ready for display!")
use_files = np.copy(linked_files).astype(object)
for file in np.unique(use_files):
use_files[use_files == file] = audio_paths[file][-27:]
# display UMAP
shuffle=np.random.permutation(res_umap1.shape[0])
results=res_umap1.iloc[shuffle].copy()
for cat in ["date"]: #['acoustic','behavior','fishing_net','net','date']:
category_list = get_category(use_files, audio_paths, data_20_21, category=cat)[shuffle]
plt.figure()
sns.scatterplot(data=results, x='UMAP1', y='UMAP2',
hue=category_list).set_title(f'UMAP projection of {res_umap1.shape[0]} clicks')
sns.set_theme(style="ticks", font_scale=2)
if cat=="date":
handles, labels = plt.gca().get_legend_handles_labels()
dates = [datetime.strptime(ts, "%d/%m/%Y") for ts in labels]
order = np.argsort(dates)
plt.legend([handles[idx] for idx in order],
[labels[idx] for idx in order],
loc='lower right')
else:
plt.legend(loc='lower right')
plt.show(block=True)
print("\nMain execution: The End.")
##### MANUAL ZONE: selection of groups ######
print("\nSelection of groups")
# import data
coords = pd.read_csv(os.path.join(res_f, save_features, "projection.csv")).iloc[:,1:]
# 2 colors : green and red
# parameters found empirically
infos = np.array([
[14.3, 4, 2, 5.5, 0, 'green'],
[14.25, 9, 1, 5, 0, 'red']
])
fig = plt.figure()
ax = fig.add_subplot(1, 1, 1)
rad_cc = np.zeros( (coords.shape[0],(len(infos))) )
colors_array = np.array(['black'] * coords.shape[0])
for i in range(len(infos)):
ellipse = Ellipse(xy=(float(infos[i][0]),float(infos[i][1])),
width=float(infos[i][2]),
height=float(infos[i][3]),
angle=float(infos[i][4]),
edgecolor='r', fc='None', lw=2)
ax.add_patch(ellipse)
cos_angle = np.cos(np.radians(180.-float(infos[i][4])))
sin_angle = np.sin(np.radians(180.-float(infos[i][4])))
xc = np.array(coords.iloc[:,0]) - float(infos[i][0])
yc = np.array(coords.iloc[:,1]) - float(infos[i][1])
xct = xc * cos_angle - yc * sin_angle
yct = xc * sin_angle + yc * cos_angle
rad_cc[:,i] = (xct**2/(float(infos[i][2])/2.)**2) + (yct**2/(float(infos[i][3])/2.)**2)
colors_array[np.where(rad_cc[:,i] <= 1.)[0]] = infos[i][-1]
ax.scatter(coords.iloc[:,0],coords.iloc[:,1],
c=colors_array,linewidths=0.3)
plt.show(block=True)
# get idx of the points in each ellipse
green_group = np.where(rad_cc[:,0] <= 1.)[0]
red_group = np.where(rad_cc[:,1] <= 1.)[0]
black_group = np.delete(np.arange(len(rad_cc)), np.unique(np.append(green_group, red_group)))
# # let's see the small groups on spectrograms
# green_names = np.copy(linked_files[green_group])
# red_names = np.copy(linked_files[red_group])
# names = np.intersect1d(np.unique(red_names), np.unique(green_names))
# # selecting a random file
# file = names[3]
# signal, sr = load(os.path.join(audio_f, audio_paths[file][4:8], audio_paths[file]),
# sr=None)
# peaks = np.load(os.path.join(res_f, peaks_f, audio_paths[file][-27:-4] + "_peaks.npy"))
# limit_point = np.argwhere(linked_files == file)[:,0]
# rad_file = rad_cc[limit_point]
# colors = np.append(infos[:,-1], ["black"])
# values = np.repeat(-1, len(rad_file))
# values[np.where(rad_file[:,0] <= 1.)[0]] = 0
# values[np.where(rad_file[:,1] <= 1.)[0]] = 1
# fig, axs = plt.subplots(nrows=2, sharex=True)
# axs[0].specgram(signal, xextent=(0,int(60*sr)))
# for value in np.unique(values):
# arr = np.zeros(int(60*sr))
# arr[peaks[values==value]] = 1
# axs[1].plot(arr, colors[value])
# plt.show(block=True)
print("\tBlack points are echolocation clicks, green and red points are SONARs")
### UMAP projection without SONARs ###
print("\tRe-projection without red and green points")
reduced_features = features[black_group]
reduced_linked_files = linked_files[black_group]
print(f"\tClassification of {len(reduced_linked_files)} clicks")
# Fit new UMAP
if input("Fit UMAP projection ? [Y/n] ") == "Y":
reducer = umap.UMAP(n_neighbors=150, min_dist=0.5, n_components=2, random_state=None)
scaler = StandardScaler()
reduced_features_nrm = scaler.fit_transform(reduced_features)
embedding1 = reducer.fit_transform(reduced_features_nrm)
res_umap = pd.DataFrame({'UMAP1': embedding1[:,0]})
for i in range(1, 2):
res_umap['UMAP'+str(i+1)] = embedding1[:,i]
res_umap.to_csv(os.path.join(res_f, save_features, "projection_without_sonar.csv"))
else:
res_umap = pd.read_csv(os.path.join(res_f, save_features, "projection_without_sonar.csv"))
# display projection
use_files = np.copy(reduced_linked_files).astype(object)
for file in np.unique(use_files):
use_files[use_files == file] = audio_paths[file][-27:]
shuffle=np.random.permutation(res_umap.shape[0])
results=res_umap.iloc[shuffle].copy()
for cat in ["date"]: #['acoustic','behavior','fishing_net','net','date']:
category_list = get_category(use_files, audio_paths, data_20_21, category=cat)[shuffle]
plt.figure()
sns.scatterplot(data=results, x='UMAP1', y='UMAP2',
hue=category_list).set_title(f'UMAP projection of {res_umap.shape[0]} clicks')
sns.set_theme(style="ticks", font_scale=2)
if cat=="date":
handles, labels = plt.gca().get_legend_handles_labels()
dates = [datetime.strptime(ts, "%d/%m/%Y") for ts in labels]
order = np.argsort(dates)
plt.legend([handles[idx] for idx in order],
[labels[idx] for idx in order],
loc='lower right')
else:
plt.legend(loc='lower right')
plt.show(block=False)
print("End of the analysis.")
### update results (exclude SONARs) ###
if input("Update count of clicks and save new groups ? [Y/n]") == "Y":
# => mainly anthropogenic clicks, we exclude them and see you next script !
np.save(os.path.join(res_f, save_features, "idx_clicks_not_from_humans.npy"),
black_group)
##### update count of clicks #####
curr_numbers = pd.read_csv(os.path.join(res_f, "number_of_clicks_" + version + ".csv"))
new_count = np.zeros(len(audio_paths))
for file in range(len(audio_paths)):
here = np.where(curr_numbers['audio_names'] == audio_paths[file][-27:-4])[0]
curr_numbers.iloc[here, 0] = np.sum(reduced_linked_files==file)
curr_numbers.to_csv(os.path.join(res_f, "projection_updated_number_of_clicks_" + "please" + ".csv"),
index=False)
print("\nEnd of the script.")
\ No newline at end of file
# -*- coding: utf-8 -*-
"""
Created on Sun Dec 26 13:12:14 2021
@author: Loïc
"""
#%% Packages importations
import csv
import os
import pandas as pd
import numpy as np
from scipy.signal import butter, filtfilt
#%% Functions process
def import_csv(csv_name, folder, separator, useless=True):
"""
Parameters
----------
csv_name : STRING
Name of the csv file that needs to be imported
folder : STRING, optional
Path to the folder containing csv file.
The default is data_folder (see Parameters section).
separator : STRING
Separator for folders.
useless : BOOLEAN, optional
Does the file contains useless infos after the table ?
If True, remove those infos
Returns
-------
data : LIST
List containing all rows of the csv file.
Exclusion of last lines if they don't end with .wav.
"""
data = []
# read data csv
with open(folder + separator + csv_name, newline="") as csv_file:
lines = csv.reader(csv_file, delimiter=',')
for row in lines:
data = data + [row]
csv_file.close()
# clean csv (last lines contain useless info)
n = 0
while useless:
# in case wrong use of the function
if n == len(data):
useless = False
n = 0
raise Exception("First column contains no audio file name")
# exit the loop when audio is found
if data[-n][0].endswith(".wav"):
useless = False
# search audio in next line
else:
n += 1
data = data[0:-n]
return data
def get_csv(csv_folder, slash="\\"):
"""
Parameters
----------
csv_folder : STRING
Path to a folder containing ONLY csv file.
slash : STRING
Separator for folders.
Returns
-------
data_20_21 : DATAFRAME
Contains the inforamtion inside the .CSVs.
audio_paths : LIST
Names corresponding to audio files in the first column of the .CSVs.
"""
csv_names = [a for a in os.listdir(csv_folder) if a.endswith('.csv')]
# import data
data = import_csv(csv_names[0], csv_folder, separator=slash)
for i in range(1,len(csv_names)):
data = data + import_csv(csv_names[i], csv_folder, separator=slash)[1:]
data_frame = pd.DataFrame(data=data[:][1:], columns=data[:][0])
# change dtype for selected columns
for i in range(3,17):
data_frame.iloc[:,i] = data_frame.iloc[:,i].astype(int)
# fetch audio files names
audio_names = np.copy([])
for filename in data_frame["Fichier Audio"]:
if filename.endswith(".wav"):
audio_names = np.append(audio_names, filename.replace('/', slash))
return data_frame, audio_names
def butter_pass_filter(data, cutoff, fs, order=1, mode='high'):
"""
Parameters
----------
data : NUMPY ARRAY
Audio signal (1D array)
cutoff : INT or FLOAT
Frequency limit for the filter.
fs : INT
Sample rate of the audio given as 'data'
order : INT, optional
Order of the highpass filter. The default is 1.
mode : STRING, optional
Mode of the filter (higpass or low pass). Must be 'high' or 'low'
Returns
-------
y : NUMPY ARRAY
Filtered signal.
"""
normal_cutoff = cutoff / (fs/2)
# Get the filter coefficients
b, a = butter(order, normal_cutoff, btype=mode, analog=False)
y = filtfilt(b, a, data)
return y
def TeagerKaiser_operator(audio):
"""
Parameters
----------
audio : NUMPY ARRAY
Audio signal (1D array).
Returns
-------
tk_signal : NUMPY ARRAY
Signal energy computed with teager kaiser operator (1D array).
"""
# Define Teager-Kaiser operator
tk_signal = np.empty(audio.shape)
# Formula : TK = x(t)**2 - x(t-1)*x(t+1)
tk_signal[1:(audio.shape[0]-1)] = (audio[1:(audio.shape[0]-1)]**2) - \
(audio[0:(audio.shape[0]-2)]*audio[2:(audio.shape[0])])
tk_signal[0] = 0 # set first and last value to 0 (neutral)
tk_signal[-1] = 0
return tk_signal
#%% Functions plots
def get_category(samples, names, data_frame, category='acoustic'):
"""
Parameters
----------
samples : LIST OF STRINGS.
Origin of each click,
should be like ['SCW1807_20200711_083600_extract0.npy']).
names : LIST OF STRINGS
Names of each recording,
(should be like ['11072020/SCW1807_20200711_082400.wav']).
data_frame : PANDAS DATAFRAME
Dataframe containing all csv infos.
category : TYPE, optional
Category to extratc from dataframe. The default is 'acoustic'.
Should be 'acoustic', 'fishing_net', 'behavior', 'beacon', 'date',
'number', 'net' or 'none'
Returns
-------
TYPE
DESCRIPTION.
"""
use_samples = np.array([file[:23] for file in samples])
use_names = np.array([name.split('/')[-1][-27:-4] for name in names])
cat_list = np.zeros(use_samples.shape, dtype="object")
if category == 'acoustic':
start, stop = 3, 10
elif category == 'fishing_net':
start, stop = 10, 13
elif category == 'behavior':
start, stop = 13, 16
elif category == 'none':
return np.array(['none']*len(use_samples))
for i, file in enumerate(use_samples):
idx_ind = np.where(file == use_names)[0][0]
if category == 'beacon':
cat_list[i] = data_frame.iloc[idx_ind, 17]
elif category == 'date':
cat_list[i] = data_frame.iloc[idx_ind, 1]
elif category == 'number':
cat_list[i] = data_frame.iloc[idx_ind, 18]
elif category == 'net':
cat_list[i] = data_frame.iloc[idx_ind,19]
else:
column = np.argmax(data_frame.iloc[idx_ind, start:stop])+start
cat_list[i] = data_frame.columns[column]
if category == 'beacon':
NC = np.where(get_category(samples, names, data_frame, category='acoustic')
== 'AV')[0]
cat_list[NC] = 'NC'
return cat_list
\ No newline at end of file
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment