Skip to content

Commit

Permalink
use new endian inference from segy
Browse files Browse the repository at this point in the history
  • Loading branch information
tasansal committed Jun 24, 2024
1 parent 5a2e92f commit 9d49bc8
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/mdio/converters/segy.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,12 +366,8 @@ def segy_to_mdio( # noqa: C901
disk_cache=False, # Making sure disk caching is disabled
)

# Infer endianness from spec by opening without spec.
inferred_spec = SegyFile(url=segy_path).spec

# Build hard coded MDIO spec, with the inferred endianness and open file
# Open SEG-Y with MDIO's SegySpec. Endianness will be inferred.
mdio_spec = mdio_segyio_spec.model_copy(deep=True)
mdio_spec.endianness = inferred_spec.endianness
segy = SegyFile(url=segy_path, spec=mdio_spec)

text_header = segy.text_header
Expand Down

0 comments on commit 9d49bc8

Please sign in to comment.