-
Notifications
You must be signed in to change notification settings - Fork 12
/
sp_density_params.m
101 lines (95 loc) · 2.71 KB
/
sp_density_params.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
function spParams = sp_density_params(varargin)
% Establish density parameter, then update for species
% specific defaults, and user preferences.
% Pulled into subroutine asb 10/5/2018
% get user input and set up file names
n = 1;
while n <= length(varargin)
switch varargin{n}
case 'sp'
sp = varargin{n+1}; n=n+2;
case 'site'
site = varargin{n+1}; n=n+2;
otherwise
error('Bad optional argument: "%s"', varargin{n});
end
end
% Set default parameters
fpRate = 0; % False Positive Rate
clickRate = []; % Click Rate (clicks/second)
pDet = []; % Probability of detection
maxRadius_km = []; % Maxium range (km)
%% Set parameters according to sp
% sperm whale parameters for density
if (strcmp(sp,'PM') || strcmp(sp,'pm') || strcmp(sp,'Pm'))
% if strcmp(site,'GC')
% fpRate = 0.0274;
% fpRateCV = 0.2255;
% clickRate = 1.117;
% clickRateCV = 0.4029;
% pDet = 0.0554;
% pDetCV = 0.4880;
% maxRadius_km = 12;
if strcmp(site,'GC')
fpRate = 0.0274;
fpRateCV = 0.2255;
clickRate = 1.4454;
clickRateCV = 0.3478;
pDet = 0.0558;
pDetCV = 0.4836;
maxRadius_km = 12;
elseif strcmp(site,'MC980')
fpRate = 0.0669;
fpRateCV = 0.1409;
clickRate = 1.5129;
clickRateCV = 0.3478;
pDet = 0.0648;
pDetCV = 0.4786;
maxRadius_km = 12;
elseif strcmp(site,'MC800')
fpRate = 0.0343;
fpRateCV = 0.1968;
clickRate = 1.4493;
clickRateCV = 0.3478;
pDet = 0.0632;
pDetCV = 0.4629;
maxRadius_km = 12;
elseif strcmp(site,'DTnoSeas')
fpRate = 0.0815;
fpRateCV = 0.5198;
clickRate = 1.3515;
clickRateCV = 0.3478;
pDet = 0.0533;
pDetCV = 0.5007;
maxRadius_km = 12;
elseif strcmp(site,'DTinSeas')
fpRate = 0.0815;
fpRateCV = 0.5198;
clickRate = 1.3671;
clickRateCV = 0.3478;
pDet = 0.0531;
pDetCV = 0.4943;
maxRadius_km = 12;
elseif strcmp(site,'DToutSeas')
fpRate = 0.0815;
fpRateCV = 0.5198;
clickRate = 1.2824;
clickRateCV = 0.3478;
pDet = 0.0518;
pDetCV = 0.4857;
maxRadius_km = 12;
else
warning('Unknown Site!!!')
end
%%%% "Species" parameters for density goes here
else
warning('Unknown Species Type!!!')
end
%% create struct to return parameters
spParams.fpRate = fpRate;
spParams.fpRateCV = fpRateCV;
spParams.clickRate = clickRate;
spParams.clickRateCV = clickRateCV;
spParams.pDet = pDet;
spParams.pDetCV = pDetCV;
spParams.maxRadius_km = maxRadius_km;