Skip to content

Commit

Permalink
get header dtype from spec instead of reading a header
Browse files Browse the repository at this point in the history
  • Loading branch information
tasansal committed Jun 24, 2024
1 parent 9d49bc8 commit b209e4e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/mdio/segy/blocked_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@ def to_zarr(
**kwargs,
)

header_dtype = segy_file.header[0].dtype
# Get header dtype in native order (little-endian 99.9% of the time)
header_dtype = segy_file.spec.trace.header.dtype.newbyteorder("=")
header_array = metadata_root.create_dataset(
name="_".join([name, "trace_headers"]),
shape=grid.shape[:-1], # Same spatial shape as data
Expand Down

0 comments on commit b209e4e

Please sign in to comment.