joferkington / scipy2014-3d_seismic

Data and ipython notebook for my talk at Scipy2014.
52 stars 33 forks source link

Loading horizon #1

Open timaou01 opened 9 years ago

timaou01 commented 9 years ago

Dear Joe Kington,

Thank you very much for sharing your code, experience and knowledge. Your code and presentation are really helpful,useful and interesting for me. I have successfully loaded and viewed the 3D volume, however, when I try to load horizon, I get the the following error: I will be very grateful to you for any assistance or hint.

Mohammed


EOFError Traceback (most recent call last)

in () 4 import scipy.ndimage 5 ----> 6 hor = geoprobe.horizon('C:\Users\Desktop\Python\scipy2014-3d_seismic-master\scipy2014-3d_seismic-master\data\Horizons\channels_smoothed.hzn') 7 vol = geoprobe.volume('C:\Users\Desktop\Python\scipy2014-3d_seismic-master\scipy2014-3d_seismic-master\data\Volumes\example.vol') 8 data = vol.load() C:\Users\AppData\Local\Enthought\Canopy32\User\lib\site-packages\geoprobe-0.3-py2.7.egg\geoprobe\horizon.pyc in **init**(self, _args, *_kwargs) 77 # and make a horizon object by reading from disk 78 if (len(args) == 1) and isinstance(args[0], basestring): ---> 79 self._readHorizon(args[0]) 80 81 # Otherwise, pass the args on to _make_horizon_from_data for C:\Users\AppData\Local\Enthought\Canopy32\User\lib\site-packages\geoprobe-0.3-py2.7.egg\geoprobe\horizon.pyc in _readHorizon(self, filename) 106 ' horizon') 107 --> 108 self.data = self._file.readAll() 109 110 # Surface and line attributes C:\Users\AppData\Local\Enthought\Canopy32\User\lib\site-packages\geoprobe-0.3-py2.7.egg\geoprobe\horizon.pyc in readAll(self) 451 # Read lines section 452 line_info = [None] --> 453 self.numlines = self.readSectionHeader() 454 for i in xrange(self.numlines): 455 line_info.append(self.readLineHeader()) C:\Users\AppData\Local\Enthought\Canopy32\User\lib\site-packages\geoprobe-0.3-py2.7.egg\geoprobe\horizon.pyc in readSectionHeader(self) 423 424 def readSectionHeader(self): --> 425 return self.readBinary(self._sectionHdrFmt) 426 427 def readLineHeader(self): C:\Users\AppData\Local\Enthought\Canopy32\User\lib\site-packages\geoprobe-0.3-py2.7.egg\geoprobe\common.pyc in readBinary(self, fmt) 65 # Reading beyond the end of the file just returns '' 66 if len(data) != size: ---> 67 raise EOFError('End of file reached') 68 data = struct.unpack(fmt, data) 69 EOFError: End of file reached
joferkington commented 9 years ago

Judging from the error being raised, it looks like the horizon file isn't the size it should be.

Is it possible that the downloaded horizon was corrupted or truncated in some way? The file size for that horizon should be 1757.238 Kb.

You might try redownloading that particular file or re-cloning the repository.

If that doesn't fix it, I'm at a bit of a loss... It could be a 32-bit vs 64-bit issue (It looks like you might be running a 32-bit version of python?), but I don't understand why that would cause this particular problem. I haven't tested it with recent versions of the libraries involved, but python-geoprobe should work just fine on a 32-bit install.

timaou01 commented 9 years ago

Thank you very much for your prompt answer. The size of the file I am using is 1,731 kb (as it is in the repository, I've downloaded it again). So, it might be the 32bit vs 64bit. In fact, I am using 32bit but please be informed that the volume loading was successful and it can be displayed very normally. Is it possible to generate another horizon from that volume using geo-probe? If not, how can I convert segy(for the data) and txt(for horizons) formats to readable formats by geoprobe(.hzn, .vol).

Your assistance and kindness is highly appreciated.

timaou01 commented 9 years ago

Dear Mr. Kington, I would just like to ask how can one load a segy-formatted data into geoprobe. Or how to to convert segy to a readable format by geoprobe.

Thank you in advance for your kind assistance. It is highly appreciated.

Mohammed.

Andersongeofisco commented 5 years ago

I would like to know too. How do I convert segy to .vol Format? Do you know @timaou01