Skip to content

Commit

Permalink
Merge pull request #372 from harrymchugh/add_resample_example
Browse files Browse the repository at this point in the history
Added example for a trace resample in doc string
  • Loading branch information
jokva authored May 10, 2019
2 parents 8b31cb9 + 84db637 commit a839c71
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions python/segyio/trace.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,11 @@ class Trace(Sequence):
>>> tr = tr - 100
>>> avg = numpy.average(tr)
Perform some seismic processing on a trace. E.g resample from 2ms spacing
to 4ms spacing (note there is no anti-alias filtering in this example):
>>> tr = scipy.signal.resample(tr, len(tr)/2)
Double every trace value and write to disk. Since accessing a trace
gives a numpy value, to write to the respective trace we need its index:
Expand Down

0 comments on commit a839c71

Please sign in to comment.