diff --git a/BBPs/1-BBP_detection.py b/BBPs/1-BBP_detection.py index 5b0a9017e61e4d5a68d71a245f3aaf9365ccae2f..2f7f7f5224e4614da20dfd611aaa9a59abb0d93a 100644 --- a/BBPs/1-BBP_detection.py +++ b/BBPs/1-BBP_detection.py @@ -22,9 +22,9 @@ 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 +audio_f = "./../Audio_data" # 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 diff --git a/BBPs/2-manual_verification.py b/BBPs/2-manual_verification.py index e540a243c3b9f5e32c80b51bba1723e33fbff7a6..54134273ea6294bc27bc2dc8f24b9fa6a160f6f9 100644 --- a/BBPs/2-manual_verification.py +++ b/BBPs/2-manual_verification.py @@ -23,9 +23,9 @@ 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 +audio_f = "./../Audio_data" # 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 diff --git a/Clicks/1-detection_of_clicks.py b/Clicks/1-detection_of_clicks.py index a189c6c376a15ea72da51a07fec3871f9f9867a7..5739e8bbbd242dae1ef2c8da8b2b4100289419c8 100644 --- a/Clicks/1-detection_of_clicks.py +++ b/Clicks/1-detection_of_clicks.py @@ -20,9 +20,9 @@ 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_f = "./../Audio_data" # Path to recordings +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 diff --git a/Clicks/3-projection_3features.py b/Clicks/3-projection_3features.py index 54df7fb4c5006eeda35f2c2537dc6684d612c31e..ad7bd6d018acf35ce2da35a94bf4142e8bcfbf63 100644 --- a/Clicks/3-projection_3features.py +++ b/Clicks/3-projection_3features.py @@ -24,7 +24,7 @@ print("Importation of packages done!") #%% Parameters print("\rSetting up parameters...", end="\r") -audio_f = "/media/loic/DOLPHINFREE/Acoustique" # Path to audio data +audio_f = "./../Audio_data" # Path to recordings csv_f = "./../CSV_data" # Path to csv data res_f = "./Results" # Path to save results peaks_f = "peaks_02052022" # Path to save results diff --git a/Clicks/__pycache__/ClickUtils.cpython-39.pyc b/Clicks/__pycache__/ClickUtils.cpython-39.pyc deleted file mode 100644 index 637b1f10f4e9ed909a15627bce8f38dc038a2d95..0000000000000000000000000000000000000000 Binary files a/Clicks/__pycache__/ClickUtils.cpython-39.pyc and /dev/null differ diff --git a/README.md b/README.md index 5b42868ef895ad9a4da999133dc4ff5998b1ec4b..7fb42ba0b7138120cb95a947a01c6fc2ac29bedd 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,31 @@ # Scripts-DOLPHINFREE - Scripts used for mdpi article +A repository containing scripts and data used in *Lehnhoff et al, 2022* (in submission process). + +## Description +This repository contains the files used to analyse data obtained during the <a href="https://umr-marbec.fr/en/the-projects/dolphinfree/">DOLPHINFREE project</a>. The goal was to detect and identify clicks and whisltes in audio recordings of common dolphins. + +"BBPs", "Clicks" and "Whisltes" folders each treat a type of signal emitted by dolphins. +- Each folder contains numbered scripts for step-by-step execution. +- ___Utils.py files contain the functions necessary to the execution of the other scripts +- "Results" and other subfolders contain... results and other outputs (surprise surprise). + +"Stats" folder contains the files used to carry on a statistical analysis of extracted data. +"CSV_data" folder contains the visual observations made during experiments. +"Audio_data" folder is empty. Files cannot be made available publicly due to the presence of copyrighted elements. + +## Get Started +.py files were developped using Python 3.9.7. +If needed, you can add missing packages to your environement using: +```bash +$ pip install name-package +``` + +.matlab files can be executed in matlab or octave. + +## Contact +Feel free to contact me if you have questions, tips or anything else to say. I'd really appreciate it! + +Loïc Lehnhoff - <loic.lehnhoff@gmail.com> + +## Publication +**IN SUBMISSION PROCESS:** Lehnhoff, L.; Glotin, H.; Bernard, S.; Dabin, W.; Le Gall, Y.; Menut, E.; Meheust, E.; Peltier, H.; Pochat, A.; Pochat, K.; Rimaud, T.; Sourget, Q.; Spitz, J.; Van Canneyt, O.; Mérigot, B. *Behavioural response of common *dolphins Delphinus* delphis to a bio-inspired acoustic device for limiting fishery by-catch.* Sustainability **2022**, 1, 0 \ No newline at end of file diff --git a/Whistles/1-Identification_of_whistles.py b/Whistles/1-Identification_of_whistles.py index f914876f4fd700539d259585e52582f8c68885ab..766961b5269bf706069fc69b94a371884ce696b3 100644 --- a/Whistles/1-Identification_of_whistles.py +++ b/Whistles/1-Identification_of_whistles.py @@ -22,9 +22,9 @@ print("Importation of packages complete!") #%% 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 = "./Trajectories" # Path were +audio_f = "./../Audio_data" # Path to recordings +csv_f = "./../CSV_data" # Path to data in csv +save_f = "./Trajectories" # Path were # Audio parameters start = 0 # start time for signal (in sec) diff --git a/Whistles/2-get_stats_of_whistles.py b/Whistles/2-get_stats_of_whistles.py index eded8aba9691c26053908832cebeee730cc69105..af3151cd960fe731de49e9ecd97ccbb53cefd7dd 100644 --- a/Whistles/2-get_stats_of_whistles.py +++ b/Whistles/2-get_stats_of_whistles.py @@ -22,9 +22,9 @@ print("Importation of packages complete!") #%% Parameters 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 = "./Trajectories" # Path were +audio_f = "./../Audio_data" # Path to recordings +csv_f = "./../CSV_data" # Path to data in csv +save_f = "./Trajectories" # Path were results_f = "./Evaluation" keep_if = 1 # minimal length of a whistle to be kept