2 % ploting. Loading - at the end of this file
4 addpath('../Setup/Various_functions/');
7 % NOTE: It does not matter
if you choose mixed or no-mixed term folders -
8 % both plots are the same.
14 % Hiss scale plasmasphere
17 DxxKp = 4/(BwForDxxKp/BwInFile);
18 %HissScale = (BwForDxxKp/BwInFile)^2 * (Kp/DxxKp)^2
19 HissScale_pp = (Kp/DxxKp)^2;
25 DxxKp = 4/(BwForDxxKp/BwInFile);
26 Bw2_0 = 2.0*10^(2.5 + 0.18 * DxxKp);
28 Bw2 = 2.0*10^(0.73 + 0.91 * Kp);
31 Bw2 = 2.0*10^(2.5 + 0.18 * Kp);
33 ChorusScale = Bw2/Bw2_0;
36 %[L_2d, epc_2d, alpha_2d, Daa_chorus_day_2d, Dpp_chorus_day_2d, Dpa_chorus_day_2d] = load_plt([path1,
'DiffCoeff/FullCode_DaysideChorus_BavD_Matrix_L45.txt'],
'permute',
'squeeze');
37 %[L_2d, epc_2d, alpha_2d, Daa_chorus_night_2d, Dpp_chorus_night_2d, Dpa_chorus_night_2d] = load_plt([path1,
'DiffCoeff/FullCode_NightsideChorus_BavD_Matrix_L45.txt'],
'permute',
'squeeze');
38 %[L_2d, epc_2d, alpha_2d, Daa_hiss_pp_2d, Dpp_hiss_pp_2d, Dpa_hiss_pp_2d] = load_plt([path1,
'DiffCoeff/FullCode_PlasmasphericHiss_SmallWaveNormalAngle_BavD_Matrix_L45.txt'],
'permute',
'squeeze');
40 % [L_2d, epc_2d, alpha_2d, Daa_chorus_day_2d, Dpp_chorus_day_2d, Dpa_chorus_day_2d] = load_plt([path1,
'DiffCoeff/DaysideChorus_OuterBelt_BavD_Matrix_L45_1keVto30MeV_Lietal2007_20091022.txt'],
'permute',
'squeeze');
42 [L_2d, epc_2d, alpha_2d, Daa_chorus_day_2d] = load_plt([path1,
'DiffCoeff/Daa_chorus_day_Full_LPA.plt'],
'permute',
'squeeze');
43 [L_2d, epc_2d, alpha_2d, Dpp_chorus_day_2d] = load_plt([path1,
'DiffCoeff/Dpp_chorus_day_Full_LPA.plt'],
'permute',
'squeeze');
44 [L_2d, epc_2d, alpha_2d, Dpa_chorus_day_2d] = load_plt([path1,
'DiffCoeff/Dap_chorus_day_Full_LPA.plt'],
'permute',
'squeeze');
46 % [L_2d, epc_2d, alpha_2d, Daa_chorus_night_2d, Dpp_chorus_night_2d, Dpa_chorus_night_2d] = load_plt([path1,
'DiffCoeff/NightsideChorus_OuterBelt_BavD_Matrix_L45_1keVto30MeV_Lietal2007_20091022.txt'],
'permute',
'squeeze');
48 [L_2d, epc_2d, alpha_2d, Daa_chorus_night_2d] = load_plt([path1,
'DiffCoeff/Daa_chorus_night_Full_LPA.plt'],
'permute',
'squeeze');
49 [L_2d, epc_2d, alpha_2d, Dpp_chorus_night_2d] = load_plt([path1,
'DiffCoeff/Dpp_chorus_night_Full_LPA.plt'],
'permute',
'squeeze');
50 [L_2d, epc_2d, alpha_2d, Dpa_chorus_night_2d] = load_plt([path1,
'DiffCoeff/Dap_chorus_night_Full_LPA.plt'],
'permute',
'squeeze');
52 % [L_2d, epc_2d, alpha_2d, Daa_hiss_pp_2d, Dpp_hiss_pp_2d, Dpa_hiss_pp_2d] = load_plt([path1,
'DiffCoeff/PlasmasphericHiss_SmallWaveNormalAngle_BavD_Matrix_L45_1keVto30MeV_Lietal2007_20091022.txt'],
'permute',
'squeeze');
55 [L_2d, epc_2d, alpha_2d, Dpa_hiss_pp_2d] = load_plt([path1,
'DiffCoeff/Dap_hiss_plume_FA_LPA.plt'],
'permute',
'squeeze');
56 [L_2d, epc_2d, alpha_2d, Daa_hiss_pp_2d] = load_plt([path1,
'DiffCoeff/Daa_hiss_plume_FA_LPA.plt'],
'permute',
'squeeze');
57 [L_2d, epc_2d, alpha_2d, Dpp_hiss_pp_2d] = load_plt([path1,
'DiffCoeff/Dpp_hiss_plume_FA_LPA.plt'],
'permute',
'squeeze');
60 alpha_2d.arr = alpha_2d.arr;%*pi/180;
61 epc_2d.arr = epc_2d.arr;%/1e3;
73 Daa_chorus_2d.arr = Daa_chorus_day_2d.arr + Daa_chorus_night_2d.arr;
74 Dpp_chorus_2d.arr = Dpp_chorus_day_2d.arr + Dpp_chorus_night_2d.arr;
75 Dpa_chorus_2d.arr = Dpa_chorus_day_2d.arr + Dpa_chorus_night_2d.arr;
78 Daa_chorus_2d.arr = Daa_chorus_2d.arr * ChorusScale * ChotrusMLT;
79 Dpp_chorus_2d.arr = Dpp_chorus_2d.arr * ChorusScale * ChotrusMLT;
80 Dpa_chorus_2d.arr = Dpa_chorus_2d.arr * ChorusScale * ChotrusMLT;
81 Daa_hiss_pp_2d.arr = Daa_hiss_pp_2d.arr * HissScale_pp * HissMLT_pp;
82 Dpp_hiss_pp_2d.arr = Dpp_hiss_pp_2d.arr * HissScale_pp * HissMLT_pp;
83 Dpa_hiss_pp_2d.arr = Dpa_hiss_pp_2d.arr * HissScale_pp * HissMLT_pp;
85 %f2 = figure(
'Units',
'inches',
'Position', [0.5 0.5 8 6], ...
86 %
'DefaultAxesFontName',
'times new roman',
'DefaultAxesFontWeight',
'bold',
'DefaultAxesFontSize', 12,...
87 %
'PaperOrientation',
'portrait',
'PaperPositionMode',
'auto',
'DefaultLineLineWidth', 2);%,
'PaperPosition', [1 1 3.8 9]);%
89 %subplot1(2, 3,
'Max', [0.90 0.95],
'Min', [0.10 0.10]);
91 %f2 = figure(
'Units',
'inches',
'Position', [0.5 0.5 4.5 5], ...
92 %
'DefaultAxesFontName',
'times new roman',
'DefaultAxesFontWeight',
'bold',
'DefaultAxesFontSize', 7,
'DefaultTextFontWeight',
'bold',
'DefaultTextFontSize', 7,...
93 %
'PaperOrientation',
'portrait',
'PaperPositionMode',
'auto',
'DefaultLineLineWidth', 2);%,
'PaperPosition', [1 1 3.8 9]);%
94 %subplot1(2, 2,
'Max', [0.85 0.95],
'Min', [0.10 0.10]);
96 f2 = figure(
'Units',
'inches',
'Position', [0.5 0.5 8.5 5], ...
97 'DefaultAxesFontName',
'times new roman',
'DefaultAxesFontWeight',
'bold',
'DefaultAxesFontSize', 7,
'DefaultTextFontWeight',
'bold',
'DefaultTextFontSize', 7,...
98 'PaperOrientation',
'portrait',
'PaperPositionMode',
'auto',
'DefaultLineLineWidth', 2);%,
'PaperPosition', [1 1 3.8 9]);%
104 subplot1(2, 5,
'Max', [0.92 0.95],
'Min', [0.05 0.10]);
107 Dxx = log10(Daa_chorus_2d.arr*units);
108 Dxx(isnan(Dxx)) = c_min;
109 Dxx(find(Dxx<c_min)) = c_min;
110 contourf(alpha_2d.arr*180/pi, epc_2d.arr, Dxx, n_color);
114 set(gca,
'yScale',
'log')
117 text(min(xlim), min(ylim), {
' (A) D_{\alpha \alpha}, ',
' Chorus '},
'VerticalAlignment',
'bottom',
'HorizontalAlignment',
'left',
'FontWeight',
'bold',
'Color',
'black');
118 ylabel(
'Energy, MeV');
122 Dxx = log10(Dpp_chorus_2d.arr*units);
123 Dxx(isnan(Dxx)) = c_min;
124 Dxx(find(Dxx<c_min)) = c_min;
125 contourf(alpha_2d.arr*180/pi, epc_2d.arr, Dxx, n_color);
129 set(gca,
'yScale',
'log')
132 text(min(xlim), min(ylim), {
' (C) D_{pp}/p^2, ',
' Chorus '},
'VerticalAlignment',
'bottom',
'HorizontalAlignment',
'left',
'FontWeight',
'bold',
'Color',
'black');
133 xlabel(
'Pitch angle, deg');
134 ylabel(
'Energy, MeV');
137 Dxx = log10(Daa_hiss_pp_2d.arr*units);
138 Dxx(isnan(Dxx)) = c_min;
139 Dxx(find(Dxx<c_min)) = c_min;
140 contourf(alpha_2d.arr*180/pi, epc_2d.arr, Dxx, n_color);
144 set(gca,
'yScale',
'log')
147 text(min(xlim), min(ylim), {
' (B) D_{\alpha \alpha}, ',
' plasmaspheric hiss '},
'VerticalAlignment',
'bottom',
'HorizontalAlignment',
'left',
'FontWeight',
'bold',
'Color',
'black');
148 text(
max(xlim), 10^((min(log10(ylim)) +
max(log10(ylim)))/2),
'log_{10}(day^{-1})',
'Rotation', 90,
'VerticalAlignment',
'top',
'HorizontalAlignment',
'center',
'FontWeight',
'bold');
149 ax_pos =
get(gca,
'Position');
153 Dxx = log10(Dpp_hiss_pp_2d.arr*units);
154 Dxx(isnan(Dxx)) = c_min;
155 Dxx(find(Dxx<c_min)) = c_min;
156 contourf(alpha_2d.arr*180/pi, epc_2d.arr, Dxx, n_color);
160 set(gca,
'yScale',
'log')
163 text(min(xlim), min(ylim), {
' (D) D_{pp}/p^2, ',
' plasmaspheric hiss '},
'VerticalAlignment',
'bottom',
'HorizontalAlignment',
'left',
'FontWeight',
'bold',
'Color',
'black');
164 xlabel(
'Pitch angle, deg');
167 cl = colorbar('West');
168 cl_pos = get(cl, 'Position');
169 cl_x_pos = ax_pos(1) + ax_pos(3) + 0.035;%0.015; %0.925
170 %cl_x_pos = ax_pos2(1) + ax_pos2(3) + 0.035;%0.015; %0.925
171 set(cl, 'Position', [cl_x_pos, cl_pos(2), cl_pos(3), cl_pos(4)]);
174 %%%save_picture(
gcf, [path1, 'Figures/Figure_1_1'], 'jpg', 'pdf', 'epsc', 'fig');
177 %f2 = figure('Units', 'inches', 'Position', [0.5 0.5 4.5 5], ...
178 % 'DefaultAxesFontName', 'times new roman', 'DefaultAxesFontWeight', 'bold', 'DefaultAxesFontSize', 7, 'DefaultTextFontWeight', 'bold', 'DefaultTextFontSize', 7,...
179 % 'PaperOrientation', 'portrait', 'PaperPositionMode', 'auto', 'DefaultLineLineWidth', 2);%, 'PaperPosition', [1 1 3.8 9]);%
181 %subplot1(2, 2, 'Max', [0.85 0.95], 'Min', [0.10 0.10]);
186 Dxx = log10(abs(Dpa_chorus_2d.arr*units));
187 Dxx(isnan(Dxx)) = c_min;
188 Dxx(find(Dxx<c_min)) = c_min;
189 contourf(alpha_2d.arr*180/pi, epc_2d.arr, Dxx, n_color);
193 set(gca, 'yScale', 'log')
196 text(min(xlim), min(ylim), {
' (E) |D_{p \alpha}/p|, ',
' Chorus '},
'VerticalAlignment',
'bottom',
'HorizontalAlignment',
'left',
'FontWeight',
'bold',
'Color',
'black');
197 ax_pos2 =
get(gca,
'Position');
198 text(
max(xlim), 10^((min(log10(ylim)) +
max(log10(ylim)))/2),
'log_{10}(day^{-1})',
'Rotation', 90,
'VerticalAlignment',
'top',
'HorizontalAlignment',
'center',
'FontWeight',
'bold');
199 ylabel(
'Energy, MeV');
203 Dxx = sign(Dpa_chorus_2d.arr)*2;
204 contourf(alpha_2d.arr*180/pi, epc_2d.arr, Dxx, 3);
205 %pcolor(alpha_2d.arr*180/pi, epc_2d.arr, Dxx);
207 set(gca,
'yScale',
'log')
212 text(min(xlim), min(ylim), {
' (G) sign(D_{p \alpha}), ',
' Chorus '},
'VerticalAlignment',
'bottom',
'HorizontalAlignment',
'left',
'FontWeight',
'bold',
'Color', color1);
213 xlabel(
'Pitch angle, deg');
214 ax_pos3 =
get(gca,
'Position');
215 text(
max(xlim), 10^((min(log10(ylim)) +
max(log10(ylim)))/2),
'sign',
'Rotation', 90,
'VerticalAlignment',
'top',
'HorizontalAlignment',
'center',
'FontWeight',
'bold');
216 ylabel(
'Energy, MeV');
220 Dxx = log10(abs(Dpa_hiss_pp_2d.arr*units));
221 Dxx(isnan(Dxx)) = c_min;
222 Dxx(find(Dxx<c_min)) = c_min;
223 contourf(alpha_2d.arr*180/pi, epc_2d.arr, Dxx, n_color);
227 set(gca,
'yScale',
'log')
230 text(min(xlim), min(ylim), {
' (F) |D_{p \alpha}/p|, ',
' plasmaspheric hiss '},
'VerticalAlignment',
'bottom',
'HorizontalAlignment',
'left',
'FontWeight',
'bold',
'Color',
'black');
231 ax_pos2 =
get(gca,
'Position');
232 text(
max(xlim), 10^((min(log10(ylim)) +
max(log10(ylim)))/2),
'log_{10}(day^{-1})',
'Rotation', 90,
'VerticalAlignment',
'top',
'HorizontalAlignment',
'center',
'FontWeight',
'bold');
236 Dxx = sign(Dpa_hiss_pp_2d.arr)*2;
237 contourf(alpha_2d.arr*180/pi, epc_2d.arr, Dxx, 3);
238 %pcolor(alpha_2d.arr*180/pi, epc_2d.arr, Dxx);
240 set(gca,
'yScale',
'log')
245 text(min(xlim), min(ylim), {
' (H) sign(D_{p \alpha}), ',
' plasmaspheric ',
' hiss '},
'VerticalAlignment',
'bottom',
'HorizontalAlignment',
'left',
'FontWeight',
'bold',
'Color', color1);
246 xlabel(
'Pitch angle, deg');
247 ax_pos3 =
get(gca,
'Position');
248 text(
max(xlim), 10^((min(log10(ylim)) +
max(log10(ylim)))/2),
'sign',
'Rotation', 90,
'VerticalAlignment',
'top',
'HorizontalAlignment',
'center',
'FontWeight',
'bold');
252 cl = colorbar('West');
253 cl_pos = get(cl, 'Position');
254 cl_x_pos = ax_pos2(1) + ax_pos2(3) + 0.035;%0.015; %0.925
255 %cl_x_pos = ax_pos2(1) + ax_pos2(3) + 0.035;%0.015; %0.925
256 set(cl, 'Position', [cl_x_pos, cl_pos(2), cl_pos(3), cl_pos(4)]);
261 cl = colorbar('West');
262 cl_pos = get(cl, 'Position');
263 cl_x_pos = ax_pos3(1) + ax_pos3(3) + 0.035;%0.015; %0.925
264 %cl_x_pos = ax_pos2(1) + ax_pos2(3) + 0.035;%0.015; %0.925
265 set(cl, 'Position', [cl_x_pos, cl_pos(2), cl_pos(3), cl_pos(4)]);
268 %%% save_picture(
gcf, [path1, 'Figures/Figure_1'], 'jpg', 'pdf', 'epsc');
275 set(gcf, 'renderer', 'painters')
277 %save_picture(gcf, ['Figure_1_bw'], 'jpg', 'pdf', 'epsc');
278 %save_picture(gcf, ['Figure_1'], 'jpg', 'pdf', 'epsc');
double max(double v1, double v2)
Return maximum.
void gcf(double *gammcf, double a, double x, double *gln)
Returns the incomplete gamma function Q(a, x) evaluated by its continued fraction representation as g...