MarineBioAcousticsRC/Triton

ShipDetector - Karli's version of the thresholds

kmerkens opened this issue · 0 comments

Here's my version of the thresholds for distinguishing between ships and non-ships (ambient), which are mostly delphinids at the Hawaii locations. Starting line 342 in sh_passage_detector.m. I haven't tried them for any other sites, but thought someone might find them helpful!

%Karli's Hawaii version
for m = 1:size(noise,1)
    RLs(m,:) = [mean(RLsB1(noise(m,1):noise(m,2))), mean(RLsB2(noise(m,1):noise(m,2))),...
        mean(RLsB3(noise(m,1):noise(m,2)))]; 
    %if RLs(m,1)>80 & (RLs(m,2)<60 | RLs(m,3)<60)
    if RLs(m,3) > RLs(m,2)
        labels{m} = 'ship1';
    elseif RLs(m,1)>55
            labels{m} = 'ship2';
    elseif RLs(m,1)-RLs(m,3) < 10
            labels{m} = 'ambient';
    elseif (RLs(m,1) - mean(RLs(m,2:3))) > 10
            labels{m} = 'ship';
    else
            labels{m} = 'ambient';
    end
end

% %Alba's Version
% for m = 1:size(noise,1)
% RLs= [mean(RLsB1(noise(m,1):noise(m,2))), mean(RLsB2(noise(m,1):noise(m,2))),...
% mean(RLsB3(noise(m,1):noise(m,2)))];
%
% if RLs (1) > RLB1thr %&& RLs(2) > RLB2thr && RLs(3) > RLB3thr % %RLs(m,1)>80 & (RLs(m,2)<60 | RLs(m,3)<60)
% labels{m} = 'ship';
% else
% if (RLs(2)< 0 || RLs(3)<0)
% noise(m,:) = [0 0];
% elseif (RLs(1) - mean(RLs(2:3))) > 15
% labels{m} = 'ship';
% else
% labels{m} = 'ambient';
% end
% end
% end