📄 vawiggleplot.m
字号:
% **********************************************% *** Program to plot a seismic section ***% *** Written by Y. Bouzidi. Geophysics UofA ***% *** January 1998 ***% **********************************************%% vawiggleplot(traces,dx,dt,va,...% firstoffset,ntrpinch,nsecpinch)% traces=input data% dx=reciever spacing (m)% dt=sampling interval (sec)% va= variable area plot -1 0 1% firstoffset=distance from shot to first trace% ntrpinch=number of traces per inch% nsecpinch=number of seconds per inch% function vawiggleplot(traces,dx,dt,va,... firstoffset,ntrpinch,nsecpinch)%% *** set number of samples ***% constgain=3; wiggle=1; nt=max(size(traces(:,1))); nx=max(size(traces(1,:))); ampmax=max(max(abs(traces))); for i=1:nx traces(:,i)=traces(:,i)./ampmax*dx*constgain; end xticks=0:10:(nx-1)*dx+firstoffset; yticks=0:.1:nt*dt; mm=fix(nx/ntrpinch); xaxislength=mm+rem(nx-1,ntrpinch)/ntrpinch+... firstoffset/ntrpinch/dx+2*dx/ntrpinch; yaxislength=(nt-1)*dt/nsecpinch+.1; totwidth=xaxislength+1.25; totheight=yaxislength+1.25; xscale=1./totwidth; yscale=1./totheight; xaxispos=0.75*xscale; yaxispos=0.75*yscale; width=72*totwidth; height=72*totheight; scrsize=get(0,'screensize'); if(height>scrsize(4)) 'Height greater than screen size' break end; if(width>scrsize(3)) 'width greater than screen size' break end; bottom=(scrsize(4)-height)/2; left=(scrsize(3)-width)/2; rect1=[left,bottom,width,height]; h1=figure('position',rect1); rect2=[xaxispos yaxispos xaxislength*xscale yaxislength*yscale]; axes1=axes('position',rect2,'box','on','drawmode','fast'); time=((1:nt)-1)*dt; x=((1:nx)-1)*dx+firstoffset; set(gca,'TickDir','out'); set(gca,'YDir','reverse'); set(gca,'xtick',xticks); set(gca,'ytick',yticks); set(gca,'xlim',[-ntrpinch*.25*dx (nx-1)*dx+firstoffset+ntrpinch*.25*dx]); set(gca,'ylim',[-nsecpinch*.05 (nt+1)*dt+nsecpinch*.05]); xlabel('Distance (m)'); ylabel('Two way time (sec)'); hold on if(va~=0) for i=1:nx if(va>0) poswigles=find(traces(:,i)>0.); else poswigles=find(traces(:,i)<0.); end; if(length(poswigles)~=0) msize=max(size(poswigles)); else msize=0; end k=0; icount=1; if(msize~=0) while(k<nt-1) k=k+1; while((poswigles(icount+1)-poswigles(icount))==1&icount<msize-1) icount=icount+1; end clear yy clear tt yy(1)=x(i); yy(2:icount-k+1+1)=... traces(poswigles(k):poswigles(icount),i)+x(i); yy(icount-k+1+2)=x(i); tt(2:icount-k+1+1)=time(poswigles(k):poswigles(icount)); tt(1)=tt(2); tt(icount-k+1+2)=tt(icount-k+1+1); patch(yy,tt,'k','erasemode','none','edgecolor','k') k=icount; icount=icount+1; if(icount>=msize) break end end end if(wiggle==1) plot(traces(:,i)+x(i),time,'k','erasemode','none') drawnow end; end else for i=1:nx plot(traces(:,i)+x(i),time,'k','erasemode','none') drawnow end end hold off% print -r600 plot.ps; % If the file is to be saved.%% *** end of program *****
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -