equinor / segyio

Fast Python library for SEGY files.
Other
476 stars 214 forks source link

Cannot open segy created in segyio in commercial softwares #467

Closed MichelleKuroda closed 3 years ago

MichelleKuroda commented 4 years ago

Hi!

I would like to know if somebody can help me...

I opened a segy file using segyio, I did a classification of the traces (joining other segy files), and I wrote a new segy if the same length and number of traces. but I cannot open it outside segyio in other programs.

To load the inlines I used the following code:

with segyio.open(nsegy1) as segy1: segy1.mmap() I1 = np.asarray([np.copy(x) for x in segy1.iline[:]])

After the classification, I used the following code to write the new segy:

copyfile(input_file, output_file) with segyio.open(output_file, "r+") as src: for i,j in enumerate(src.ilines): src.iline[j] = Cube[[i][:][:]].astype('float32')

I checked the dimensions of src.iline and my output (Cube), and they are the same. This file opens through the code: with segyio.open(filename) as f: inline_number = f.ilines[100] inline_slice = f.iline[inline_number] plt.imshow(inline_slice.T) plt.show()

But when I load it into commercial softwares it doenst opened. The EBCDIC Header Preview looks ok, but it doesnt load, because of a problem that the software suggests being of the Trace Header byte settings. In OpendTect it loaded, but with zeros.

I tested if the file is structured and it is.

Please, how can I fixed it? What's going on?

Best regards, Michelle

jokva commented 4 years ago

Hi,

Does the original file open well? You don't touch any metadata, at least not in the code you posted, so segyio will not write to any headers.