obspy.core.stream.Stream.__add__

Stream.__add__(other)[source]

Add two streams or a stream with a single trace.

Parameters

other (Stream or Trace) – Stream or Trace object to add.

Return type

Stream

Returns

New Stream object containing references to the traces of the original streams

Examples

  1. Adding two Streams

    >>> st1 = Stream([Trace(), Trace(), Trace()])
    >>> len(st1)
    3
    >>> st2 = Stream([Trace(), Trace()])
    >>> len(st2)
    2
    >>> stream = st1 + st2
    >>> len(stream)
    5
    
  2. Adding Stream and Trace

    >>> stream2 = st1 + Trace()
    >>> len(stream2)
    4