SU(Seismic Unix)画图函数supsimage使用方法

3 篇文章 3 订阅

一、简介

SU是基于类Unix平台的开源地震处理软件,不仅具有强大的数据处理能力,还能画出美观的地震剖面图。
这里介绍一个重要的画图函数supsimage。
supsimage是一个二维绘图函数,类似matlab的imagesc,是基于linux系统的画图函数psimage再开发的。

二、supsimage函数的参数介绍

我们先看一下supsimage函数的参数。

$ supsimage 
									
 SUPSIMAGE - PostScript IMAGE plot of a segy data set			
									
 supsimage <stdin [optional parameters] | ...				
									
 Optional parameters:						 	
									
 n2=tr.ntr or number of traces in the data set (ntr is an alias for n2)
									
 d1=tr.d1 or tr.dt/10^6	sampling interval in the fast dimension	
   =.004 for seismic 		(if not set)				
   =1.0 for nonseismic		(if not set)				
 							        	
 d2=tr.d2			sampling interval in the slow dimension	
   =1.0 			(if not set)				
 							        	
 f1=tr.f1 or tr.delrt/10^3 or 0.0  first sample in the fast dimension	
 							        	
 f2=tr.f2 or tr.tracr or tr.tracl  first sample in the slow dimension	
   =1.0 for seismic		    (if not set)			
   =d2 for nonseismic		    (if not set)			
									
 verbose=0              =1 to print some useful information		
									
 tmpdir=	 	if non-empty, use the value as a directory path	
		 	prefix for storing temporary files; else if the	
	         	the CWP_TMPDIR environment variable is set use	
	         	its value for the path; else use tmpfile()	
 									
 Note that for seismic time domain data, the "fast dimension" is	
 time and the "slow dimension" is usually trace number or range.	
 Also note that "foreign" data tapes may have something unexpected	
 in the d2,f2 fields, use segyclean to clear these if you can afford	
 the processing time or use d2= f2= to override the header values if	
 not.									
									
 See the psimage selfdoc for the remaining parameters.			
									
 On NeXT:	supsimage < infile [optional parameters]  | open	
									
 Trace header fields accessed: ns, ntr, tracr, tracl, delrt, trid,     
	dt, d1, d2, f1, f2

各个参数的含义:
n1:时间序列的采样个数,n1=tr.ns,ns是n1的别称
n2:横向道数,n2=tr.ntr,ntr是n2的别称
d1:时间采样间隔,单位:sec,也可以修改为meter
d2:横向采样间隔,单位自定义,可以为cmp,可以为distance
f1:时间轴的起始坐标,从上方开始
f2:空间轴的起始坐标

三、psimage函数的参数介绍

由于supsimage是基于psimage再开发的,所以更多的参数设置需要参考psimage。


PSIMAGE - PostScript IMAGE plot of a uniformly-sampled function f(x1,x2)
									
 psimage n1= [optional parameters] <binaryfile >postscriptfile		
									
 Required Parameters:							
 n1			 number of samples in 1st (fast) dimension	
									
 Optional Parameters:							
 d1=1.0		 sampling interval in 1st dimension		
 f1=0.0		 first sample in 1st dimension			
 n2=all		 number of samples in 2nd (slow) dimension	
 d2=1.0		 sampling interval in 2nd dimension		
 f2=0.0		 first sample in 2nd dimension			
 perc=100.0		 percentile used to determine clip		
 clip=(perc percentile) clip used to determine bclip and wclip		
 bperc=perc		 percentile for determining black clip value	
 wperc=100.0-perc	 percentile for determining white clip value	
 bclip=clip		 data values outside of [bclip,wclip] are clipped
 wclip=-clip		 data values outside of [bclip,wclip] are clipped
                        bclip and wclip will be set to be inside       
                        [lbeg,lend] if lbeg and/or lend are supplied   
 threecolor=1		 supply 3 color values instead of only two,	
                        using not only black and white, but f.e. red,	
                        green and blue					
 brgb=0.0,0.0,0.0	 red, green, blue values corresponding to black	
 grgb=1.0,1.0,1.0	 red, green, blue values corresponding to grey	
 wrgb=1.0,1.0,1.0	 red, green, blue values corresponding to white	
 bhls=0.0,0.0,0.0	 hue, lightness, saturation corresponding to black
 ghls=0.0,1.0,0.0	 hue, lightness, saturation corresponding to grey
 whls=0.0,1.0,0.0	 hue, lightness, saturation corresponding to white
 bps=12		 bits per sample for color plots, either 12 or 24
 d1s=1.0		 factor by which to scale d1 before imaging	
 d2s=1.0		 factor by which to scale d2 before imaging	
 verbose=1		 =1 for info printed on stderr (0 for no info)	
 xbox=1.5		 offset in inches of left side of axes box	
 ybox=1.5		 offset in inches of bottom side of axes box	
 width=6.0		 width in inches of axes box			
 height=8.0		 height in inches of axes box			
 x1beg=x1min		 value at which axis 1 begins			
 x1end=x1max		 value at which axis 1 ends			
 d1num=0.0		 numbered tic interval on axis 1 (0.0 for automatic)
 f1num=x1min		 first numbered tic on axis 1 (used if d1num not 0.0)
 n1tic=1		 number of tics per numbered tic on axis 1	
 grid1=none		 grid lines on axis 1 - none, dot, dash, or solid
 label1=		 label on axis 1				
 x2beg=x2min		 value at which axis 2 begins			
 x2end=x2max		 value at which axis 2 ends			
 d2num=0.0		 numbered tic interval on axis 2 (0.0 for automatic)
 f2num=x2min		 first numbered tic on axis 2 (used if d2num not 0.0)
 n2tic=1		 number of tics per numbered tic on axis 2	
 grid2=none		 grid lines on axis 2 - none, dot, dash, or solid
 label2=		 label on axis 2				
 labelfont=Helvetica	 font name for axes labels			
 labelsize=18		 font size for axes labels			
 title=		 title of plot					
 titlefont=Helvetica-Bold font name for title				
 titlesize=24		  font size for title				
 titlecolor=black	 color of title					
 axescolor=black	 color of axes					
 gridcolor=black	 color of grid					
 axeswidth=1            width (in points) of axes                      
 ticwidth=axeswidth     width (in points) of tic marks			
 gridwidth=axeswidth    width (in points) of grid lines		
 style=seismic		 normal (axis 1 horizontal, axis 2 vertical) or	
			 seismic (axis 1 vertical, axis 2 horizontal)	
 legend=0	         =1 display the color scale			
 lnice=0                =1 nice legend arrangement                     
                        (overrides ybox,lx,width,height parameters)    
 lstyle=vertleft 	Vertical, axis label on left side   		
			 =vertright (Vertical, axis label on right side)
			 =horibottom (Horizontal, axis label on bottom)	
 units=		 unit label for legend				
 legendfont=times_roman10    font name for title			
 following are defaults for lstyle=0. They are changed for other lstyles
 lwidth=1.2		 colorscale (legend) width in inches 		
 lheight=height/3     	 colorscale (legend) height in inches		
 lx=1.0		 colorscale (legend) x-position in inches	
 ly=(height-lheight)/2+xybox    colorscale (legend) y-position in pixels
 lbeg= lmin or wclip-5*perc    value at which legend axis begins	
 lend= lmax or bclip+5*perc    value at which legend axis ends        	
 ldnum=0.0	 numbered tic interval on legend axis (0.0 for automatic)
 lfnum=lmin	 first numbered tic on legend axis (used if d1num not 0.0)
 lntic=1	 number of tics per numbered tic on legend axis 
 lgrid=none	 grid lines on legend axis - none, dot, dash, or solid
									
 curve=curve1,curve2,...  file(s) containing points to draw curve(s)   
 npair=n1,n2,n2,...            number(s) of pairs in each file         
 curvecolor=black,..	 color of curve(s)				
 curvewidth=axeswidth	 width (in points) of curve(s)			
 curvedash=0            solid curve(s), dash indices 1,...,11 produce  
                        curve(s) with various dash styles              
#									
 NOTES:								
 The curve file is an ascii file with the points specified as x1 x2 	
 pairs, one pair to a line.  A "vector" of curve files and curve	
 colors may be specified as curvefile=file1,file2,etc.			
 and curvecolor=color1,color2,etc, and the number of pairs of values   
 in each file as npair=npair1,npair2,... .				
									
 You may eliminate the blocky appearance of psimages by adjusting the  
 d1s= and d2s= parameters, so that psimages appear similar to ximages.	
									
 All color specifications may also be made in X Window style Hex format
 example:   axescolor=#255						
# 色标									
 Some example colormap settings:					
 red white blue: wrgb=1.0,0,0 grgb=1.0,1.0,1.0 brgb=0,0,1.0 		
 white red blue: wrgb=1.0,1.0,1.0 grgb=1.0,0.0,0.0 brgb=0,0,1.0 	
 blue red white: wrgb=0.0,0.0,1.0 grgb=1.0,0.0,0.0 brgb=1.0,1.0,1.0 	
 red green blue: wrgb=1.0,0,0 grgb=0,1.0,0 brgb=0,0,1.0		
 orange light-blue green: wrgb=1.0,.5,0 grgb=0,.7,1.0 brgb=0,1.0,0	
 red light-blue dark blue: wrgb=0.0,0,1.0 grgb=0,1.0,1.0 brgb=0,0,1.0 	
 
# 字体 
 Legal font names are:							
 AvantGarde-Book AvantGarde-BookOblique AvantGarde-Demi AvantGarde-DemiOblique Bookman-Demi Bookman-DemiItalic Bookman-Light Bookman-LightItalic 
 Courier Courier-Bold Courier-BoldOblique Courier-Oblique 
 Helvetica Helvetica-Bold Helvetica-BoldOblique Helvetica-Oblique 
 Helvetica-Narrow Helvetica-Narrow-Bold Helvetica-Narrow-BoldOblique 
 Helvetica-Narrow-Oblique NewCentrySchlbk-Bold NewCenturySchlbk-BoldItalic NewCenturySchlbk-Roman Palatino-Bold  
 Palatino-BoldItalic Palatino-Italics Palatino-Roman 
 SanSerif-Bold SanSerif-BoldItalic SanSerif-Roman 
 Symbol Times-Bold Times-BoldItalic 
 Times-Roman Times-Italic ZapfChancery-MediumItalic

各个参数的含义:

1.轴设置

n1:时间序列的采样个数,n1=tr.ns,ns是n1的别称
n2:横向道数,n2=tr.ntr,ntr是n2的别称
d1:时间采样间隔,单位:sec,也可以修改为meter
d2:横向采样间隔,单位自定义,可以为cmp,可以为distance
f1:时间轴的起始坐标,从上方开始
f2:空间轴的起始坐标,从左侧开始

axescolor=black:轴颜色
gridcolor=black:网格颜色

axeswidth=1 :轴宽度(像素点)
ticwidth=axeswidth :刻度宽度(像素点)
gridwidth=axeswidth :网格线宽度(像素点)
style=seismic:轴1垂直、轴2水平;=normal :轴1水平、轴2垂直

width=6.0: 轴框宽度(英寸)
height=8.0:轴框高度(英寸)

x1beg=x1min:垂直轴起始值
x1end=x1max:垂直轴结束值

x2beg=x2min:水平轴起始值
x2end=x2max:水平轴结束值

d1num=0.0:垂直轴上的编号间隔
d2num=0.0:水平轴上的编号间隔

f1num=x1min:轴1上第一个编号的tic(如果d1num不是0.0,则使用)
f2num=x2min:轴2上第一个编号的tic(如果d2num不是0.0,则使用)

n1tic=1: 轴1上每个编号的tic的tic数
n2tic=1: 轴2上每个编号的tic的tic数

label1= :轴1的标签
label2= :轴2的标签

说明:n1和n2一般不用定义,函数会根据输入数据自动识别

2.显示截断设置

perc=100 :用于确定数据值截断的百分比
clip=(perc percentile) :用来确定bclip和wclip的值
bclip=clip:色标范围最小值(b表示black,最小值)
wclip=-clip:色标范围最大值(b表示white,最大值),也可以在[lbeg, lend]中设置[bclip,wclip]

3.颜色设置

threecolor=1:使用三色定义色标而不是双色(黑白),即rgb色彩模式
brgb=0.0,0.0,0.0 :和黑色相关的rgb值
grgb=1.0,1.0,1.0 :和灰色相关的rgb值
wrgb=1.0,1.0,1.0 :和白色相关的rgb值

此外还有hls色彩模式,即hsv色彩模式,这里不展开说。

bps=12:颜色图的每个采样数,12或24

d1s=1.0:成像前缩放d1的因子
d2s=1.0:成像前缩放d2的因子

xbox=1.5 :轴框左侧的偏移量(英寸)
ybox=1.5 :轴框下侧的偏移量(英寸)

labelfont=Helvetica:轴字体
labelsize=18:轴字号

4.网格设置

grid1=none:轴1的网格线: - none, dot, dash, or solid
grid2=none:轴2的网格线: - none, dot, dash, or solid

5.标题设置

title= :绘图标题
titlefont=Helvetica-Bold:标题字体
titlesize=24:标题字号
titlecolor=black:标题颜色

6.色标设置

legend=0:=1 显示色标,=0 不显示
lnice=0:=1 nice legend arrangement ,即一个比较好看的色标设置

lstyle=vertleft :色标则左侧垂直;=vertright (右侧垂直); =horibottom (底部水平)
units= :色标单位
legendfont=times_roman10:色标单位字体

lwidth=1.2:色标宽度(英寸)
lheight=height/3:色标高度(英寸)

lx=1.0:色标x方向位置(英寸)
ly=(height-lheight)/2+xybox:色标x方向位置(像素点)

lbeg= lmin or wclip-5perc:色标起始值
lend= lmax or bclip+5
perc:色标结束值

ldnum=0.0:色标轴刻度数
lfnum=lmin:色标轴起始刻度 (used if d1num not 0.0)
lntic=1:色标轴每个大刻度的小刻度数
lgrid=none:色标轴网格线型: - none, dot, dash, or solid

7.图像输出

可输出为eps图像:
supsimage <stdin [optional parameters] >filename.eps

7.绘制曲线

curve=curve1,curve2,… :包含待绘制曲线的点的文件
npair=n1,n2,n2,… 每个文件的点数
curvecolor=black,… :曲线的颜色
curvewidth=axeswidth:线宽
curvedash=0 :线型 :=0是实线,=1,2,3,…,11是不同类型的虚线

8.色标例子

red white blue: wrgb=1.0,0,0 grgb=1.0,1.0,1.0 brgb=0,0,1.0
white red blue: wrgb=1.0,1.0,1.0 grgb=1.0,0.0,0.0 brgb=0,0,1.0
blue red white: wrgb=0.0,0.0,1.0 grgb=1.0,0.0,0.0 brgb=1.0,1.0,1.0
red green blue: wrgb=1.0,0,0 grgb=0,1.0,0 brgb=0,0,1.0
orange light-blue green: wrgb=1.0,.5,0 grgb=0,.7,1.0 brgb=0,1.0,0
red light-blue dark blue: wrgb=0.0,0,1.0 grgb=0,1.0,1.0 brgb=0,0,1.0

9.可选字体

Legal font names are:
AvantGarde-Book AvantGarde-BookOblique AvantGarde-Demi AvantGarde-DemiOblique Bookman-Demi Bookman-DemiItalic Bookman-Light Bookman-LightItalic
Courier Courier-Bold Courier-BoldOblique Courier-Oblique
Helvetica Helvetica-Bold Helvetica-BoldOblique Helvetica-Oblique
Helvetica-Narrow Helvetica-Narrow-Bold Helvetica-Narrow-BoldOblique
Helvetica-Narrow-Oblique NewCentrySchlbk-Bold NewCenturySchlbk-BoldItalic NewCenturySchlbk-Roman Palatino-Bold
Palatino-BoldItalic Palatino-Italics Palatino-Roman
SanSerif-Bold SanSerif-BoldItalic SanSerif-Roman
Symbol Times-Bold Times-BoldItalic
Times-Roman Times-Italic ZapfChancery-MediumItalic

10.注意

曲线文件是ascii文件,包含x1,x2这样的坐标对,一对是一个线。
曲线文件和曲线颜色也要匹配:
curvefile=file1,file2,etc.
curvecolor=color1,color2,etc
每个文件中数据应该以npair=npair1,npair2,… 的形式排列。
可以通过调整d1s=和d2s=参数来消除图像的块状外观,使图像看起来类似于ximages。

所有颜色规格也可以在X窗口样式十六进制格式
示例:axescolor=#255

四、ximage介绍

上面的supsimage和psimage都是基于ximage的。三者有很多基础的参数设置是类似甚至完全相同的,这里不再赘述。仅仅补充关于色标种类的选择。
说明如下:

cmap=hsv'n' or rgb'm'	'n' is a number from 0 to 13		
				'm' is a number from 0 to 11		
				cmap=rgb0 is equal to cmap=gray		
				cmap=hsv1 is equal to cmap=hue		
				(compatibility to older versions)

可以在命令后加hsv色系或者rgb色系。二者后面加一个序号代表各个色系的第几种色标,其中0表示灰色。hsv色系有0-13共14个色标类型;rgb色系共有0-11共12个色标类型。和绘图后用键盘的’R’或者‘H’键一样的效果。
例如:

cmap=hsv0  #灰色
cmap=hsv1
cmap=rgb0  #灰色
cmap=rgb1

五、可参考

如何用Seismic Unix画出漂亮的地震剖面图

  • 6
    点赞
  • 24
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 4
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

yangshun_cug

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值