Cuts current trace to given start and end time.
Parameters: |
|
---|
Note
This operation is performed in place on the actual data arrays. The raw data is not accessible anymore afterwards. To keep your original data, use copy() to create a copy of your trace object.
Example
>>> tr = Trace(data=np.arange(0, 10))
>>> tr.stats.delta = 1.0
>>> t = tr.stats.starttime
>>> tr.trim(t + 2.000001, t + 7.999999)
>>> tr.data
array([2, 3, 4, 5, 6, 7, 8])