How to make a seismic wedge model?
조회 수: 4 (최근 30일)
이전 댓글 표시
Dear Star Strider
I would really appreciate if you can help me as always! I have asked my question in public several times and I got an answer from "Afshin Aghayan" but I need more help as I am new in Matlab:(.
I want to convolve a wavelet with a signal and make a wedge model. Below is the answer I got and is totally correct. But I don't know how I can apply my data to this model? My data is attached.(fierst column is time and second column is acoustic impedance). Below is the answer I got:
% This function diplays siemic events based on slope
% This function diplays siemic events based on slope. The code from "Afshin Aghayan"
clc
number=input('How maney events do you want to see? ');
x=input('Enter number of traces : ');
d=input('Enter trace interval in m : ');
t=input('Enter maximum recording time in ms : ');
f=input('Enter frequency of the Ricker wavelet (Hz) : ');
% Ricker wavelet equal ricker=(1-2(pi*f*t)^2)*exp(-(pi*f*t)^2))
n=(0:100);
wavelet=(1-2*(pi*f*(n-50)*0.001).^2).*exp(-(pi*f*(n-50)*0.001).^2);
% Creating the impedance matrix
ImpMatrix=zeros(t,x);
for num=1:number
slope=input(['Enter slope of the event#' num2str(num) ' in degree (e.g. 0 means horizontal line) : ']);
t0=input(['Enter start time of the event#' num2str(num) ' in ms : ']);
if t0==0; t0=1; end % In the case t0=0, we assume that the event is recorded at the first sample
for i=1:x
k=d*i;
t1=k*tand(slope)+t0;
if ceil(t1)<=t && ceil(t1)>0
ImpMatrix(ceil(t1),i)=1;
end
end
end
fieldCon=conv2(ImpMatrix,wavelet','same');
field=fieldCon(1:t,:);
%================================Display===================================
if exist('wigb') == 2 % check wigb function exists
figure, wigb(field);
ylabel('Time (ms)'), xlabel('Trace no.')
ylim([1 t])
end
figure,imagesc(field)
ylabel('Time (ms)'), xlabel('Trace no.')
% Afshin Aghayan
% 2011
My own code for a wavelet and for a reflection coefficient series is below and their convolution make a signal. Now, how my I apply my own data to the above code to get a wedge model with my dataset? Appreciated in advance!
clc;
clear all;
close all;
% My wavelet code is:
%.............................................
fr=30;% frequency
dt=.002;
T=0.1;
tt=-T:dt:T;
tsh=0.008;%time shifting
tr=round(length(tt)/2);
t=tt(tr:end);
zpr=(1-tt.^2*fr^2*pi^2).*exp(-tt.^2*pi^2*fr^2);%zero-phase ricker
figure(1)
plot(zpr)
%................................................
% My signal is:
%...............................................
data=xlsread('1');
amp=data(:,2);%us/f
time=data(:,1);%ms
tim=time(1:1:end);
am=amp(1:1:end);% acoustic impedance
len=length(tim);
for i=1:len
if am(i)==-999.25
am(i)=am(i-1);
end
end
data1=zeros(len,2);
tti=round(tim);
for j=2:len
r(j)=(am(j)-am(j-1))/(am(j)+am(j-1));% reflection coefficients
end
% plot(r)
%..............................................................
s=conv(r,zpr);
if mod(length(zpr),2)==0
s=s(length(zpr)/2:end-length(zpr)/2);
else
s=s((length(zpr)-1)/2:end-(length(zpr)-1)/2);
end
ls=length(s);
s(ls)=[];
[m1 n1]=size(s);
if m1==1
s=s';
end
n=10;% number of trace
dx=2;% distance between trace
scal=5;
figure(2)
for i=1:n
b=(i-1)*dx; %%m%%% ????? ???? ???? ????
a=scal*s+b;
c=a;
a(a<b)=b;
plot(c,tti,'black')
hold on
fill(a,tti,'k','linestyle','none');
end
hold off
set(gca,'YDir','reverse')
xlim([-dx (n+1)*dx])
% ylim([700 2826])
ylabel('millisecent')
title('synthetic trace made of zero-phase ricker') ;
댓글 수: 0
답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!