obspy.core.inventory.channel.Channel.copy
- Channel.copy()
Returns a deepcopy of the object.
- Return type:
same class as original object
- Returns:
Copy of current object.
Examples
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
The following example shows how to make an alias but not copy the data. Any changes on
st3
would also change the contents ofst
.>>> sta3 = sta >>> sta is sta3 True >>> sta == sta3 True