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

📄 vaplot.m,v

📁 具有特色的地震数据处理源码
💻 M,V
📖 第 1 页 / 共 2 页
字号:
@Release 2@text@d26 1a26 1%outflg - format of the output file 0==postscript 1==pcld33 1a33 1%$Id: vaplot.m,v 1.6 1999/05/17 17:18:40 mah Exp mah $d35 3d286 4d291 1a291 1   disp('Please verify if your outflg is either 1 or 0');@1.6log@fixed help message@text@d33 1a33 1%$Id: vaplot.m,v 1.5 1999/05/07 15:05:03 mah Exp mah $d35 3@1.5log@fixed up help messages@text@d20 1d33 1a33 1%$Id: vaplot.m,v 1.4 1999/02/11 22:05:25 eadam Exp mah $d35 3@1.4log@Fix problem with annotation of last trace and change margins as wellas some header word input (i.e. smp and tstart) which are nowextracted from the file header@text@d1 1a1 3function vaplot(datain,t1,t2,tr1,tr2,scal,pltflg,scfact,color,headw,trcin,insec,rec,outflg,filename,titletxt)
%^M%vaplot(datain,t1,t2,tr1,tr2,scal,pltflg,scfact,color,headw,trcin,insec,rec,outflg,filename,titletxt)^Md3 30a32 18%This function creates a PostScript file of one record of a DSISoft variable.  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.  Vaplot.m lets you specify the number of traces/inch and inches/second.
%Vaplot.m also suggest the media on which to produce your plots
%
%INPUT VARIABLES
%headw - header word to be annotated
%trcin - traces per inch
%insec - inches per second
%rec - record of the DSISoft variable to be ploted
%outflg - format of the output file 0==postscript 1==pcl
%filename - path and name of the output Postscript file to be created by vaplot.m
%titletxt - text for plot title
%
%Written by G. Perron January 21st, 1999

%
%$Id: vaplot.m,v 1.3 1999/02/03 20:11:46 perron Exp $
d34 5a48 1%
d50 1d77 75a151 75

%setting string array for xlabels
hwords{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 call
disp(' ');
disp('vaplot(datain,t1,t2,tr1,tr2,scal,pltflg,scfact,color,headw,trcin,insec,rec,filename,titletxt)');
disp(' ');

%call to seisplot
smp=datain.fh{8};
d153 127a279 127seisplot(datain.dat{rec},t1,t2,tr1,tr2,smp,scal,pltflg,scfact,color,tstart);

%deleting colorbar from plot
if pltflg>=3
   color_hnd=findobj('Tag','Colorbar')
   delete(color_hnd)
end

%adding title to plot
eval(['title(','titletxt',')']);

%turning off the display of the matlab figure of seisplot
set(gcf,'Visible','off');

%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;

if outflg==0
   %display of filename and path
   disp(' ');
   disp('**************************************************')
   disp('Output Postscript file is:')
   eval(['disp(','filename',')'])
elseif outflg==1
   %display of filename and path
   disp(' ');
   disp('**************************************************')
   disp('Output PCL file is:')
   eval(['disp(','filename',')'])
end

%setting media type to C (17X22in)
set(gcf,'PaperType','C');
%setting the dimensions of the plot on paper
set(gcf,'PaperPosition',[0.5 0.5 (xsize+1) (ysize+1)]);
%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 0.5 xsize ysize]);

%display of plot size
disp('**************************************************')
eval(['disp(''Plot size is:' '   ',num2str(xsize),' X ',num2str(ysize),' inches'')']);
disp('**************************************************')



%setting paper size and orientation and displaying info 
%for different sizes of plots
if			(xsize<=8.5) & (ysize<=11)
   set(gcf,'PaperType','usletter');
   set(gcf,'PaperOrientation','portrait');
   disp('Paper size is: Letter');
   disp('Orientation is: Portrait');
   disp('**************************************************')

elseif	(xsize<=8.5) & (ysize>=11) & (ysize<=14)
   set(gcf,'PaperType','uslegal');
   set(gcf,'PaperOrientation','portrait');
   disp('Paper size is: Legal');
   disp('Orientation is: Portrait');
   disp('**************************************************')

elseif	(xsize>=8.5 & xsize<=11 & ysize<=8.5)
   set(gcf,'PaperType','usletter');
   set(gcf,'PaperOrientation','landscape');
   disp('Paper size is: Letter');
   disp('Orientation is: Landscape');
   disp('**************************************************')

elseif   (xsize>=11 & xsize<=14 & ysize<=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('**************************************************')

end
   
%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{rec}(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});

if outflg==0
   %create postscript file and close figure
   eval(['print -dps 'filename''])
   close all
elseif outflg==1
   %create pcl file and close figure
   eval(['print -dljet3 'filename''])
   close all
else
   disp('Please verify if your outflg is either 1 or 0');
end
   
@1.3log@Added new outflg variable the enables the user to choosebetween PCL and Postscript output formatPCL prints much faster@text@d1 1a1 1function vaplot(datain,t1,t2,tr1,tr2,smp,scal,pltflg,scfact,color,tstart,headw,trcin,insec,rec,outflg,filename,titletxt)
d3 1a3 1%vaplot(datain,t1,t2,tr1,tr2,smp,scal,pltflg,scfact,color,tstart,headw,trcin,insec,rec,filename,titletxt)^Md22 1a22 1%$Id: vaplot.m,v 1.2 1999/01/21 18:29:16 perron Exp $
d24 5d132 1a132 1disp('vaplot(datain,t1,t2,tr1,tr2,smp,scal,pltflg,scfact,color,tstart,headw,trcin,insec,rec,filename,titletxt)');
d136 2d192 1a192 1if			(xsize<=7.5) & (ysize<=10)
d199 1a199 1elseif	(xsize<=7.5) & (ysize>=10) & (ysize<=13)
d206 1a206 1elseif	(xsize>=7.5 & xsize<=10 & ysize<=7.5)
d213 1a213 1elseif   (xsize>=10 & xsize<=13 & ysize<=7.5)
d239 6@1.2log@Modified help text and annotations@text@d1 1a1 1function vaplot(datain,t1,t2,tr1,tr2,smp,scal,pltflg,scfact,color,tstart,headw,trcin,insec,rec,filename,titletxt)
d15 1d22 1a22 1%$Id: vaplot.m,v 1.1 1999/01/21 17:15:56 perron Exp perron $
d24 3d153 13a165 5%display of filename and path
disp(' ');
disp('**************************************************')
disp('Output Postscript file is:')
eval(['disp(','filename',')'])
a166 1
d240 12a251 3%create postscript file and close figure
eval(['print -dps 'filename''])
close all
@1.1log@Initial revision@text@d2 3d21 5a25 2%$Id:$
%$Log:$
d123 1a123 1disp('function vaplot(datain,t1,t2,tr1,tr2,smp,scal,pltflg,scfact,color,tstart,headw,trcin,insec,rec,filename,titletxt)');
d139 1a139 1%set(gcf,'Visible','off');
d231 1a231 1%close all
@

⌨️ 快捷键说明

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