⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 nmor.m

📁 基于matlab的反演程序,用于地球物理勘探中射线追踪及偏移成像程序.
💻 M
字号:
<<<<<<< nmor.m
function sout=nmor(s,t,x,v,dir)
% NMOR: forward or reverse normal moveout removal
%
% sout=nmor(s,t,x,v,dir)
%
% NMOR does forward or reverse normal moveout removal using sinc function
% interpolation. Either single traces or gathers are accomodated. 
%
% s	= input seismic matrix, one trace per column.
% t	= time coordinates for s, one entry per row of s
% x = offset coordinates for s, one entry per column of s
% v	= moveout velocities, same size as t
% dir	= 1 remove normal moveout
%	= -1 unremove normal moveout
% =================== Default = 1 =====================================
%
% G.F. Margrave, CREWES Project, 1995, 2004
%
% NOTE: It is illegal for you to use this software for a purpose other
% than non-profit education or research UNLESS you are employed by a CREWES
% Project sponsor. By using this software, you are agreeing to the terms
% detailed in this software's Matlab source file.
 
% BEGIN TERMS OF USE LICENSE
%
% This SOFTWARE is maintained by the CREWES Project at the Department
% of Geology and Geophysics of the University of Calgary, Calgary,
% Alberta, Canada.  The copyright and ownership is jointly held by 
% its author (identified above) and the CREWES Project.  The CREWES 
% project may be contacted via email at:  crewesinfo@crewes.org
% 
% The term 'SOFTWARE' refers to the Matlab source code, translations to
% any other computer language, or object code
%
% Terms of use of this SOFTWARE
%
% 1) Use of this SOFTWARE by any for-profit commercial organization is
%    expressly forbidden unless said organization is a CREWES Project
%    Sponsor.
%
% 2) A CREWES Project sponsor may use this SOFTWARE under the terms of the 
%    CREWES Project Sponsorship agreement.
%
% 3) A student or employee of a non-profit educational institution may 
%    use this SOFTWARE subject to the following terms and conditions:
%    - this SOFTWARE is for teaching or research purposes only.
%    - this SOFTWARE may be distributed to other students or researchers 
%      provided that these license terms are included.
%    - reselling the SOFTWARE, or including it or any portion of it, in any
%      software that will be resold is expressly forbidden.
%    - transfering the SOFTWARE in any form to a commercial firm or any 
%      other for-profit organization is expressly forbidden.
%
% END TERMS OF USE LICENSE

if(nargin<5)
	dir=1;
end

[nr,nc]=size(s);
trflag=0;
if(nr==1) %handle row vector input
    if(nc==1)
        disp('Only one sample in seismic matrix. Forget it')
        return;
    else
        trflag=1;
        s=s'
        [nr,nc]=size(s);
    end
end

sout=zeros(size(s));

for k=1:nc %loop over traces
 
	if(dir==1) %remove moveout
        
        if(x(k)==0) %handle zero offset trivially
            sout(:,k)=s(:,k);
        else
	
			%compute the offset times
			tx=sqrt( (x(k)./v).^2 + t.^2 );
			
			%remove nmo with sinc interpolation
			
			ind=between(t(1),t(end),tx,2);
		
			sout(ind,k)=sinci(s(:,k),t,tx(ind))';
        end
	
	elseif(dir==-1)
        
        if(x(k)==0)
            sout(:,k)=s(:,k);
        else
			test=t.^2 - (x(k)./v).^2;
			ind=find(test>0.0);
			to=-1*ones(size(t));
			to(ind)=sqrt( test(ind) );
			
			ind=between(t(1),t(length(t)),to);
			
			sout(ind,k)=sinci(s(:,k),t,to(ind))';
        end
    else
        error('invalid direction')
		
	end

end

if(trflag) sout=sout'; end

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -