import numpy as np
import pysegy as seg
= seg.FileHeader()
fh = 2
fh.bfh.ns = 5
fh.bfh.DataSampleFormat
# two traces with minimal headers
= seg.BinaryTraceHeader()
hdr = 2
hdr.ns
= np.array([[1.0], [2.0]], dtype=np.float32)
data = seg.SeisBlock(fh, [hdr], data)
block
"out.segy", block) seg.segy_write(
Write
Writing SEGY files mirrors the reading workflow.
The pysegy.segy_write helper takes a pysegy.SeisBlock and writes a complete SEGY file to disk.
Back to top