Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot read segy file #1

Open
ring0o0o opened this issue Sep 29, 2017 · 2 comments
Open

cannot read segy file #1

ring0o0o opened this issue Sep 29, 2017 · 2 comments

Comments

@ring0o0o
Copy link

ring0o0o commented Sep 29, 2017

I was trying to use the testsegy.py to read segy file.But got an TypeError below.
read segy:
SegyPY 0.2 : readSegy : Trying to read GTZ_p14_p19.sgy
812417984
SegyPY 0.2 : getSegyHeader : succesfully read GTZ_p14_p19.sgy

TypeError Traceback (most recent call last)
F:\convLstm\fft.py in ()
8 start = time.time()
9 print(' read segy: ')
---> 10 Data, SH, STH = segypy.readSegy('GTZ_p14_p19.sgy')
11 print(time.time()-start)
12 start = time.time()

F:\convLstm\segypy.py in readSegy(filename)
531
532 printverbose("readSegy : Trying to read "+filename,0)
--> 533
534 data = open(filename,'rb').read()
535

F:\convLstm\segypy.py in getAllSegyTraceHeaders(SH, data)
488 # AND THE TRACE NUMBER KEY FIELD
489 THpos=STH_def[THN]["pos"]
--> 490 THformat=STH_def[THN]["type"]
491 ntraces=SH["ntraces"]
492

F:\convLstm\segypy.py in getSegyTraceHeader(SH, THN, data)
461 for itrace in range(1,int(ntraces+1),1):
462 i=itrace
--> 463
464 pos=THpos+3600+(SH["ns"]bps+240)(itrace-1);
465

TypeError: 'float' object cannot be interpreted as an integer

@marscfeng
Copy link

You should choose a python2 env for segypy.

@cultpenguin
Copy link
Owner

Also. check out the new version 0.57.. It may have the 'float' error. Otherwise if you can share the sgy file, I can have a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants