seismo_trace_toy.m 4.12 KB
Newer Older
1 2 3
%plots starting, observed and inverted seismograms for one source and
%receiver and x-, y- and z-component
%Input: binary format
4
clear all; clc;
5
close all
6 7 8

tracenum=50;

9
file_inp1='../par/su/cal_toy_vx_it1.su.shot4'; % initial data
10 11
file_inp4='../par/su_obs/obs_toy_vx.su.shot4.filt_200'; %filtered with lpb 200 Hz
file_inp10='../par/su_obs/obs_toy_vx.su.shot4.filt_320'; %filtered with lpb 320 Hz
12
file_inp7='../par/su/cal_toy_vx_it60.su.shot4'; % inverted data
13

14
file_inp2='../par/su/cal_toy_vy_it1.su.shot4';
15 16
file_inp5='../par/su_obs/obs_toy_vy.su.shot4.filt_200';
file_inp11='../par/su_obs/obs_toy_vy.su.shot4.filt_320'; %filtered with lpb 320 Hz
17 18 19
file_inp8='../par/su/cal_toy_vy_it60.su.shot4';

file_inp3='../par/su/cal_toy_vz_it1.su.shot4';
20 21
file_inp6='../par/su_obs/obs_toy_vz.su.shot4.filt_200';
file_inp12='../par/su_obs/obs_toy_vz.su.shot4.filt_320'; %filtered with lpb 320 Hz
22 23 24 25 26 27 28 29 30 31 32 33
file_inp9='../par/su/cal_toy_vz_it60.su.shot4';


tr1 = su2matlab(file_inp1);
tr2 = su2matlab(file_inp2);
tr3 = su2matlab(file_inp3);
tr4 = su2matlab(file_inp4);
tr5 = su2matlab(file_inp5);
tr6 = su2matlab(file_inp6);
tr7 = su2matlab(file_inp7);
tr8 = su2matlab(file_inp8);
tr9 = su2matlab(file_inp9);
34 35 36
tr10 = su2matlab(file_inp10);
tr11 = su2matlab(file_inp11);
tr12 = su2matlab(file_inp12);
37 38 39 40 41


nt = tr1.ns; % number of time samples
dt = tr1.dt; % sample interval in micro-seconds
ns = tr1.ns; % number of samples per trace
42 43 44 45 46


fig=55;
%--------------------------------------------------------------------------

47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
recx=tr2(tracenum).gx
recy=tr2(tracenum).gy
recx=tr5(tracenum).gx
recy=tr5(tracenum).gy
soux=tr2(tracenum).sx
souy=tr2(tracenum).sy
soux=tr5(tracenum).sx
souy=tr5(tracenum).sy


trace1=tr1(tracenum).trace;
trace2=tr2(tracenum).trace;
trace3=tr3(tracenum).trace;
trace4=tr4(tracenum).trace;
trace5=tr5(tracenum).trace;
trace6=tr6(tracenum).trace;
trace7=tr7(tracenum).trace;
trace8=tr8(tracenum).trace;
trace9=tr9(tracenum).trace;
trace10=tr10(tracenum).trace;
trace11=tr11(tracenum).trace;
trace12=tr12(tracenum).trace;
69 70


71 72
t=(dt:dt:ns*dt)./10^6; % time in seconds

73 74
linewidth=1;

75
figure(fig)
76 77
subplot(1,2,1) 

78
plot(t,trace1/max(trace5)+4.8,'b-','LineWidth',linewidth);
79
hold on
80
plot(t,trace4/max(trace5)+4.8,'k-','LineWidth',linewidth);
81
hold on
82
plot(t,(trace2/max(trace5))+2.4,'b-','LineWidth',linewidth);
83
hold on
84
plot(t,(trace5/max(trace5))+2.4,'k-','LineWidth',linewidth);
85
hold on
86
plot(t,trace3/max(trace5),'b-','LineWidth',linewidth);
87
hold on
88
plot(t,trace6/max(trace5),'k-','LineWidth',linewidth);
89 90 91 92 93 94 95

xlabel('time in s');
xlim([0.015 0.05]);
ylabel('normalized amplitude');
ylim([-2 7]);
set(gca,'ytick',[])

96
set(get(gca,'Ylabel'),'FontSize',10);
97
set(get(gca,'Ylabel'),'FontWeight','normal');
98
set(get(gca,'Xlabel'),'FontSize',10);
99
set(get(gca,'Xlabel'),'FontWeight','normal');
100
set(gca,'FontSize',10);
101 102 103 104 105 106
set(gca,'FontWeight','normal');
set(gca,'Linewidth',1.0);

legend('starting','observed','Location','NorthWest');

txt1 = 'x-component';
107
text(0.038,5.3,txt1,'FontSize',8);
108
txt2 = 'y-component';
109
text(0.038,2.9,txt2,'FontSize',8);
110
txt3 = 'z-component';
111
text(0.038,0.5,txt3,'FontSize',8);
112 113 114


subplot(1,2,2) 
115
plot(t,trace10/max(trace8)+4.8,'k-','LineWidth',linewidth);
116
hold on
117
plot(t,trace7/max(trace8)+4.8,'r-','LineWidth',linewidth);
118
hold on
119
plot(t,(trace11/max(trace8))+2.4,'k-','LineWidth',linewidth);
120
hold on
121
plot(t,(trace8/max(trace8))+2.4,'r-','LineWidth',linewidth);
122
hold on
123
plot(t,trace12/max(trace8),'k-','LineWidth',linewidth);
124
hold on
125
plot(t,trace9/max(trace8),'r-','LineWidth',linewidth);
126

127
xlabel('time in s');
128 129
xlim([0.015 0.05]);
ylabel('normalized amplitude');
130
ylim([-2 7]);
131
set(get(gca,'Ylabel'),'FontSize',10);
132
set(get(gca,'Ylabel'),'FontWeight','normal');
133
set(get(gca,'Xlabel'),'FontSize',10);
134
set(get(gca,'Xlabel'),'FontWeight','normal');
135
set(gca,'FontSize',10);
136 137
set(gca,'FontWeight','normal');
set(gca,'Linewidth',1.0);
138 139 140 141
set(gca,'ytick',[]);
hleg1 = legend('observed','inverted','Location', 'NorthWest');

txt1 = 'x-component';
142
text(0.038,5.3,txt1,'FontSize',8);
143
txt2 = 'y-component';
144
text(0.038,2.9,txt2,'FontSize',8);
145
txt3 = 'z-component';
146
text(0.038,0.5,txt3,'FontSize',8);
147 148 149



150 151
% exportfig(fig, ['seismo_trace_toy.eps'],'bounds','tight', 'color','rgb', ...
%   'preview','none', 'resolution',200, 'lockaxes',1);