equinor / segyio

Fast Python library for SEGY files.
Other
490 stars 218 forks source link

Issue with Reading Little Endian Byte Order SEGY Files #572

Closed Xiaoandrd closed 6 months ago

Xiaoandrd commented 7 months ago

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:

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

sveinung-r commented 7 months ago

Hi!

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