obspy.core.stream.Stream¶
-
class
Stream
(traces=None)[source]¶ Bases:
object
List like object of multiple ObsPy Trace objects.
Basic Usage
>>> trace1 = Trace() >>> trace2 = Trace() >>> stream = Stream(traces=[trace1, trace2]) >>> print(stream) # doctest: +ELLIPSIS 2 Trace(s) in Stream: ...
Supported Operations
stream = streamA + streamB
Merges all traces within the two Stream objects
streamA
andstreamB
into the new Stream objectstream
. See also:Stream.__add__()
.stream += streamA
Extends the Stream object
stream
with all traces fromstreamA
. See also:Stream.__iadd__()
.len(stream)
Returns the number of Traces in the Stream object
stream
. See also:Stream.__len__()
.str(stream)
Contains the number of traces in the Stream object and returns the value of each Trace’s __str__ method. See also:
Stream.__str__()
.
Attributes
__dict__
__doc__
__hash__
__module__
__weakref__
list of weak references to the object (if defined)
Public Methods
Append a single Trace object to the current Stream object.
Search for and attach channel response to each trace as trace.stats.response.
Clear trace list (convenience method).
Return a deepcopy of the Stream object.
Return the number of Traces in the Stream object.
Cut the given time range out of all traces of this Stream object.
Downsample data in all traces of stream by an integer factor.
Remove a trend from all traces.
Differentiate all traces with respect to time.
Extend the current Stream object with a list of Trace objects.
Filter the data of all traces in the Stream.
Determine all trace gaps/overlaps of the Stream object.
Insert either a single Trace or a list of Traces before index.
Integrate all traces with respect to time.
Interpolate all Traces in a Stream.
Get the values of the absolute maximum amplitudes of all traces in the stream.
Merge ObsPy Trace objects with same IDs.
Normalize all Traces in the Stream.
Create a waveform plot of the current ObsPy Stream object.
Remove and return the Trace object specified by index from the Stream.
Print gap/overlap list summary information of the Stream object.
Remove the first occurrence of the specified Trace object in the Stream object.
Deconvolve instrument response for all Traces in Stream.
Remove instrument sensitivity for all Traces in Stream.
Resample data in all traces of stream using Fourier method.
Reverse the Traces of the Stream object in place.
Rotate stream objects.
Return new Stream object only with these traces that match the given stats criteria (e.g.
Correct for instrument response / Simulate new instrument response.
Return new Stream object cut to the given start and end time.
Generator yielding equal length sliding windows of the Stream.
Sort the traces in the Stream object.
Create a spectrogram plot for each trace in the stream.
Split any trace containing gaps into contiguous unmasked traces.
Calculate standard deviations of all Traces in the Stream.
Taper all Traces in Stream.
Run a triggering algorithm on all traces in the stream.
Cut all traces of this Stream object to given start and end time.
Verify all traces of current Stream against available meta data.
Save stream into a file.
Private Methods
Warning
Private methods are mainly for internal/developer use and their API might change without notice.
Merge consistent trace objects but leave everything else alone.
Helper method to create a dummy Stream object (with data always equal to one) from a string representation of the Stream, mostly for debugging purposes.
Returns a dictionary with information on common channels.
Cut all traces of this Stream object to given start time.
Sanity checks for merging.
Rotate three explicitly specified channels to ZNE.
Rotate all matching traces to ZNE, specifying sets of component codes.
Cut all traces of this Stream object to given end time.
Trim all channels that have the same ID down to the component character to the earliest common start time and latest common end time.
Special Methods
Add two streams or a stream with a single trace.
Passes on the __delitem__ method to the underlying list of traces.
Default dir() implementation.
Implements rich comparison of Stream objects for “==” operator.
Default object formatter.
Too ambiguous, throw an Error.
__getitem__ method of obspy.Stream objects.
__getslice__ method of obspy.Stream objects.
Too ambiguous, throw an Error.
Add two streams with self += other.
Initialize self.
This method is called when a class is subclassed.
Return a robust iterator for stream.traces.
Too ambiguous, throw an Error.
Return the number of Traces in the Stream object.
Too ambiguous, throw an Error.
Create a new Stream containing num copies of this stream.
Implements rich comparison of Stream objects for “!=” operator.
Create and return a new object.
A Stream is considered zero if has no Traces.
Helper for pickle.
Helper for pickle.
__setitem__ method of obspy.Stream objects.
Size of object in memory, in bytes.
Return short summary string of the current stream.
Abstract classes can override this to customize issubclass().