obspy.core.stream.Stream.interpolate

Stream.interpolate(*args, **kwargs)[source]

Interpolate all Traces in a Stream.

For details see the corresponding interpolate() method of Trace.

Note

The Stream object has three different methods to change the sampling rate of its data: resample(), decimate(), and interpolate()

Make sure to choose the most appropriate one for the problem at hand.

Note

This operation is performed in place on the actual data arrays. The raw data will no longer be accessible afterwards. To keep your original data, use copy() to create a copy of your stream object.

>>> from obspy import read
>>> st = read()
>>> print(st)  
3 Trace(s) in Stream:
BW.RJOB..EHZ | 2009-08-24T00:20:03... - ... | 100.0 Hz, 3000 samples
BW.RJOB..EHN | 2009-08-24T00:20:03... - ... | 100.0 Hz, 3000 samples
BW.RJOB..EHE | 2009-08-24T00:20:03... - ... | 100.0 Hz, 3000 samples
>>> st.interpolate(sampling_rate=111.1)  
<obspy.core.stream.Stream object at 0x...>
>>> print(st)  
3 Trace(s) in Stream:
BW.RJOB..EHZ | 2009-08-24T00:20:03... - ... | 111.1 Hz, 3332 samples
BW.RJOB..EHN | 2009-08-24T00:20:03... - ... | 111.1 Hz, 3332 samples
BW.RJOB..EHE | 2009-08-24T00:20:03... - ... | 111.1 Hz, 3332 samples