Skip to content

write_segy builtin

write_segy(path, model, column, *, nodata=0.0)

Writes one column of a BlockModel as SEG-Y revision 1.

Parameters:

Name Type Description Default
path str or Path

The .sgy file: big-endian IEEE floats (format 5), an EBCDIC textual header and one trace per (x, y) column.

required
model BlockModel

A regular or masked grid rotated by azimuth only. Inline i + 1 and crossline j + 1 go to trace bytes 189 and 193 and the cell-center CDP x and y to bytes 181 and 185. The cell height times 1000 is the sample interval and minus the top cell-center z the delay; both must be stored exactly.

required
column str

Numeric column to write, as float32, top cell first.

required
nodata float

Value written for nulls and absent cells of a masked model.

0.0

Raises:

Type Description
InvalidInput

For sub-blocked models, dip or rake rotations, missing or text columns, and cell heights or tops that SEG-Y cannot hold exactly.

used in