-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMainPlot.m
More file actions
56 lines (49 loc) · 2.41 KB
/
Copy pathMainPlot.m
File metadata and controls
56 lines (49 loc) · 2.41 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
% After completing all calculations, do not modify any parameters or variables,
% as they may be used in the plotting script
% =========================================================================
% Wave-Check:
% load('Input\DataObs.mat');
% Fun_PlotWave(DataObs.Sortob, DataObs.da1, DataObs.srate, 60);
% =========================================================================
% Final Wave-fitting
plotobsyn(epicenter, loca, obr, syn, [mm; mm; mm], srate);
% =========================================================================
% Iteration plot
figure('Color','w');
plot(1:numel(res), res, '-ko','MarkerSize',16,'LineWidth',0.5,'MarkerEdgeColor','k', ...
'MarkerFaceColor',[1.0000 0.4118 0.1608]);
xlabel('Iteration');
ylabel('Residual');
Fun_Decorat;
% =========================================================================
% 3D fault plot
Fun_PlotFaultSlip(locasub, locadep, slip, source, grid, epicenter);
% =========================================================================
% The subfaults source time functions plot
stf=sum(substf,2);
stfa=cumsum(stf)/srate;
stfa=stfa/stfa(end);
[~,durtime]=min(abs(stfa-0.99)); % Just a reference
substfs_plot(epicenter,grid,gridsize,source,substf(1:durtime,:),srate);
clear stfa dex dey;
% =========================================================================
% STF plot
figure; hold on;
ShowLen=200;
nSTFPlot=min(ShowLen, numel(stf));
timeSTF=(0:nSTFPlot-1)./srate;
tPlot=timeSTF(1:nSTFPlot);
aPlot=stf(1:nSTFPlot);
patch([tPlot(:); flipud(tPlot(:))],[aPlot(:); zeros(numel(aPlot), 1)], ...
[ 0 0.7725 0.8902], 'FaceAlpha', 0.28, 'EdgeColor', 'none');
plot(tPlot, aPlot,'LineWidth', 1.4,'Color', [0 0.7725 0.8902]);
xlabel('Time (s)'); ylabel('Amplitude'); Fun_Decorat;
% =========================================================================
% Save Rupture info
Rupname='RupInfo.txt';
File=fullfile(dataVelFolder, 'DataEarth.mat');
DataEarth=load(File, 'DataEarth'); DataEarth=DataEarth.DataEarth;
SlipModel=Slip_Info(epicenter,depth,grid,gridsize,source,locasub,locadep, ...
SDR,slip,substf(1:durtime,:),SeisMoment,Mw,Rupname,DataEarth,Event,outRupFolder);
clear File Rupname
fprintf('# Rupture Info has saved \n');