Closed yshigei closed 1 year ago
Please provide the full error message?
Read data along first xline
data = segyfile.xline[segyfile.xlines[1]]
Read data along last iline
data = segyfile.iline[segyfile.ilines[-1]]
Read data along 100th time slice
data = segyfile.depth_slice[100]
Read data cube
data = segyio.tools.cube(filename)
Read data along last iline
data = segyfile.iline[segyfile.ilines[-1]]
OSError Traceback (most recent call last)
Your file handle has been closed before you reach segyfile.xline[segyfile.xlines[1]]
in your code. Do you perhaps use python's with
-statement with segyio.open
and then left the inner scope?
Thank you very much @ErlendHaa. After fixed my indent as your instruction, it successfully run.
Hello,
I am trying to import .sgy file extracted from Petrel (P-Impedance cube/Post Stack). segyio.open() successfully worked, but cannot read through inline/xline (segyfile.iline/xline/depth_slice... did not work).
How could I fix this issue??
It would be appreciated if you could help my problem.
Best Regards, yshig