-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathtest_oneevent.m
233 lines (204 loc) · 11.9 KB
/
test_oneevent.m
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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
% This script takes about 5-10 minutes
clc;clear;close all;
%please download seistr package from https://github.com/chenyk1990/seistr
addpath(genpath('seistr/'));
addpath(genpath('subroutines/'));
eq=zeros(2000,960);
[n1,n2]=size(eq);
for ii=3
if ~ismember(ii,[14,16,17,27,47,52])
strcat('mat_raw/eq-',num2str(ii),'.mat')
load(strcat('mat_raw/eq-',num2str(ii),'.mat'));
end
eq=d1;
%% BP
d1=das_bandpass(d1,0.0005,0,200,6,6,0,0);%
d_bp=d1;
figure(1);das_imagesc([eq,d1,eq-d1]);
%% SOMF
[pp]=str_dip2d(d1,2,10,2,0.01, 1, 0.000001,[50,50,1],1);%figure;das_imagesc(pp);colormap(jet);
ns=8;order=2;eps=0.01;
d1=das_pwsmooth_lop_mf(d1,pp,ns,order,eps,0);%SOMF
figure(3);das_imagesc([eq,d1,eq-d1]);
d_bpsomf=d1;
%% FK
d1=d1-das_fk_dip(d1,0.02);%
d_bpsomffk=d1;
figure(4);das_imagesc([eq,d1,eq-d1]);
end
%ii=3: FORGE_78-32_iDASv3-P11_UTC190423213209.sgy, 1484, 3.394402, 0.910045
t=[0:n1]*0.0005;
x=1:n2;
ngap=50;
eq2=[eq,zeros(n1,ngap),zeros(size(eq))];
d_bp2=[d_bp,zeros(n1,ngap),eq-d_bp];
d_bpsomf2=[d_bpsomf,zeros(n1,ngap),eq-d_bpsomf];
d_bpsomffk2=[d_bpsomffk,zeros(n1,ngap),eq-d_bpsomffk];
x=1:ngap+n2*2;
figure('units','normalized','Position',[0.1 0.1 0.8, 0.9],'color','w');
subplot(2,2,1);das_imagesc(eq2,100,2,x,t);
ylabel('Time (s)','Fontsize',20,'fontweight','bold');
xlabel('Channel','Fontsize',20,'fontweight','bold');
set(gca,'Linewidth',2,'Fontsize',20,'Fontweight','bold');
text(n2/2,-0.05,'Raw data','color','k','Fontsize',20,'fontweight','bold','HorizontalAlignment','center');
text(-200,-0.1,'(a)','color','k','Fontsize',20,'fontweight','bold','HorizontalAlignment','center');
subplot(2,2,2);das_imagesc(d_bp2,100,2,x,t);
ylabel('Time (s)','Fontsize',20,'fontweight','bold');
xlabel('Channel','Fontsize',20,'fontweight','bold');
set(gca,'Linewidth',2,'Fontsize',20,'Fontweight','bold');
text(n2/2,-0.05,'BP','color','k','Fontsize',20,'fontweight','bold','HorizontalAlignment','center');
text(n2+ngap+n2/2,-0.05,'Removed noise','color','k','Fontsize',20,'fontweight','bold','HorizontalAlignment','center');
annotation(gcf,'textarrow',[0.679 0.700],...
[0.772 0.866],'Color','r','TextColor','r','HorizontalAlignment','center',...
'String',{'High-amplitude erratic noise'},...
'LineWidth',2,...
'FontSize',20,'fontweight','bold');
text(-200,-0.1,'(b)','color','k','Fontsize',20,'fontweight','bold','HorizontalAlignment','center');
subplot(2,2,3);das_imagesc(d_bpsomf2,100,2,x,t);
ylabel('Time (s)','Fontsize',20,'fontweight','bold');
xlabel('Channel','Fontsize',20,'fontweight','bold');
set(gca,'Linewidth',2,'Fontsize',20,'Fontweight','bold');
text(n2/2,-0.05,'BP+SOMF','color','k','Fontsize',20,'fontweight','bold','HorizontalAlignment','center');
text(n2+ngap+n2/2,-0.05,'Removed noise','color','k','Fontsize',20,'fontweight','bold','HorizontalAlignment','center');
annotation(gcf,'textarrow',[0.169 0.190],...
[0.332 0.426],'Color','r','TextColor','r','HorizontalAlignment','center',...
'String',{'Horizontal noise'},...
'LineWidth',2,...
'FontSize',20,'fontweight','bold');
text(-200,-0.1,'(c)','color','k','Fontsize',20,'fontweight','bold','HorizontalAlignment','center');
subplot(2,2,4);das_imagesc(d_bpsomffk2,100,2,x,t);
ylabel('Time (s)','Fontsize',20,'fontweight','bold');
xlabel('Channel','Fontsize',20,'fontweight','bold');
set(gca,'Linewidth',2,'Fontsize',20,'Fontweight','bold');
text(n2/2,-0.05,'BP+SOMF+FK','color','k','Fontsize',20,'fontweight','bold','HorizontalAlignment','center');
text(n2+ngap+n2/2,-0.05,'Removed noise','color','k','Fontsize',20,'fontweight','bold','HorizontalAlignment','center');
text(-200,-0.1,'(d)','color','k','Fontsize',20,'fontweight','bold','HorizontalAlignment','center');
%zomming area
% annotation(gcf,'rectangle',...
% [0.13 0.85 0.335 0.065]);
print(gcf,'-depsc','-r300','result1.eps');
inds1=1:400;
figure('units','normalized','Position',[0.1 0.1 0.8, 0.9],'color','w');
subplot(2,2,1);das_imagesc(eq2(inds1,:),100,2,x,t(inds1));
ylabel('Time (s)','Fontsize',20,'fontweight','bold');
xlabel('Channel','Fontsize',20,'fontweight','bold');
set(gca,'Linewidth',2,'Fontsize',20,'Fontweight','bold');
text(n2/2,-0.01,'Raw data','color','k','Fontsize',20,'fontweight','bold','HorizontalAlignment','center');
text(-200,-0.02,'(a)','color','k','Fontsize',20,'fontweight','bold','HorizontalAlignment','center');
subplot(2,2,2);das_imagesc(d_bp2(inds1,:),100,2,x,t(inds1));
ylabel('Time (s)','Fontsize',20,'fontweight','bold');
xlabel('Channel','Fontsize',20,'fontweight','bold');
set(gca,'Linewidth',2,'Fontsize',20,'Fontweight','bold');
text(n2/2,-0.01,'BP','color','k','Fontsize',20,'fontweight','bold','HorizontalAlignment','center');
text(n2+ngap+n2/2,-0.01,'Removed noise','color','k','Fontsize',20,'fontweight','bold','HorizontalAlignment','center');
text(-200,-0.02,'(b)','color','k','Fontsize',20,'fontweight','bold','HorizontalAlignment','center');
annotation(gcf,'textarrow',[0.679 0.700],...
[0.772 0.866],'Color','r','TextColor','r','HorizontalAlignment','center',...
'String',{'High-amplitude erratic noise'},...
'LineWidth',2,...
'FontSize',20,'fontweight','bold');
subplot(2,2,3);das_imagesc(d_bpsomf2(inds1,:),100,2,x,t(inds1));
ylabel('Time (s)','Fontsize',20,'fontweight','bold');
xlabel('Channel','Fontsize',20,'fontweight','bold');
set(gca,'Linewidth',2,'Fontsize',20,'Fontweight','bold');
text(n2/2,-0.01,'BP+SOMF','color','k','Fontsize',20,'fontweight','bold','HorizontalAlignment','center');
text(n2+ngap+n2/2,-0.01,'Removed noise','color','k','Fontsize',20,'fontweight','bold','HorizontalAlignment','center');
text(-200,-0.02,'(c)','color','k','Fontsize',20,'fontweight','bold','HorizontalAlignment','center');
annotation(gcf,'textarrow',[0.179 0.200],...
[0.272 0.366],'Color','r','TextColor','r','HorizontalAlignment','center',...
'String',{'Horizontal noise'},...
'LineWidth',2,...
'FontSize',20,'fontweight','bold');
subplot(2,2,4);das_imagesc(d_bpsomffk2(inds1,:),100,2,x,t(inds1));
ylabel('Time (s)','Fontsize',20,'fontweight','bold');
xlabel('Channel','Fontsize',20,'fontweight','bold');
set(gca,'Linewidth',2,'Fontsize',20,'Fontweight','bold');
text(n2/2,-0.01,'BP+SOMF+FK','color','k','Fontsize',20,'fontweight','bold','HorizontalAlignment','center');
text(n2+ngap+n2/2,-0.01,'Removed noise','color','k','Fontsize',20,'fontweight','bold','HorizontalAlignment','center');
text(-200,-0.02,'(d)','color','k','Fontsize',20,'fontweight','bold','HorizontalAlignment','center');
print(gcf,'-depsc','-r300','result2.eps');
%% combined figure
figure('units','normalized','Position',[0.0 0.0 0.5, 1],'color','w');
subplot(4,2,1);das_imagesc(eq2,100,2,x,t);
ylabel('Time (s)','Fontsize',10,'fontweight','bold');
xlabel('Channel','Fontsize',10,'fontweight','bold');
set(gca,'Linewidth',2,'Fontsize',10,'Fontweight','bold');
text(n2/2,-0.05,'Raw data','color','k','Fontsize',10,'fontweight','bold','HorizontalAlignment','center');
text(-200,-0.1,'(a)','color','k','Fontsize',10,'fontweight','bold','HorizontalAlignment','center');
annotation(gcf,'rectangle',[0.13 0.894 0.334 0.030],'linewidth',2,'color','g');
subplot(4,2,2);das_imagesc(d_bp2,100,2,x,t);
ylabel('Time (s)','Fontsize',10,'fontweight','bold');
xlabel('Channel','Fontsize',10,'fontweight','bold');
set(gca,'Linewidth',2,'Fontsize',10,'Fontweight','bold');
text(n2/2,-0.05,'BP','color','k','Fontsize',10,'fontweight','bold','HorizontalAlignment','center');
text(n2+ngap+n2/2,-0.05,'Removed noise','color','k','Fontsize',10,'fontweight','bold','HorizontalAlignment','center');
annotation(gcf,'textarrow',[0.679 0.700],...
[0.85 0.90],'Color','r','TextColor','r','HorizontalAlignment','center',...
'String',{'High-amplitude erratic noise'},...
'LineWidth',2,...
'FontSize',10,'fontweight','bold');
text(-200,-0.1,'(b)','color','k','Fontsize',10,'fontweight','bold','HorizontalAlignment','center');
annotation(gcf,'rectangle',[0.57 0.894 0.334 0.030],'linewidth',2,'color','g');
subplot(4,2,3);das_imagesc(d_bpsomf2,100,2,x,t);
ylabel('Time (s)','Fontsize',10,'fontweight','bold');
xlabel('Channel','Fontsize',10,'fontweight','bold');
set(gca,'Linewidth',2,'Fontsize',10,'Fontweight','bold');
text(n2/2,-0.05,'BP+SOMF','color','k','Fontsize',10,'fontweight','bold','HorizontalAlignment','center');
text(n2+ngap+n2/2,-0.05,'Removed noise','color','k','Fontsize',10,'fontweight','bold','HorizontalAlignment','center');
annotation(gcf,'textarrow',[0.190 0.192],...
[0.65 0.694],'Color','r','TextColor','r','HorizontalAlignment','center',...
'String',{'Horizontal noise'},...
'LineWidth',2,...
'FontSize',10,'fontweight','bold');
text(-200,-0.1,'(c)','color','k','Fontsize',10,'fontweight','bold','HorizontalAlignment','center');
annotation(gcf,'rectangle',[0.13 0.675 0.334 0.030],'linewidth',2,'color','g');
subplot(4,2,4);das_imagesc(d_bpsomffk2,100,2,x,t);
ylabel('Time (s)','Fontsize',10,'fontweight','bold');
xlabel('Channel','Fontsize',10,'fontweight','bold');
set(gca,'Linewidth',2,'Fontsize',10,'Fontweight','bold');
text(n2/2,-0.05,'BP+SOMF+FK','color','k','Fontsize',10,'fontweight','bold','HorizontalAlignment','center');
text(n2+ngap+n2/2,-0.05,'Removed noise','color','k','Fontsize',10,'fontweight','bold','HorizontalAlignment','center');
text(-200,-0.1,'(d)','color','k','Fontsize',10,'fontweight','bold','HorizontalAlignment','center');
annotation(gcf,'rectangle',[0.57 0.675 0.334 0.030],'linewidth',2,'color','g');
%zomming area
% annotation(gcf,'rectangle',...
% [0.13 0.85 0.335 0.065]);
inds1=1:400;
subplot(4,2,5);das_imagesc(eq2(inds1,:),100,2,x,t(inds1));
ylabel('Time (s)','Fontsize',10,'fontweight','bold');
xlabel('Channel','Fontsize',10,'fontweight','bold');
set(gca,'Linewidth',2,'Fontsize',10,'Fontweight','bold');
text(n2/2,-0.01,'Raw data (zoomed)','color','k','Fontsize',10,'fontweight','bold','HorizontalAlignment','center');
text(-200,-0.02,'(e)','color','k','Fontsize',10,'fontweight','bold','HorizontalAlignment','center');
subplot(4,2,6);das_imagesc(d_bp2(inds1,:),100,2,x,t(inds1));
ylabel('Time (s)','Fontsize',10,'fontweight','bold');
xlabel('Channel','Fontsize',10,'fontweight','bold');
set(gca,'Linewidth',2,'Fontsize',10,'Fontweight','bold');
text(n2/2,-0.01,'BP (zoomed)','color','k','Fontsize',10,'fontweight','bold','HorizontalAlignment','center');
text(n2+ngap+n2/2,-0.01,'Removed noise','color','k','Fontsize',10,'fontweight','bold','HorizontalAlignment','center');
text(-200,-0.02,'(f)','color','k','Fontsize',10,'fontweight','bold','HorizontalAlignment','center');
annotation(gcf,'textarrow',[0.679 0.700],...
[0.42 0.47],'Color','r','TextColor','r','HorizontalAlignment','center',...
'String',{'High-amplitude erratic noise'},...
'LineWidth',2,...
'FontSize',10,'fontweight','bold');
subplot(4,2,7);das_imagesc(d_bpsomf2(inds1,:),100,2,x,t(inds1));
ylabel('Time (s)','Fontsize',10,'fontweight','bold');
xlabel('Channel','Fontsize',10,'fontweight','bold');
set(gca,'Linewidth',2,'Fontsize',10,'Fontweight','bold');
text(n2/2,-0.01,'BP+SOMF (zoomed)','color','k','Fontsize',10,'fontweight','bold','HorizontalAlignment','center');
text(n2+ngap+n2/2,-0.01,'Removed noise','color','k','Fontsize',10,'fontweight','bold','HorizontalAlignment','center');
text(-200,-0.02,'(g)','color','k','Fontsize',10,'fontweight','bold','HorizontalAlignment','center');
annotation(gcf,'textarrow',[0.189 0.210],...
[0.202 0.246],'Color','r','TextColor','r','HorizontalAlignment','center',...
'String',{'Horizontal noise'},...
'LineWidth',2,...
'FontSize',10,'fontweight','bold');
subplot(4,2,8);das_imagesc(d_bpsomffk2(inds1,:),100,2,x,t(inds1));
ylabel('Time (s)','Fontsize',10,'fontweight','bold');
xlabel('Channel','Fontsize',10,'fontweight','bold');
set(gca,'Linewidth',2,'Fontsize',10,'Fontweight','bold');
text(n2/2,-0.01,'BP+SOMF+FK (zoomed)','color','k','Fontsize',10,'fontweight','bold','HorizontalAlignment','center');
text(n2+ngap+n2/2,-0.01,'Removed noise','color','k','Fontsize',10,'fontweight','bold','HorizontalAlignment','center');
text(-200,-0.02,'(h)','color','k','Fontsize',10,'fontweight','bold','HorizontalAlignment','center');
print(gcf,'-depsc','-r300','fig1.eps');