segy文件
时间采样间隔是微秒,例如2000代表2ms,4000表示4ms采样。
深度采样间隔是毫米,例如10000代表10m,5000表示5m采样。
软件环境:Ubuntu22.04,cwp/su44R28。
命令:suplane 、segyhdrs 、bhedtopar 、setbhed 、segywrite、segyread
利用Seismic Unix把.su写成.segy文件,需要准备卷头文件binary(400字节)和header(3200字节)。
suplane > data.su
segyhdrs < data.su
当前工作目录下出现binary和header。header是3200个字节的文本文件,可以直接more。binary是二进制文件,利用bhedtopar转换成文本binary.par,可以用vim修改。
bhedtopar < binary outpar=binary.par
binary.par文件中的采样间隔hdt=4000,采样点数hns=64。
修改binary.par之后用setbhed可以把binary.par转换成二进制的binary
setbhed bfile=binary par=binary.par
segywrite tape=data.sgy verbose=1 <data.su
Using Big Endian SU data format w/ XDR.
segywrite: tape opened successfully
segywrite: header file opened successfully
segywrite: binary file opened successfully
segywrite: header file closed successfully
segywrite: tape closed successfully
segywrite: binary file closed successfully
在win11下面软件SeiSee可以读取当前生成的data.sgy,显示:
SEG-Y File
EBCDIC Text Header Encoding
Big Endian byte order
# Traces : 32
# Trace Samples : 64
Sample Format : 1
: IBM Float (32 bit)
Sample Interval (uS): 4000
Time Length : 252
------------------------------------------
Header First trace Last trace
SP 0 0
CDP 0 0
FFID 0 0
回旋镖,利用segyread把segy转回成su文件
segyread tape=data.sgy endian=0 conv=1 >plane.su
此时的binary是IBM float,需要swap才可以查看。
bhedtopar <binary swap=1 outpar=binary.par
总结:对于标准的segy,IBM Float,采样点数ns和采样率dt齐全,下面的命令是对的。
segyread tape=a.sgy endian=0 conv=1 |segyclean >a1.su
不用segyclean会显示ximage: ealloc.c: malloc failed (Cannot allocate memory)
转换卷头的命令需要swap=1
bhedtopar <binary swap=1 outpar=bin.par
这里的vp_marmousi-ii.segy没有采样间隔,出错。
segyread tape=./vp_marmousi-ii.segy endian=1 conv=0>a.su
segyread tape=./vp_marmousi-ii.segy endian=1 conv=1>a.su
读出来的su是0大小。
segyread tape=./vp_marmousi-ii.segy endian=0 conv=0>a.su
segyread tape=./vp_marmousi-ii.segy endian=0 conv=1>a.su
读出来的su大小是对的,但是binary都不对,需要swap。