obspy.core.stream.Stream.__eq__

Stream.__eq__(other)[source]

Implements rich comparison of Stream objects for “==” operator.

Trace order does not effect the comparison because the traces are sorted beforehand.

This function strictly compares the data and stats objects of each trace contained by the streams. If less strict behavior is desired, which may be the case for testing, consider using the stream_almost_equal() function.

Parameters:other (Stream) Stream object for comparison.
Return type:bool
Returns:True if both Streams contain the same traces, i.e. after a sort operation going through both streams every trace should be equal according to Trace’s __eq__() operator.

Example

>>> from obspy import read
>>> st = read()
>>> st2 = st.copy()
>>> st is st2
False
>>> st == st2
True