obspy.core.inventory.station.Station.copy

Station.copy()

Returns a deepcopy of the object.

Return type

same class as original object

Returns

Copy of current object.

Examples

  1. Create a station object and copy it

    >>> from obspy import read_inventory
    >>> sta = read_inventory()[0][0]
    >>> sta2 = sta.copy()
    

    The two objects are not the same:

    >>> sta is sta2
    False
    

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

    >>> sta == sta2
    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.

    >>> sta3 = sta
    >>> sta is sta3
    True
    >>> sta == sta3
    True