Files
Earthquake/analysis4.m
2021-06-12 12:20:00 +03:00

123 lines
2.8 KiB
Matlab
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

%% By L_DelOff
% собираю данные по землетрясению 16 сентября 2015, Чили
% получаю среднесуточные значения концентрации H-He O2 E и электронную
% температуру в области эпицентра
%% Поехали
M=8.3;
param.k=1.2
param.type_sensor='ssies';
for i=15:18
for j=[10^(0.43*M) 1000]
param.sattelite_range=i;%15:18; % Выбор с какого спутника требуются данные
param.year_range=2015; %
param.month_range=9; %
param.day_range=6:21;
param.M=M; % Япония, 11 марта 2011
param.R_quake=j; % радиус действия относительно магнитуды,км (еще тыщу ставил)
% расположение эпицентра
param.fiA=-31.573; % широта
param.LA=-71.674; % долгота
param.day_x=16;
param=analysis(param);
grafik(param)
end
end
%global zzz ccc
%figure
%plot(ccc(2,:),ccc(1,:));
function grafik(param)
win1=figure;
win1.Name=['Чили, 16.09.2015, [-31.573; -71.674]',' M=',num2str(param.M),...
' R=',num2str(fix(param.R_quake)), 'км Sat: F-',num2str(param.sattelite_range)];
win1.Units='normalized';
win1.OuterPosition = [0 0 1 1];
t1=uicontrol(win1,'Style','text');
t1.Units='Normalized';
t1.Position = [0.1 0.98 0.8 0.02];
t1.String = win1.Name;
t1.FontSize = 12;
t1.BackgroundColor=[1 1 1];
XLim=[param.day_range(1) param.day_range(end)];
ax1=subplot(2,2,1,'Parent',win1);
y=[];
for i=1:length(param.report)
y(i)=param.report(i).RPA_HHeden;
end
explot(ax1,y,XLim,param)
title('H-He');
ax2=subplot(2,2,2,'Parent',win1);
y=[];
for i=1:length(param.report)
y(i)=param.report(i).EP_Etemp;
end
explot(ax2,y,XLim,param)
title('E_{temp}');
ax3=subplot(2,2,3,'Parent',win1);
y=[];
for i=1:length(param.report)
y(i)=param.report(i).RPA_O2den;
end
explot(ax3,y,XLim,param)
title('O_2');
ax4=subplot(2,2,4,'Parent',win1);
y=[];
for i=1:length(param.report)
y(i)=param.report(i).EP_Eden;
end
explot(ax4,y,XLim,param)
title('E');
saveas(win1,['Chili_16092015_R',num2str(fix(param.R_quake)),'F-',num2str(param.sattelite_range)],'bmp');
end
function explot(ax,y,setXLim,param)
plot(ax,param.day_range,y,'Color','k','Marker','o');
xticks(param.day_range)
xticklabels({param.report.date})
xtickangle(45)
grid on
hold on
Q1=quantile(y,0.25);
Q2=quantile(y,0.5);
Q3=quantile(y,0.75);
L1=Q2-param.k*(Q3-Q1);
L2=Q2+param.k*(Q3-Q1);
XLim=ax.XLim;
plot(ax,XLim,[L1 L1],'Color','b','LineStyle','--');
plot(ax,XLim,[L2 L2],'Color','b','LineStyle','--');
plot(ax,XLim,[Q2 Q2],'Color','m','LineStyle','--');
YLim=ax.YLim;
plot(ax,[param.day_x param.day_x],YLim,'Color','r');
ax.XLim=setXLim;
end