equinor / segyio

Fast Python library for SEGY files.
Other
468 stars 213 forks source link

RuntimeError: unable to find sorting.Check iline, (189) and xline (193) in case #571

Open huihuihenqiang opened 3 months ago

huihuihenqiang commented 3 months ago

hello sir.when i run quick start with my sgy data.It occurs: Traceback (most recent call last): File "D:\桌面\地震数据\Petrel Demo(第一次数据)\Petrel Demo\pythonProject\mai n.py", line 3, in with segyio.open('data/seismic.sgy') as f: File "D:\anaconda\envs\Seismic\lib\site-packages\segyio\open.py", line 192, in open return infer_geometry(f, metrics, iline, xline, strict) File "D:\anaconda\envs\Seismic\lib\site-packages\segyio\open.py", line 7, in i nfer_geometry cube_metrics = f.xfd.cube_metrics(iline, xline) RuntimeError: unable to find sorting.Check iline, (189) and xline (193) in case you are sure the file is a 3D sorted volume but i think my data is true sgy. 屏幕截图 2024-03-16 113616

ajaust commented 3 months ago

Are you sure that your SEG-Y cube has a regular geometry and correct headers? There is an issue https://github.com/equinor/segyio/issues/517 with people reporting the same error message and some guidance on how to check the cube as well as how to proceed. The issue also hints how one could how to inspect the SEG-Y header using segyio.

huihuihenqiang commented 3 months ago

Thank you very much for your answer, and at the same time, thank you for contributing such a great open source file. I think my problem may be due to my segy file being truncated and not being a complete file.

sveinung-r commented 3 months ago

You can try opening with segyio.open("...", ignore_geometry=True). This will make segyio load the file without inferring geometry from the inline/crossline headers. Some operations such as extracting an inline/crossline will be disabled in this mode, but you can still access traces and trace headers.