obspy.core.event.event.EventDescription
- class EventDescription(*args, **kwargs)[source]
Bases:
obspy.core.event.base._event_type_class_factory.<locals>.AbstractEventType
Free-form string with additional event description. This can be a well-known name, like 1906 San Francisco Earthquake. A number of categories can be given in type.
- Parameters
text (str, optional) – Free-form text with earthquake description.
type (str, optional) – Category of earthquake description. See
EventDescriptionType
for allowed values.
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: |
|
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. |
|
Private Methods
Warning
Private methods are mainly for internal/developer use and their API might change without notice.
- EventDescription._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.
- EventDescription._pretty_str(priorized_keys=[], min_label_length=16)
Return better readable string representation of AttribDict object.
- Parameters
- Returns
String representation of current AttribDict object.
- EventDescription._repr_pretty_(p, cycle)
Special Methods
- EventDescription.__bool__()
- EventDescription.__contains__(key)
- EventDescription.__delattr__(name)
- EventDescription.__delitem__(name)
- EventDescription.__dir__()
Default dir() implementation.
- EventDescription.__eq__(other)
Two instances are considered equal if all attributes and all lists are identical.
- EventDescription.__format__(format_spec, /)
Default object formatter.
- EventDescription.__ge__(value, /)
Return self>=value.
- EventDescription.__getattr__(name, default=None)
Py3k hasattr() expects an AttributeError no KeyError to be raised if the attribute is not found.
- EventDescription.__getattribute__(name, /)
Return getattr(self, name).
- EventDescription.__getitem__(name, default=None)
- EventDescription.__gt__(value, /)
Return self>value.
- EventDescription.__init__(*args, **kwargs)
- EventDescription.__init_subclass__()
This method is called when a class is subclassed.
The default implementation does nothing. It may be overridden to extend subclasses.
- EventDescription.__iter__()
- EventDescription.__le__(value, /)
Return self<=value.
- EventDescription.__len__()
- EventDescription.__lt__(value, /)
Return self<value.
- EventDescription.__ne__(other)
- EventDescription.__new__(**kwargs)
- EventDescription.__nonzero__()
- EventDescription.__reduce__()
Helper for pickle.
- EventDescription.__reduce_ex__(protocol, /)
Helper for pickle.
- EventDescription.__repr__()
- EventDescription.__setattr__(name, value)
Custom property implementation that works if the class is inheriting from AttribDict.
- EventDescription.__setitem__(key, value)
- EventDescription.__sizeof__()
Size of object in memory, in bytes.
- EventDescription.__str__(force_one_line=False)
Fairly extensive in an attempt to cover several use cases. It is always possible to change it in the child class.
- classmethod EventDescription.__subclasshook__(C)