obspy.imaging.beachball.MomentTensor
- class MomentTensor(*args)[source]
Bases:
object
A moment tensor.
>>> a = MomentTensor(1, 1, 0, 0, 0, -1, 26) >>> b = MomentTensor(np.array([1, 1, 0, 0, 0, -1]), 26) >>> c = MomentTensor(np.array([[1, 0, 0], [0, 1, -1], [0, -1, 0]]), 26) >>> a.mt array([[ 1, 0, 0], [ 0, 1, -1], [ 0, -1, 0]]) >>> b.yz -1 >>> a.expo 26
Attributes
Special Methods
- MomentTensor.__delattr__(name, /)
Implement delattr(self, name).
- MomentTensor.__dir__()
Default dir() implementation.
- MomentTensor.__eq__(value, /)
Return self==value.
- MomentTensor.__format__(format_spec, /)
Default object formatter.
- MomentTensor.__ge__(value, /)
Return self>=value.
- MomentTensor.__getattribute__(name, /)
Return getattr(self, name).
- MomentTensor.__gt__(value, /)
Return self>value.
- MomentTensor.__hash__()
Return hash(self).
- MomentTensor.__init_subclass__()
This method is called when a class is subclassed.
The default implementation does nothing. It may be overridden to extend subclasses.
- MomentTensor.__le__(value, /)
Return self<=value.
- MomentTensor.__lt__(value, /)
Return self<value.
- MomentTensor.__ne__(value, /)
Return self!=value.
- MomentTensor.__new__(**kwargs)
- MomentTensor.__reduce__()
Helper for pickle.
- MomentTensor.__reduce_ex__(protocol, /)
Helper for pickle.
- MomentTensor.__repr__()
Return repr(self).
- MomentTensor.__setattr__(name, value, /)
Implement setattr(self, name, value).
- MomentTensor.__sizeof__()
Size of object in memory, in bytes.
- MomentTensor.__str__()
Return str(self).
- MomentTensor.__subclasshook__()
Abstract classes can override this to customize issubclass().
This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).