Closed ghost closed 3 years ago
When you use segyio range features, the library rewrites some loops to faster versions that do less work in python, and more work in C, which is why more work can sometimes be faster than less work.
There fastest way to read 10 header from each header would probably be:
for h in f.header[:]:
words.append(h[word1, word2, ...])
I would like to read a few (about 10) trace headers offsets of all traces in a sgy file into a pandas dataframe. In my attempts this step always takes longer than reading all the trace data using segyio.collect(f.trace), which is unexpected for me. What is the or is there a known fastest way to do this using segyio?