seismo_trace_toy.m 3.33 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
6
7
8


tracenum=50;

9
10
11
file_inp1='../par/su/cal_toy_vx_it1.su.shot4'; % initial data
file_inp4='../par/su_obs/obs_toy_vx_it1.su.shot4'; %observed data
file_inp7='../par/su/cal_toy_vx_it60.su.shot4'; % inverted data
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
file_inp2='../par/su/cal_toy_vy_it1.su.shot4';
file_inp5='../par/su_obs/obs_toy_vy_it1.su.shot4';
file_inp8='../par/su/cal_toy_vy_it60.su.shot4';

file_inp3='../par/su/cal_toy_vz_it1.su.shot4';
file_inp6='../par/su_obs/obs_toy_vz_it1.su.shot4';
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);



nt = tr1.ns; % number of time samples
dt = tr1.dt; % sample interval in micro-seconds
ns = tr1.ns; % number of samples per trace
37
38
39
40
41
42
43


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



44
45
46
47
48
49
50
51
52
trace1=tr1(1).trace;
trace2=tr2(1).trace;
trace3=tr3(1).trace;
trace4=tr4(1).trace;
trace5=tr5(1).trace;
trace6=tr6(1).trace;
trace7=tr7(1).trace;
trace8=tr8(1).trace;
trace9=tr9(1).trace;
53
54
55



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

58
figure(fig)
59
60
61
subplot(1,2,1) 

plot(t,trace1/max(trace6)+4.8,'b-','LineWidth',1.5);
62
hold on
63
plot(t,trace4/max(trace6)+4.8,'k-','LineWidth',1.5);
64
hold on
65
plot(t,(trace2/max(trace6))+2.4,'b-','LineWidth',1.5);
66
hold on
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
plot(t,(trace5/max(trace6))+2.4,'k-','LineWidth',1.5);
hold on
plot(t,trace3/max(trace6),'b-','LineWidth',1.5);
hold on
plot(t,trace6/max(trace6),'k-','LineWidth',1.5);

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

set(get(gca,'Ylabel'),'FontSize',12);
set(get(gca,'Ylabel'),'FontWeight','normal');
set(get(gca,'Xlabel'),'FontSize',12);
set(get(gca,'Xlabel'),'FontWeight','normal');
set(gca,'FontSize',12);
set(gca,'FontWeight','normal');
set(gca,'Linewidth',1.0);

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

txt1 = 'x-component';
text(0.04,5.2,txt1);
txt2 = 'y-component';
text(0.04,2.7,txt2);
txt3 = 'z-component';
text(0.04,0.3,txt3);


subplot(1,2,2) 
plot(t,trace4/max(trace6)+4.8,'k-','LineWidth',1.5);
99
hold on
100
plot(t,trace7/max(trace6)+4.8,'r-','LineWidth',1.5);
101
hold on
102
plot(t,(trace5/max(trace6))+2.4,'k-','LineWidth',1.5);
103
hold on
104
plot(t,(trace8/max(trace6))+2.4,'r-','LineWidth',1.5);
105
hold on
106
plot(t,trace6/max(trace6),'k-','LineWidth',1.5);
107
hold on
108
plot(t,trace9/max(trace6),'r-','LineWidth',1.5);
109

110
xlabel('time in s');
111
112
xlim([0.015 0.05]);
ylabel('normalized amplitude');
113
ylim([-2 7]);
114
115
116
117
118
119
120
set(get(gca,'Ylabel'),'FontSize',12);
set(get(gca,'Ylabel'),'FontWeight','normal');
set(get(gca,'Xlabel'),'FontSize',12);
set(get(gca,'Xlabel'),'FontWeight','normal');
set(gca,'FontSize',12);
set(gca,'FontWeight','normal');
set(gca,'Linewidth',1.0);
121
122
123
124
125
126
127
128
129
130
131
132
133
set(gca,'ytick',[]);
hleg1 = legend('observed','inverted','Location', 'NorthWest');

txt1 = 'x-component';
text(0.04,5.2,txt1);
txt2 = 'y-component';
text(0.04,2.7,txt2);
txt3 = 'z-component';
text(0.04,0.3,txt3);




134
135
136
137




138
139
140
141
142
143
% find rec, source position:
% SU=su2matlab('/data14/sdunkl/toy/results1/su/cal_toynew_vy_it43.su.shot3')
% recx=SU(tracenum).gx
% recy=SU(tracenum).gx
% soux=SU(tracenum).sx
% souy=SU(tracenum).sy