equinor / segyio

Fast Python library for SEGY files.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

More speed =)

grisha-lu opened this issue · comments

Hey!
Is it possible to increase the speed of the following when:

with segyio.open(files, mode='r', ignore_geometry=True) as sgy:
         RP = sgy.attributes(147)[:]

I have about 2 million traces and this procedure takes a very long time.
And one more question.
Is it also possible to increase the performance of this code:

with segyio.open(files, mode='r+', ignore_geometry=True, strict = False) as sgy:
         for x in sgy.header[:]:
             x.update({69: 10, 71: 10 })

Thanks!

Hi,

attributes is designed to be the faster faster option in this case, compared to header.
Your second example looks ok too. How slow are we talking here? Do you have any measurement for the two scripts?

with segyio.open(files, mode='r', ignore_geometry=True) as sgy:
          RP = sgy.attributes(147)[:]

2163064 trace
348 seconds
Thanks!
Error in another.
Data on the server, but launched from a PC.
It's stupid not to think about it.