-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmean_cmp2.m
119 lines (102 loc) · 3.06 KB
/
mean_cmp2.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
114
115
116
117
118
%
% mean_cmp2 -- compare ccast and noaa mean stats
%
addpath /asl/matlib/fileexchange/export_fig
% load data from mean_cfovs and mean_ifovs
ccast = load('ccast_MW_2014_340-342_hr.mat');
noaa = load('noaa_MW_2014_340-342.mat');
% basic test params
user = ccast.user;
band = ccast.band;
vgrid = ccast.vgrid;
% single and double differences
b1dif = ccast.bavg - noaa.bavg;
b2dif = ccast.bavg_diff - noaa.bavg_diff;
% plot names and colors
fname = fovnames;
fcolor = fovcolors;
% plot frequency span
pv1 = 10 * floor(user.v1 / 10);
pv2 = 10 * ceil(user.v2 / 10);
%-----------------------------------
% single FOV spectra and difference
%-----------------------------------
figure(1); clf
subplot(3,1,1)
ifov = 1;
plot(vgrid, b1dif(:, ifov))
ax = axis; ax(1) = pv1; ax(2) = pv2; axis(ax)
% xlabel('wavenumber')
ylabel('BT, K')
title(sprintf('ccast minus noaa %s FOV %d', ccast.band, ifov))
grid on; zoom on
subplot(3,1,2)
ifov = 2;
plot(vgrid, b1dif(:, ifov))
ax = axis; ax(1) = pv1; ax(2) = pv2; axis(ax)
% xlabel('wavenumber')
ylabel('BT, K')
title(sprintf('ccast minus noaa %s FOV %d', ccast.band, ifov))
grid on; zoom on
subplot(3,1,3)
ifov = 5;
plot(vgrid, b1dif(:, ifov))
ax = axis; ax(1) = pv1; ax(2) = pv2; axis(ax)
xlabel('wavenumber')
ylabel('dBT, K')
title(sprintf('ccast minus noaa %s FOV %d', ccast.band, ifov))
grid on; zoom on
pname = sprintf('ccast_noaa_%s_fig_1', band);
export_fig([pname,'.pdf'], '-m2', '-transparent')
%----------------------------
% single difference breakout
%----------------------------
figure(2); clf
subplot(2,1,1)
ix = [1 3 7 9];
set(gcf, 'DefaultAxesColorOrder', fcolor(ix, :));
plot(vgrid, b1dif(:, ix))
ax = axis; ax(1) = pv1; ax(2) = pv2; axis(ax)
% xlabel('wavenumber')
ylabel('dBT, K')
title(sprintf('%s ccast - noaa mean, corner FOVs', ccast.band))
legend(fname{ix}, 'location', 'eastoutside')
grid on; zoom on
subplot(2,1,2)
ix = [2 4 6 8];
set(gcf, 'DefaultAxesColorOrder', fcolor(ix, :));
plot(vgrid, b1dif(:, ix))
ax = axis; ax(1) = pv1; ax(2) = pv2; axis(ax)
xlabel('wavenumber')
ylabel('dBT, K')
title(sprintf('%s ccast - noaa mean, side FOVs', ccast.band))
legend(fname{ix}, 'location', 'eastoutside')
grid on; zoom on
pname = sprintf('ccast_noaa_%s_fig_2', band);
export_fig([pname,'.pdf'], '-m2', '-transparent')
%----------------------------
% double difference breakout
%----------------------------
figure(3); clf
subplot(2,1,1)
ix = [1 3 7 9];
set(gcf, 'DefaultAxesColorOrder', fcolor(ix, :));
plot(vgrid, b2dif(:, ix))
ax = axis; ax(1) = pv1; ax(2) = pv2; axis(ax)
% xlabel('wavenumber')
ylabel('dBT, K')
title(sprintf('%s ccast - noaa relative, corner FOVs', ccast.band))
legend(fname{ix}, 'location', 'eastoutside')
grid on; zoom on
subplot(2,1,2)
ix = [2 4 6 8];
set(gcf, 'DefaultAxesColorOrder', fcolor(ix, :));
plot(vgrid, b2dif(:, ix))
ax = axis; ax(1) = pv1; ax(2) = pv2; axis(ax)
xlabel('wavenumber')
ylabel('dBT, K')
title(sprintf('%s ccast - noaa relative, side FOVs', ccast.band))
legend(fname{ix}, 'location', 'eastoutside')
grid on; zoom on
pname = sprintf('ccast_noaa_%s_fig_3', band);
export_fig([pname,'.pdf'], '-m2', '-transparent')