obspy.core.event.event.Event
- class Event(*args, **kwargs)[source]
Bases:
AbstractEventTypeWithResourceID
The class Event describes a seismic event which does not necessarily need to be a tectonic earthquake. An event is usually associated with one or more origins, which contain information about focal time and geographical location of the event. Multiple origins can cover automatic and manual locations, a set of location from different agencies, locations generated with different location programs and earth models, etc. Furthermore, an event is usually associated with one or more magnitudes, and with one or more focal mechanism determinations.
- Parameters:
resource_id (
ResourceIdentifier
) – Resource identifier of Event.force_resource_id (bool, optional) – If set to False, the automatic initialization of resource_id attribute in case it is not specified will be skipped.
event_type (str, optional) – Describes the type of an event. See
EventType
for allowed values.event_type_certainty (str, optional) – Denotes how certain the information on event type is. See
EventTypeCertainty
for allowed values.creation_info (
CreationInfo
, optional) – Creation information used to describe author, version, and creation time.event_descriptions (list of
EventDescription
) – Additional event description, like earthquake name, Flinn-Engdahl region, etc.comments (list of
Comment
, optional) – Additional comments.picks (list of
Pick
) – Picks associated with the event.amplitudes (list of
Amplitude
) – Amplitudes associated with the event.focal_mechanisms (list of
FocalMechanism
) – Focal mechanisms associated with the eventorigins (list of
Origin
) – Origins associated with the event.magnitudes (list of
Magnitude
) – Magnitudes associated with the event.station_magnitudes (list of
StationMagnitude
) – Station magnitudes associated with the event.
Note
For handling additional information not covered by the QuakeML standard and how to output it to QuakeML see the ObsPy Tutorial.
Attributes
Public Methods
Clear the class :return: |
|
Plot event location and/or the preferred focal mechanism and radiation pattern. |
|
If key is not found, d is returned if given, otherwise KeyError is raised. |
|
as a 2-tuple; but raise KeyError if D is empty. |
|
Returns the preferred focal mechanism |
|
Returns the preferred magnitude |
|
Returns the preferred origin |
|
Ensure all resource_ids in event instance are event-scoped. |
|
Returns a short string representation of the current Event. |
|
Saves event information into a file. |
Private Methods
Warning
Private methods are mainly for internal/developer use and their API might change without notice.
- Event._cast_type(key, value)
Cast type of value to type required in _types dict.
- Parameters:
key (str) – The key from __setattr__.
value – The value being set to key.
- Returns:
value cast to correct type.
- Event._pretty_str(priorized_keys=[], min_label_length=16)
Return better readable string representation of AttribDict object.
- Parameters:
- Returns:
String representation of current AttribDict object.
Special Methods
- Event.__bool__()
- Event.__contains__(key)
- Event.__deepcopy__(memodict=None)[source]
reset resource_id’s object_id after deep copy to allow the object specific behavior of get_referred_object
- Event.__delattr__(name)
- Event.__delitem__(name)
- Event.__dir__()
Default dir() implementation.
- Event.__eq__(other)
Two instances are considered equal if all attributes and all lists are identical.
- Event.__format__(format_spec, /)
Default object formatter.
- Event.__ge__(value, /)
Return self>=value.
- Event.__getattr__(name, default=None)
Py3k hasattr() expects an AttributeError no KeyError to be raised if the attribute is not found.
- Event.__getattribute__(name, /)
Return getattr(self, name).
- Event.__getitem__(name, default=None)
- Event.__gt__(value, /)
Return self>value.
- Event.__init_subclass__()
This method is called when a class is subclassed.
The default implementation does nothing. It may be overridden to extend subclasses.
- Event.__iter__()
- Event.__le__(value, /)
Return self<=value.
- Event.__len__()
- Event.__lt__(value, /)
Return self<value.
- Event.__ne__(other)
- Event.__new__(**kwargs)
- Event.__nonzero__()
- Event.__reduce__()
Helper for pickle.
- Event.__reduce_ex__(protocol, /)
Helper for pickle.
- Event.__setattr__(name, value)
Custom property implementation that works if the class is inheriting from AttribDict.
- Event.__setitem__(key, value)
- Event.__sizeof__()
Size of object in memory, in bytes.
- classmethod Event.__subclasshook__(C)