How to do to import results of Pamguard software on Matlab?
How to load Pamguard pgdf files in Matlab commands?
How to open Pamguard automatic acoustic analysis results with Matlab?

How to load Pamguard pgdf files in Matlab commands (Research, Signal Processing, PAM, Cetaceans)

Passive Acoustic Monitoring.
Automatic Acoustic Detector.
Pattern recognition.
Cetoloty
Cetacean Research.
Bioinformatics.
Bioacoustics.
Matlab script.

This video was recorded on 23 september 2019.
Official Pamguard documentation may have been modified (improved) since. I hope so!

I am Doctor Olivier Dufour. (Bio) Signal Processing and Machine Learning.
https://www.researchgate.net/profile/Olivier_Dufour2
https://www.theses.fr/2016LARE0005

In the previous episode, I share the results of Pamguard software performances of classification.
Spoiler: they’re not so good.
My opinion about Pamguard software performances (Cetacean detection):
https://youtu.be/OOo8YqgtBx0

Url link to download .m codes and functions:
https://sourceforge.net/p/pamguard/svn/HEAD/tree/MatlabCode/

The 2 pdf official documentation of Pamguard software company:
(1)
PAMGUARD Training Tutorial v1_4_03 Sept2017.pdf
https://www.pamguard.org/cms/PAMGUARD%20Training%20Tutorial%20v1_4_03%20Sept2017.pdf
(2)
BinaryfilestructureforPAMGUARDdetectoroutputV4.pdf
https://www.pamguard.org/download/79/BinaryfilestructureforPAMGUARDdetectoroutputV4.pdf

Modified matlab script: (You also should modify the « readWMDData.m » function):
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
format long
clear all
cd /home/toto/Bureau/folder_results_detection_Pamguard/predictions/tout
verbose = 0;
data = [];
dat = [];
fichiers = [];
%d = dirsub(dir, fileMask);
d = dir(‘WhistlesMoans_Whistles_Contours.pgdf’); % very case sensitive. You have to separately load ‘WhistlesMoans_Whistles_Contours.pgdf’ and ‘Click_Detector_Clicks_Clicks.pgdf’ and ‘RW_Edge_Detector_Right_Whales_.pgdf’ and ‘WhistlesMoans_Whistles_Contours_*.pgdf’
for i = 1:numel(d)
if verbose
if mod(i, verbose) == 0
fprintf(‘Loading %s\n’, d(i).name);
end
end
dat = loadPamguardBinaryFile(d(i).name);
%%readWMDData.m
% if ~isempty(moduleHeader) !!!! J’ai fait sauté ce paragraphe car il me gênait pour charger les résultats de détections de whistles
% data.delays = data.delays / moduleHeader.delayScale;
% end
if ~isempty(dat)
data = [data dat];
end
fichiers = [fichiers repmat({d(i).name(30:44)}, 1, size(dat,2))];
clear dat
end
%les_dates = [data.startSample]’;
%les_dates = [data.millis]’;
les_dates = [data.date]’;
durees = [data.duration]’;
millisecondes = [data.millis]’;

dates_converties=datetime(les_dates,’ConvertFrom’,’datenum’);
dates_converties2 = datevec(dates_converties);

cd /home/toto/Bureau/folder_results_detection_Pamguard/predictions/
resultat_pred=[dates_converties2 les_dates ([data.identifier]’)];
writematrix(resultat_pred,’toutes_predictions_sifflements.csv’)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

F A C E B O O K
https://www.facebook.com/Science-Dr-Dufour-Olivier-2316438282013527/

T W I T T E R
https://twitter.com/dufour_dr


0 commentaire

Laisser un commentaire