Seismic Unix对segy的应用

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。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值