obspy.core.event.magnitude.StationMagnitudeContribution
- class StationMagnitudeContribution(*args, **kwargs)[source]
Bases:
AbstractEventType
This class describes the weighting of magnitude values from several StationMagnitude objects for computing a network magnitude estimation.
- Parameters:
station_magnitude_id (
ResourceIdentifier
) – Refers to the resource_id of a StationMagnitude object.residual (float, optional) – Residual of magnitude computation.
weight (float, optional) – Weight of the magnitude value from class StationMagnitude for computing the magnitude value in class Magnitude. Note that there is no rule for the sum of the weights of all station magnitude contributions to a specific network magnitude. In particular, the weights are not required to sum up to unity.
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.
- StationMagnitudeContribution._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.
- StationMagnitudeContribution._pretty_str(priorized_keys=[], min_label_length=16)
Return better readable string representation of AttribDict object.
- Parameters:
- Returns:
String representation of current AttribDict object.
- StationMagnitudeContribution._repr_pretty_(p, cycle)
Special Methods
- StationMagnitudeContribution.__bool__()
- StationMagnitudeContribution.__contains__(key)
- StationMagnitudeContribution.__delattr__(name)
- StationMagnitudeContribution.__delitem__(name)
- StationMagnitudeContribution.__dir__()
Default dir() implementation.
- StationMagnitudeContribution.__eq__(other)
Two instances are considered equal if all attributes and all lists are identical.
- StationMagnitudeContribution.__format__(format_spec, /)
Default object formatter.
- StationMagnitudeContribution.__ge__(value, /)
Return self>=value.
- StationMagnitudeContribution.__getattr__(name, default=None)
Py3k hasattr() expects an AttributeError no KeyError to be raised if the attribute is not found.
- StationMagnitudeContribution.__getattribute__(name, /)
Return getattr(self, name).
- StationMagnitudeContribution.__getitem__(name, default=None)
- StationMagnitudeContribution.__gt__(value, /)
Return self>value.
- StationMagnitudeContribution.__init__(*args, **kwargs)
- StationMagnitudeContribution.__init_subclass__()
This method is called when a class is subclassed.
The default implementation does nothing. It may be overridden to extend subclasses.
- StationMagnitudeContribution.__iter__()
- StationMagnitudeContribution.__le__(value, /)
Return self<=value.
- StationMagnitudeContribution.__len__()
- StationMagnitudeContribution.__lt__(value, /)
Return self<value.
- StationMagnitudeContribution.__ne__(other)
- StationMagnitudeContribution.__new__(**kwargs)
- StationMagnitudeContribution.__nonzero__()
- StationMagnitudeContribution.__reduce__()
Helper for pickle.
- StationMagnitudeContribution.__reduce_ex__(protocol, /)
Helper for pickle.
- StationMagnitudeContribution.__repr__()
- StationMagnitudeContribution.__setattr__(name, value)
Custom property implementation that works if the class is inheriting from AttribDict.
- StationMagnitudeContribution.__setitem__(key, value)
- StationMagnitudeContribution.__sizeof__()
Size of object in memory, in bytes.
- StationMagnitudeContribution.__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 StationMagnitudeContribution.__subclasshook__(C)