Closed ke0m closed 4 years ago
Try segyio.su.open
:-----)
https://segyio.readthedocs.io/en/latest/segyio.html#segyio.su.open
Thank you @jokva for the quick reply. Unfortunately, now trying:
with segyio.su.open('plane.su',ignore_geometry=True) as f:
data = f.trace.raw[:]
generates the same error.
Are the SU files in little-endian, maybe? Try passing endian = 'little' to open.
That did it. Finally, what worked was
with segyio.su.open('plane.su',ignore_geometry=True,endian='little') as f:
data = f.trace.raw[:]
One odd thing is that if I convert the SU file to SEGY using (segywrite), it only works if I read the SEGY as big endian. It seems that as part of the conversion from SU to SEGY, it swaps the bytes.
Thanks very much for the help @jokva!
Splendid, glad it worked out!
I am having difficulty reading in Seismic Unix (SU) files. I seem to always get the error:
when reading in a SU file. It can easily be reproduced with the following two examples:
1. Reading in a simple SU file
Using CWP/SU Release 44R14 20 July 2019, I first generate the simplest SU dataset:
Then, I attempt to read in the file using segyio:
Which results in the trace count error. I have tried this by creating the SU file with both big- and little-endian formats (XDR vs native) and also have changed the endian argument in the open function (as suggested in other issues) but I always get the same error.
Note that when I convert this file to SEGY as follows:
and then attempt to read in the SEGY file with segyio:
I am able to successfully read in the traces.
2. Reading in the 3X_75_PR.SGY dataset
I have also verified this on the dataset 3X_75_PR.SGY in the segyio-notebooks repository:
And again, using segyio:
I get the trace count error.
Any help/advice on this issue would be greatly appreciated.