obspy.core.event.catalog.Catalog.copy
- Catalog.copy()[source]
Returns a deepcopy of the Catalog object.
- Return type:
- Returns:
Copy of current catalog.
Examples
Create a Catalog and copy it
>>> from obspy.core.event import read_events >>> cat = read_events() >>> cat2 = cat.copy()
The two objects are not the same:
>>> cat is cat2 False
But they have equal data:
>>> cat == cat2 True
The following example shows how to make an alias but not copy the data. Any changes on
cat3
would also change the contents ofcat
.>>> cat3 = cat >>> cat is cat3 True >>> cat == cat3 True