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

📄 vaplotrec.m,v

📁 具有特色的地震数据处理源码
💻 M,V
字号:
head	3.0;access;symbols;locks; strict;comment	@// @;3.0date	2000.06.13.19.22.41;	author gilles;	state Exp;branches;next	2.0;2.0date	99.05.21.18.47.06;	author mah;	state Exp;branches;next	1.5;1.5date	99.05.17.17.19.33;	author mah;	state Exp;branches;next	1.4;1.4date	99.05.07.15.10.38;	author mah;	state Exp;branches;next	1.3;1.3date	99.02.11.22.07.01;	author eadam;	state Exp;branches;next	1.2;1.2date	99.02.09.19.53.53;	author eadam;	state Exp;branches;next	1.1;1.1date	99.02.04.20.47.20;	author mah;	state Exp;branches;next	;desc@similiar to vaplot but plots all records at once@3.0log@Release 3@text@function vaplotrec(datain,t1,t2,tr1,tr2,scal,pltflg,scfact,color,headw,trcin,insec,filename)%%vaplotrec(datain,t1,t2,tr1,tr2,scal,pltflg,scfact,color,headw,trcin,insec,filename)%%This function creates a PostScript file of one file of a DSISoft variable %and all the records in file.  It uses the seisplot.m function for the first%11 input parameters (up to tstart included).  Please refer to seisplot.m %for the description of these input variables.  vaplotrec.m lets you specify%the number of traces/inch and inches/second.  vaplotrec.m also suggest the%media on which to produce your plots%This program very similiar to vaplot.m but plots all records at once%%INPUT VARIABLES%datain - input data%t1 - start time of data to be displayed%t2 - end time of data to be displayed%tr1 - first trace to be displayed%tr2 - last trace to be displayed%scal - 1 for max, 0 for ave%pltflg - 1 plot only filled peaks, 0 plot wiggle traces and filled peaks,%2 plots wiggle traces only and 3 or more plots grayscale image%scfact - scaling factor%color - trace colour %headw - header word to be annotated%trcin - traces per inch%insec - inches per second%filename - path and name of the output Postscript file to be created by vaplotrec.m%%Based on program written by G. Perron January 1999%Written by Marko Mah February 1999%%$Id: vaplotrec.m,v 2.0 1999/05/21 18:47:06 mah Exp gilles $%$Log: vaplotrec.m,v $%Revision 2.0  1999/05/21 18:47:06  mah%Release 2%%Revision 1.5  1999/05/17 17:19:33  mah%fixed help message%%Revision 1.4  1999/05/07 15:10:38  mah%fixed up help messages%%Revision 1.3  1999/02/11 22:07:01  eadam%Fix problem with annotation of last trace and change margins%%Revision 1.2  1999/02/09 19:53:53  eadam%Added option to output PCL files and changed margin for legal and letter size paper%%Revision 1.1  1999/02/04 20:47:20  mah%Initial revision%%%%Copyright (C) 1998 Seismology and Electromagnetic Section/%Continental Geosciences Division/Geological Survey of Canada%%This library is free software; you can redistribute it and/or%modify it under the terms of the GNU Library General Public%License as published by the Free Software Foundation; either%version 2 of the License, or (at your option) any later version.%%This library is distributed in the hope that it will be useful,%but WITHOUT ANY WARRANTY; without even the implied warranty of%MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU%Library General Public License for more details.%%You should have received a copy of the GNU Library General Public%License along with this library; if not, write to the%Free Software Foundation, Inc., 59 Temple Place - Suite 330,%Boston, MA  02111-1307, USA.%%DSI Consortium%Continental Geosciences Division%Geological Survey of Canada%615 Booth St.%Ottawa, Ontario%K1A 0E9%%email: dsi@@cg.nrcan.gc.ca%setting string array for xlabelshwords{1}='Original trace number';hwords{2}='FFID';hwords{3}='CDP Number';hwords{4}='Recording component';hwords{5}='Angle of rotation (deg)';hwords{6}='Trace status';hwords{7}='Trace polarity';hwords{8}='Original channel number';hwords{9}='Shot-receiver azimuth (deg)';hwords{10}='Currently unused';hwords{11}='Currently unused';hwords{12}='Number of traces in record';hwords{13}='Trace number within record';hwords{14}='Bit mask for picks';hwords{15}='Pick times 1 (sec)';hwords{16}='Pick times 2 (sec)';hwords{17}='Pick times 3 (sec)';hwords{18}='Pick times 4 (sec)';hwords{19}='Pick times 5 (sec)';hwords{20}='Elevation static shift (sec)';hwords{21}='Refraction shot static (sec)';hwords{22}='Refraction receiver static (sec)';hwords{23}='Residual shot static (sec)';hwords{24}='Refraction receiver static (sec)';hwords{25}='Trim static (sec)';hwords{26}='Shot point number';hwords{27}='Receiver point number';hwords{28}='Shot-receiver offset (m)';hwords{29}='Source northing (m)';hwords{30}='Currently unused';hwords{31}='Source easting (m)';hwords{32}='Currently unused';hwords{33}='Source elevation (m)';hwords{34}='Currently unused';hwords{35}='Receiver northing (m)';hwords{36}='Currently unused';hwords{37}='Receiver easting (m)';hwords{38}='Currently unused';hwords{39}='Receiver elevation (m)';hwords{40}='Currently unused';hwords{41}='CDP northing (m)';hwords{42}='Currently unused';hwords{43}='CDP easting (m)';hwords{44}='Currently unused';hwords{45}='CDP elevation (m)';hwords{46}='Currently unused';hwords{47}='CMP northing (m)';hwords{48}='Currently unused';hwords{49}='CMP easting (m)';hwords{50}='Currently unused';hwords{51}='Datum elevation (m)';hwords{52}='Replacement velocity (m/s)';hwords{53}='Source-to-receiver offset (m)';hwords{54}='Shot depth (m)';hwords{55}='Uphole time (sec)';hwords{56}='Wireline depth (m)';hwords{57}='Total residual shot static (sec)';hwords{58}='Total residual receiver static (sec)';hwords{59}='Ray parameter';hwords{60}='Stack fold';hwords{61}='Total datum static (sec)';hwords{62}='Total refraction shot static (sec)';hwords{63}='Total residual receiver static (sec)';hwords{64}='Total static (sec)';%echo of function calldisp(' ');disp('vaplotrec(datain,t1,t2,tr1,tr2,scal,pltflg,scfact,color,tstart,headw,trcin,insec,filename)');disp(' ');tstart=datain.fh{9}; %starting time of tracesmp=datain.fh{8}; %sampling rate in secsnrec=datain.fh{12}; %number of records in the fileysizepaper=0; % set the paper size in the y direction to zeroxsizepaper=0; % set the paper size in the x direction to zeroystart=0.5; %sets the starting point to 0.5yend=0; %sets the ending of the paperxend=0; %sets the ending of the paperfigure;%setting media type to C (17X22in)set(gcf,'PaperType','C');%turning off the display of the matlab figure of seisplotset(gcf,'Visible','off');for COUNT=nrec:-1:1 axes %call to seisplot.  The amplitude scaling factor is obtained from record nrec. %The other two records are plotted with the same scaling factor. if COUNT == nrec    [scaling_factor]=seisplot(datain.dat{COUNT},t1,t2,tr1,tr2,smp,scal,pltflg,scfact,color,tstart); else    seisplot(datain.dat{COUNT},t1,t2,tr1,tr2,smp,scaling_factor,pltflg,1.0,color,tstart); end %deleting colorbar from plot if pltflg>=3    color_hnd=findobj('Tag','Colorbar')    delete(color_hnd) end %ask for title of current record messa='What is the title you want for record '; messb=num2str(COUNT); messc='? '; mess=[messa messb messc]; titletxt=input(mess,'s'); %adding title to plot eval(['title(','titletxt',')']); %defining the range of traces and time (in sec) ntrc=abs(tr2-tr1); timesec=abs(t2-t1); %getting the dimensions of the axes ysize=timesec*insec; xsize=(ntrc+2)/trcin; %getting X axis Thick Labels which refers to trace number xtl=get(gca,'XTickLabel'); %converting labels to numbers num_xtl=str2num(xtl); %if label refers to trace 0 change it to 1 %and do the same for thick position if num_xtl(1)==0   num_xtl(1)=1;   xmarks=get(gca,'XTick');   xmarks(1)=1;   set(gca,'XTick',xmarks); end if num_xtl(size(num_xtl,1))>tr2   num_xtl(size(num_xtl,1))=tr2;   xmarks=get(gca,'XTick');   xmarks(size(xmarks,2))=tr2;   set(gca,'XTick',xmarks); end
 %round labels when needed wd=round(datain.th{COUNT}(headw,num_xtl)'); %convert new labels from trace headers(numbers) to strings str_wd=num2str(wd); %set the thick labels and the axis label set(gca,'XTickLabel',str_wd); xlabel(hwords{headw}); %setting the units of the plot to inches set(gca,'Units','inches'); %setting the dimensions of the axes to get the trc/in and in/sec specs set(gca,'Position',[0.5 ystart xsize ysize]); xend=max(xend,xsize+1.5); yend=ystart+ysize+1; ystart=ystart+ysize+1; %sets up ystart for the next plotend %for COUNT%display of filename and pathdisp(' ');disp('**************************************************')disp('Output Postscript file is:')eval(['disp(','filename',')'])%setting the dimensions of the plot on paperset(gcf,'PaperPosition',[0.5 0.5 xend yend]);%display of plot sizedisp('**************************************************')eval(['disp(''Plot size is:' '   ',num2str(xend),' X ',num2str(yend),' inches'')']);disp('**************************************************')pcl_choice = 1;%setting paper size and orientation and displaying info %for different sizes of plotsif (xend<=8.5) & (yend<=11)   set(gcf,'PaperType','usletter');   set(gcf,'PaperOrientation','portrait');   disp('Paper size is: Letter');   disp('Orientation is: Portrait');   disp('**************************************************')elseif (xend<=8.5) & (yend>=11) & (yend<=14)   set(gcf,'PaperType','uslegal');   set(gcf,'PaperOrientation','portrait');   disp('Paper size is: Legal');   disp('Orientation is: Portrait');   disp('**************************************************')elseif (xend>=8.5 & xend<=11 & yend<=8.5)   set(gcf,'PaperType','usletter');   set(gcf,'PaperOrientation','landscape');   disp('Paper size is: Letter');   disp('Orientation is: Landscape');   disp('**************************************************')elseif (xend>=11 & xend<=14 & yend<=8.5)   set(gcf,'PaperType','uslegal');   set(gcf,'PaperOrientation','landscape');   disp('Paper size is: Legal');   disp('Orientation is: Landscape')   disp('**************************************************')else   disp('Dimensions are exceeding Legal size paper')   disp('Please use Postertool to print this plot')   disp('**************************************************')   pcl_choice = 0;endif pcl_choice == 1   %ask for pcl output   mess='Would you like to output a PCL file (y=pcl,n=ps)? ';   user_pcl_choice=input(mess,'s');   if  user_pcl_choice == 'y' |  user_pcl_choice == 'Y'      messa='The PCL file name is currently ';      messb=filename ;      messc=', would you like to change this name? (y or n) ';      mess=[messa messb messc];      newname_choice=input(mess,'s');      if  newname_choice == 'y' |  newname_choice == 'Y'         mess='Please enter the new name:';         filename=input(mess,'s');      end      % create PCL file and close figure      eval(['print -dljet3 'filename''])      close all      else      %create postscript file and close figure      eval(['print -dps 'filename''])      close all   end   %response from userelse   %create postscript file and close figure   eval(['print -dps 'filename''])   close allend   %response from user@2.0log@Release 2@text@d33 1a33 1%$Id: vaplotrec.m,v 1.5 1999/05/17 17:19:33 mah Exp mah $d35 3@1.5log@fixed help message@text@d33 1a33 1%$Id: vaplotrec.m,v 1.4 1999/05/07 15:10:38 mah Exp mah $d35 3@1.4log@fixed up help messages@text@d22 1d33 1a33 1%$Id: vaplotrec.m,v 1.3 1999/02/11 22:07:01 eadam Exp mah $d35 3@1.3log@Fix problem with annotation of last trace and change margins@text@d14 9d32 1a32 1%$Id: vaplotrec.m,v 1.2 1999/02/09 19:53:53 eadam Exp eadam $d34 3d205 6a210 6 end
 if num_xtl(size(num_xtl,1))>tr2
   num_xtl(size(num_xtl,1))=tr2;
   xmarks=get(gca,'XTick');
   xmarks(size(xmarks,2))=tr2;
   set(gca,'XTick',xmarks);
@1.2log@Added option to output PCL files and changed margin for legal and letter size paper@text@d23 1a23 1%$Id: vaplotrec.m,v 1.1 1999/02/04 20:47:20 mah Exp eadam $d25 3d193 7a199 1 endd296 5a300 1end @1.1log@Initial revision@text@d23 4a26 2%$Id: Exp $%$Log: $d29 1d147 7a153 2 %call to seisplot seisplot(datain.dat{COUNT},t1,t2,tr1,tr2,smp,scal,pltflg,scfact,color,tstart);d225 1d229 1a229 1if (xend<=7.5) & (yend<=10)d236 1a236 1elseif (xend<=7.5) & (yend>=10) & (yend<=13)d243 1a243 1elseif (xend>=7.5 & xend<=10 & yend<=7.5)d250 1a250 1elseif (xend>=10 & xend<=13 & yend<=7.5)d261 1d264 17d282 6a287 3%create postscript file and close figureeval(['print -dps 'filename''])close all@

⌨️ 快捷键说明

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