obspy.core.event.Catalog.copy

Catalog.copy()

Returns a deepcopy of the Catalog object.

Return type:Catalog
Returns:Copy of current catalog.

Examples

  1. 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
    
  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.

    >>> cat3 = cat
    >>> cat is cat3
    True
    >>> cat == cat3
    True