📄 picker.m
字号:
% *************************************************% *** picking program ***% *************************************************%%% *** function [tpicks,xpicks]=picker(traces,offset,time,np);%% *** traces contain input data% *** offset: offset vector% *** time: time vector% *** Integer number of windows the data is divided into ***% *** xpicks is the picked offset vector ***% *** tpicks is the picked time vector ***%% *** tpicks contains time picks and xpicks offset picks% function [tpicks,xpicks]=picker(traces,offset,time,np);% [nt,nx]=size(traces); nxx=fix(nx/np) nrest=nx-nxx*np; if(nrest~=0) np=np+1; end ntt=150; dx=offset(2)-offset(1); count=0; for ii=1:np nxx1=(ii-1)*nxx+1; if(nrest~=0&ii==np) nxx=nrest; end nxx2=nxx1+nxx-1; if(ii~=1) clear ht end [ht]=wiggleplot(traces(1:ntt,nxx1:nxx2),... (offset(nxx1:nxx2)-offset(nxx1)),time(1:ntt),7,.02,8); button=0; k=0; p=zeros(nxx,1); xx=zeros(nxx,1); tt=zeros(nxx,1); h=zeros(nxx,1); xkold=0; while(button~=3) [x,t,button]=ginput(1); if(button==1) xk=fix(round(x)/dx)+1; if(xk<=0) xk=1; end if(xk>nxx) xk=nxx; end if(p(xk)==1) delete(h(xk)); end if(xkold~=0) set(ht(xkold),'color','k') end set(ht(xk),'color','g') xkold=xk; xx(xk)=(xk-1)*dx; tt(xk)=t; h(xk)=plot(x,t,'ro'); p(xk)=1; end end i=find(tt~=0); xxx=zeros(length(i),1); ttt=zeros(length(i),1); xxx(1:length(i))=xx(i); ttt(1:length(i))=tt(i); xpicks(count+1:count+length(i))=xxx+offset(nxx1); tpicks(count+1:count+length(i))=ttt; count=count+length(i); end return%% *** end of program
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -