equinor / segyio

Fast Python library for SEGY files.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Issue with Reading Little Endian Byte Order SEGY Files

Xiaoandrd opened this issue · comments

Hello ,

I have encountered an issue when trying to read SEGY files with a Little Endian (PC) byte order using segyio. While files with a SUN (Big Endian) byte order are read without any problems, those in PC (Little Endian) byte order seem to be unreadable and result in errors.

Here's a brief description of my situation:

  • The SEGY files that I'm able to open with other software (like seesei and VISTA) are causing issues in segyio.
  • The issue arises specifically with files in Little Endian byte order; Big Endian files are processed correctly.
  • segyio throws a "trace count inconsistent with file size, trace lengths possibly of non-uniform" error when I try to open these PC byte order files, even though these files are confirmed to be valid and consistent by other software.

Could you please provide some guidance on whether segyio supports Little Endian byte order SEGY files? If so, are there any known issues or limitations regarding this that I should be aware of? And is there a recommended approach to handle such files with segyio?

For reference, here is an example of the error I'm receiving:

Traceback (most recent call last):
File "C:\Users\13367\PycharmProjects\pythonProject3\TEST.py", line 6, in
with segyio.open(filename, mode="r+", ignore_geometry=True) as segyfile:
File "C:\Users\13367\anaconda3\envs\deeplearning\lib\site-packages\segyio\open.py", line 163, in open
fd.segyopen()
RuntimeError: trace count inconsistent with file size, trace lengths possibly of non-uniform

Hi!

Segyio supports little endian. Try opening the files with endian='little'. Hope this works for you.