Repository navigation
Expand file tree
/
Copy pathMainPlot.m
More file actions
115 lines (102 loc) · 3.62 KB
/
Copy pathMainPlot.m
File metadata and controls
115 lines (102 loc) · 3.62 KB
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
%% Mainscript to plot results
% Parameters:
lon_smsta = []; lat_smsta = [];
rct = []; rcsm = [];
lon_gps = []; lat_gps = [];
dlon_sar =[]; dlat_sar =[];
% Figure: Slip in each grids (sub-fault source time functions)
[dex,dey]=substfs_plot(EveLoc,NGrid,LGrid,SGrid,stfsub_out,srate);
% Figure: Distribution of the teleseismic stations
if UseTe
% The issue is that you need to enter the main script path first,
% then run this plotting step
figure('Color','w');
cd func\private\
epi_sta00(EveLoc,loca(1:size(obt,2),:),mm(1:size(obt,2),:),100);
set(gcf, 'Position', [200, 100, 700, 700]);
cd ..
cd ..
end
% Figure: Distribution of the strong-motion stations
if UseSm
plt_sm_sta(lon_smsta,lat_smsta,EveLoc,locasm,mmsm);
Fun_defaultAxes;
end
% Figure: Static slip distribution
figure;
[numth,interval,m] = colornumth(slip);
[slip01,start,stop] = faultslip_pcolor(NGrid,LGrid,SGrid,zslip,...
(numth)*interval,numth,interval);
axis equal tight;
set(gca,'linewidth',0.6,'tickdir','out','xminortick','off','yminortick',...
'off','fontsize',16);
Fun_defaultAxes;
% Figure: Source time function
if ~isempty(ob)
figure;
fill(0:1/srate:Tspan,[stf;0],[ 0.6000 0.6549 1]);
set(gca,'layer','top');
set(gca,'fontsize',16);
xlabel('Time (s)');
ylabel('Moment rate (Nm/s)');
Fun_defaultAxes; set(gcf, 'Position', [200, 100, 600, 500]);
end
% Figure: Fitting of teleseismic waves
if UseTe
if isempty(rct)
rct = [4,ceil(size(obt,2)/4)];
end
leng=leng*srate;
pltobsyn_new(ob(1:leng,1:size(obt,2)),syn(1:leng,1:size(obt,2)),...
(1:leng)/srate,rct,0.05,mm(1:size(obt,2),:),repmat('P/Z',...
[size(obt,2),1]));
set(gcf, 'Position', [80, 10, 1400, 800]);
end
% Figure: Fitting of strong-motion waves
if UseSm
if isempty(rcsm)
rcsm = [4,ceil(size(obsm,3)/4)];
end
pltobsyn3_new(obsm,synsm,0:1/srate:(size(obsm,1)-1)/srate,rcsm,0.05,...
mm(size(obt,2)+1:size(obt,2)+size(obsm,3),:));
set(gcf, 'Position', [80, 10, 1400, 800]);
end
% Figure: Fitting of GPS records
if UseGPS
matching_gps(lon_gps,lat_gps,locagps,locasub,EveLoc,NGrid,slip,slipg,syng);
end
% Figure: Fitting of InSAR records
if UseINSAR
matching_insar(dlon_sar,dlat_sar,slipsar,synsar,locasar,nsar,dr);
end
n1=8; % time interval
n2=3; % lines
n3=5; % rows
stfsub_temp=stfsub_out./miun(:)'*3e10;
stfsub_sliprate=stfsub_temp(:)/3e16/prod(LGrid);
maxslip=max(max(slip));
% Figure: Cumulative sliding distance at different time intervals of n1 seconds
rup_pltslipshot2(stfsub_sliprate/srate,NGrid,Tspan*srate,[n1*srate,n2,n3],2,maxslip,12,srate);
colorbar('southoutside','position',[0.27 0.0516 0.5 0.0308]);
Fun_defaultAxes; set(gcf, 'Position', [200, 100, 600, 500]);
% Figure: Inversion and fitting of the source time function
if DoSTF==1
if isempty(rct)
rct = [4,ceil(size(obt,2)/4)];
end
% leng=leng*srate;
if size(synastf2,1)>0
synastf=synastf2;
astftele=astftele2;
end
astftele=reshape(astftele,Tspan*srate,size(obt,2));
synstf=reshape(synstf,Tspan*srate,size(obt,2));
astftele=astftele*mobstf*srate;
pltobsyn_new(ob0(1:leng,1:size(obt,2)),synastf(1:leng,1:size(obt,2)),...
(1:leng)/srate,rct,0.05,mm(1:size(obt,2),:),repmat('P/Z',...
[size(obt,2),1]));
rct = [4,ceil(size(obt,2)/4)];
pltobsyn_new(astftele(1:Tspan*srate,1:size(obt,2)),synstf(1:Tspan*srate,1:size(obt,2)),...
(1:Tspan*srate)/srate,rct,0.05,mm(1:size(obt,2),:),repmat('P/Z',...
[size(obt,2),1]));
end