-
Notifications
You must be signed in to change notification settings - Fork 23
/
examineSingleBathyResult.m
114 lines (94 loc) · 3.41 KB
/
examineSingleBathyResult.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
102
103
104
105
106
107
108
109
110
111
112
113
function examineSingleBathyResult(bathy)
% examineSingleBathyResult(bathy)
%
% simple displays of variable in the bathy structure to give a visual feel
% for the elements of performance. bathy is the user-supplied bathy
% structure.
% find the list of unique frequencies
fB = bathy.fDependent.fB(:);
fBList = unique(fB(~isnan(fB)));
for i = 1: length(fBList)
f = fBList(i);
id = find(fB == f);
fullSize = size(bathy.fDependent.fB);
small = fullSize(1:2);
empty = nan(small);
[r,c,d] = ind2sub(fullSize,id);
idSmall = sub2ind(small,r,c);
str=datestr(datenum('19700101','yyyymmdd')+str2double(bathy.epoch)/24/3600,21);
%str = datestr(epoch2Matlab(str2num(bathy.epoch)), 21);
str = [str ', f = ' num2str(f,'%.3f') ' Hz'];
% now plot figs
figure(2); clf
subplot(331);
k = empty;
k(idSmall) = bathy.fDependent.k(id);
imagesc(bathy.xm, bathy.ym, k);
caxis([0 2*median(median(k,'omitnan'),'omitnan')]); colorbar, title('k')
set(gca, 'ydir', 'norm')
subplot(332)
a = empty;
a(idSmall) = bathy.fDependent.a(id);
imagesc(bathy.xm, bathy.ym, a*180/pi);
caxis([-45 45]); colorbar, title(str);
set(gca, 'ydir', 'norm')
subplot(333)
hTemp = empty;
hTemp(idSmall) = bathy.fDependent.hTemp(id);
imagesc(bathy.xm, bathy.ym,hTemp);
caxis([0 10]); colorbar, title('hTemp')
set(gca, 'ydir', 'norm')
subplot(334)
kErr = empty;
kErr(idSmall) = bathy.fDependent.kErr(id);
imagesc(bathy.xm, bathy.ym,kErr);
caxis([0 2*median(median(kErr,'omitnan'),'omitnan')]); colorbar, title('kErr')
set(gca, 'ydir', 'norm')
subplot(335)
aErr = empty;
aErr(idSmall) = bathy.fDependent.aErr(id);
imagesc(bathy.xm, bathy.ym,aErr*180/pi);
caxis([0 30]); colorbar, title('aErr')
set(gca, 'ydir', 'norm')
subplot(336)
hTempErr = empty;
hTempErr(idSmall) = bathy.fDependent.hTempErr(id);
imagesc(bathy.xm, bathy.ym,hTempErr);
caxis([0 5]); colorbar, title('hTempErr')
set(gca, 'ydir', 'norm')
subplot(337)
imagesc(bathy.xm, bathy.ym, bathy.fCombined.h(:,:));
caxis([0 10]); colorbar, title('h')
set(gca, 'ydir', 'norm')
subplot(338)
imagesc(bathy.xm, bathy.ym, bathy.fCombined.hErr(:,:));
caxis([0 5]); colorbar, title('hErr')
set(gca, 'ydir', 'norm')
subplot(339)
fNum = empty;
fNum(idSmall) = d;
fNum(isnan(fNum)) = 0;
imagesc(bathy.xm, bathy.ym,fNum);
colorbar, title('f-order')
set(gca, 'ydir', 'norm')
input('Hit enter to see next frequency, <CR> to quit ');
end
%
% Copyright (C) 2017 Coastal Imaging Research Network
% and Oregon State University
% This program is free software: you can redistribute it and/or
% modify it under the terms of the GNU General Public License as
% published by the Free Software Foundation, version 3 of the
% License.
% This program is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details.
% You should have received a copy of the GNU General Public License
% along with this program. If not, see
% <http://www.gnu.org/licenses/>.
% CIRN: https://coastal-imaging-research-network.github.io/
% CIL: http://cil-www.coas.oregonstate.edu
%
%key cBathy
%