obspy.core.stream.Stream.copy

Stream.copy()[source]

Return a deepcopy of the Stream object.

Return type:

Stream

Returns:

Copy of current stream.

Examples

  1. Create a Stream and copy it

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

    The two objects are not the same:

    >>> st is st2
    False
    

    But they have equal data (before applying further processing):

    >>> st == st2
    True
    
  2. The following example shows how to make an alias but not copy the data. Any changes on st3 would also change the contents of st.

    >>> st3 = st
    >>> st is st3
    True
    >>> st == st3
    True