9 movie_name =
'mt_fix3';
10 addpath
'F:\Dmitriy\VERB_Code_2.0_3D_WithMixedTerm_EXAMPLE\Plot\Various_functions';
12 {'..\Calculations\201x201_Mixed_Term_Block_Full_LAPACK\'},
13 {'..\Calculations\201x201_NoMT_Split_Full\'},
24 f1 = figure(
'Units',
'inches',
'Position', [1 1 8.5 2.4], ...
25 'DefaultAxesFontName',
'times new roman',
'DefaultAxesFontWeight',
'bold',
'DefaultAxesFontSize', 7,
'DefaultTextFontWeight',
'bold',
'DefaultTextFontSize', 7,...
26 'PaperOrientation',
'portrait',
'PaperPositionMode',
'auto',
'DefaultLineLineWidth', 2);%,
'PaperPosition', [1 1 3.8 9]);%
30 % xmin = 0.1; ymin = 0.15;
31 % xmax = 0.95; ymax = 0.75;
32 xmin = 0.07; ymin = 0.15;
33 xmax = 0.80; ymax = 0.90;
34 subplot1(1, 2,
'Min', [xmin ymin],
'Max', [xmax ymax],
'Gap', [0.05 0.01],
'YTickL',
'All')
38 % f2 = figure('Units', 'inches', 'Position', [1 1 5 3], ...
39 % 'DefaultAxesFontName', 'times new roman', 'DefaultAxesFontWeight', 'bold', 'DefaultAxesFontSize', 12, 'DefaultTextFontWeight', 'bold', 'DefaultTextFontSize', 12,...
40 % 'PaperOrientation', 'portrait', 'PaperPositionMode', 'auto', 'DefaultLineLineWidth', 2);%, 'PaperPosition', [1 1 3.8 9]);%
48 % col1 = [0.2 0.2 0.2];
49 % col2 = [0.4 0.4 0.4];
50 % col3 = [0.6 0.6 0.6];
52 for i = 1:length(path_arr)
56 [L, epc, alpha, pc] = load_plt([path1,
'Output/perp_grid.plt'],
'squeeze',
'permute');
57 [
PSD] = load_plt([path1,
'Output/OutPSD.dat'],
'permute',
'nosqueeze');%,
'skip_zones', 7);%,
'n_zones', 25);%,
'skip_zones', 10,
'n_zones', 5);
63 alpha_2d = alpha.arr.*180./pi;
67 [dif, time8]=min(abs(
PSD.time - 0.1));
68 [dif, time24]=min(abs(
PSD.time - 1.0));
69 [dif, time48]=min(abs(
PSD.time - 2.0));
70 PSD.time([time8,time24,time48])*24
72 if (i == 1) line =
''; end;
73 if (i == 2) line =
'--'; end;
77 pos1 =
get(gca,
'Position');
80 %energy_slice =
max(find(epc_2d(:,1) <= 0.5))
81 %
if (i == 2) energy_slice = energy_slice + 1; end;
82 [tmp, energy_slice] = min(abs(epc_2d(:,1) - 0.5));
84 if (i == 1) plot(alpha_2d(energy_slice,:), squeeze(
PSD.
arr(time0, 1, energy_slice, :))
'.*pc.arr(energy_slice, :).*pc.arr(energy_slice, :), 'LineWidth
', 2, 'Color
', col0); end
85 plot(alpha_2d(energy_slice,:), squeeze(PSD.arr(time8, 1, energy_slice, :))'.*pc.arr(energy_slice, :).*pc.arr(energy_slice, :), line,
'LineWidth', 2,
'Color', col1);
86 plot(alpha_2d(energy_slice,:), squeeze(
PSD.
arr(time24, 1, energy_slice, :))
'.*pc.arr(energy_slice, :).*pc.arr(energy_slice, :), line, 'LineWidth
', 2, 'Color
', col2);
87 plot(alpha_2d(energy_slice,:), squeeze(PSD.arr(time48, 1, energy_slice, :))'.*pc.arr(energy_slice, :).*pc.arr(energy_slice, :), line,
'LineWidth', 2,
'Color', col3);
88 set(gca,
'yscale',
'log');
91 xlabel('Pitch angle, deg');
92 ylabel('Flux, arbitrary units');
94 set(gca, 'yminorgrid', 'off')
95 % text(
max(xlim), min(ylim), [num2str(round(epc.arr(energy_slice, 1)*10)/10), 'MeV'], 'VerticalAlignment', 'bottom', 'HorizontalAlignment', 'right', 'FontWeight', 'bold', 'Color', 'black');
96 text(min(xlim),
max(ylim), [' (A)'], 'VerticalAlignment', 'top', 'HorizontalAlignment', 'left', 'FontWeight', 'bold', 'Color', 'black');
97 title([num2str(round(epc.arr(energy_slice, 1)*10)/10), 'MeV'])
99 [tmp, alpha30] = min(abs(alpha_2d(energy_slice,:) - 30));
100 [tmp, alpha60] = min(abs(alpha_2d(energy_slice,:) - 60));
101 [tmp, alpha90] = min(abs(alpha_2d(energy_slice,:) - 90));
103 F1_1_30 =
PSD.arr(time48, 1, energy_slice, alpha30);
104 F1_1_60 =
PSD.arr(time48, 1, energy_slice, alpha60);
105 F1_1_90 =
PSD.arr(time48, 1, energy_slice, alpha90);
108 F2_1_30 =
PSD.arr(time48, 1, energy_slice, alpha30);
109 F2_1_60 =
PSD.arr(time48, 1, energy_slice, alpha60);
110 F2_1_90 =
PSD.arr(time48, 1, energy_slice, alpha90);
117 %energy_slice =
max(find(epc_2d(:,1) <= 2))
118 %if (i == 2) energy_slice = energy_slice + 1; end;
119 [tmp, energy_slice] = min(abs(epc_2d(:,1) - 2));
121 if (i == 1) plot(alpha_2d(energy_slice,:), squeeze(
PSD.arr(time0, 1, energy_slice, :))'.*pc.arr(energy_slice, :).*pc.arr(energy_slice, :), 'LineWidth', 2, 'Color', col0); end
122 plot(alpha_2d(energy_slice,:), squeeze(
PSD.arr(time8, 1, energy_slice, :))'.*pc.arr(energy_slice, :).*pc.arr(energy_slice, :), line, 'LineWidth', 2, 'Color', col1);
123 plot(alpha_2d(energy_slice,:), squeeze(
PSD.arr(time24, 1, energy_slice, :))'.*pc.arr(energy_slice, :).*pc.arr(energy_slice, :), line, 'LineWidth', 2, 'Color', col2);
124 plot(alpha_2d(energy_slice,:), squeeze(
PSD.arr(time48, 1, energy_slice, :))'.*pc.arr(energy_slice, :).*pc.arr(energy_slice, :), line, 'LineWidth', 2, 'Color', col3);
125 set(gca, 'yscale', 'log');
128 xlabel('Pitch angle, deg');
129 % ylabel('Flux, arbitrary units');
131 % text(
max(xlim), min(ylim), [num2str(round(epc.arr(energy_slice, 1)*10)/10), 'MeV'], 'VerticalAlignment', 'bottom', 'HorizontalAlignment', 'right', 'FontWeight', 'bold', 'Color', 'black');
132 text(min(xlim),
max(ylim), [' (B)'], 'VerticalAlignment', 'top', 'HorizontalAlignment', 'left', 'FontWeight', 'bold', 'Color', 'black');
133 title([num2str(round(epc.arr(energy_slice, 1)*10)/10), 'MeV']);
135 [tmp, alpha30] = min(abs(alpha_2d(energy_slice,:) - 30));
136 [tmp, alpha60] = min(abs(alpha_2d(energy_slice,:) - 60));
137 [tmp, alpha90] = min(abs(alpha_2d(energy_slice,:) - 90));
139 F1_2_30 =
PSD.arr(time48, 1, energy_slice, alpha30);
140 F1_2_60 =
PSD.arr(time48, 1, energy_slice, alpha60);
141 F1_2_90 =
PSD.arr(time48, 1, energy_slice, alpha90);
144 F2_2_30 =
PSD.arr(time48, 1, energy_slice, alpha30);
145 F2_2_60 =
PSD.arr(time48, 1, energy_slice, alpha60);
146 F2_2_90 =
PSD.arr(time48, 1, energy_slice, alpha90);
159 %lg = legend('Initial', [num2str(
PSD.time(time8)*24), ' hrs, d/o'], [num2str(
PSD.time(time24)*24), ' hrs, d/o'], [num2str(
PSD.time(time48)*24), ' hrs, d/o'], [num2str(
PSD.time(time8)*24), ' hrs, m.t.'], [num2str(
PSD.time(time24)*24), ' hrs, m.t.'], [num2str(
PSD.time(time48)*24), ' hrs, m.t.'], 'Location', [xmin ymax+0.1 (xmax-xmin) 0.04], 'Orientation', 'Horizontal', 0);
160 %set(lg, 'Box', 'off')
162 lg = legend('Initial', ...
163 [num2str(
PSD.time(time8)*24), ' hrs, mixed+diag.'], [num2str(
PSD.time(time24)*24), ' hrs, mixed+diag.'], [num2str(
PSD.time(time48)*24), ' hrs, mixed+diag.'], ...
164 [num2str(
PSD.time(time8)*24), ' hrs, diag. only'], [num2str(
PSD.time(time24)*24), ' hrs, diag. only'], [num2str(
PSD.time(time48)*24), ' hrs, diag. only'], ...
165 'Location', [xmax ymin (0.95-xmax) (ymax-ymin)], 'Orientation', 'Vertical', 0);
167 save_picture(
gcf, ['Figure_2_bw'], '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...
Matrix3D< double > arr
array of PSD values
Phase Space Density class.