Skip to content

Commit 9b83b4a

Browse files
authored
Merge pull request #281 from TGSAI/bug/little_endian_ingest
Pin header scan for SEG-Y to big endian due to `segyio` limitation
2 parents 2db4c1e + 7d90679 commit 9b83b4a

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/mdio/segy/_workers.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,9 @@ def header_scan_worker(
7979
# First we create a struct to unpack the 240-byte trace headers.
8080
# The struct only knows about dimension keys, and their byte offsets.
8181
# Pads the rest of the data with voids.
82-
endian = ByteOrder[segy_endian.upper()]
82+
# NOTE: segyio buffer is always big endian. This is why we force it here.
83+
# This used to be the same as `segy_endian` but we hard code it to big.
84+
endian = ByteOrder.BIG
8385

8486
# Handle byte offsets
8587
offsets = [0 if byte_loc is None else byte_loc - 1 for byte_loc in byte_locs]

0 commit comments

Comments
 (0)