obspy.core.util.obspy_types.FloatWithUncertaintiesFixedUnit
- class FloatWithUncertaintiesFixedUnit(value, **kwargs)[source]
Bases:
FloatWithUncertainties
Float value that has lower and upper uncertainties and a fixed unit associated with it. Helper class to inherit from setting a custom value for the fixed unit (set unit in derived class as class attribute).
- Parameters:
Attributes
the imaginary part of a complex number |
|
the real part of a complex number |
|
Public Methods
Return integer ratio. |
|
Return self, the complex conjugate of any float. |
|
Create a floating-point number from a hexadecimal string. |
|
Return a hexadecimal representation of a floating-point number. |
|
Return True if the float is an integer. |
Special Methods
- FloatWithUncertaintiesFixedUnit.__abs__()
abs(self)
- FloatWithUncertaintiesFixedUnit.__add__(value, /)
Return self+value.
- FloatWithUncertaintiesFixedUnit.__bool__()
True if self else False
- FloatWithUncertaintiesFixedUnit.__ceil__()
Return the ceiling as an Integral.
- FloatWithUncertaintiesFixedUnit.__delattr__(name, /)
Implement delattr(self, name).
- FloatWithUncertaintiesFixedUnit.__dir__()
Default dir() implementation.
- FloatWithUncertaintiesFixedUnit.__divmod__(value, /)
Return divmod(self, value).
- FloatWithUncertaintiesFixedUnit.__eq__(value, /)
Return self==value.
- FloatWithUncertaintiesFixedUnit.__float__()
float(self)
- FloatWithUncertaintiesFixedUnit.__floor__()
Return the floor as an Integral.
- FloatWithUncertaintiesFixedUnit.__floordiv__(value, /)
Return self//value.
- FloatWithUncertaintiesFixedUnit.__format__(format_spec, /)
Formats the float according to format_spec.
- FloatWithUncertaintiesFixedUnit.__ge__(value, /)
Return self>=value.
- FloatWithUncertaintiesFixedUnit.__getattribute__(name, /)
Return getattr(self, name).
- FloatWithUncertaintiesFixedUnit.__getformat__()
You probably don’t want to use this function.
- typestr
Must be ‘double’ or ‘float’.
It exists mainly to be used in Python’s test suite.
This function returns whichever of ‘unknown’, ‘IEEE, big-endian’ or ‘IEEE, little-endian’ best describes the format of floating point numbers used by the C type named by typestr.
- FloatWithUncertaintiesFixedUnit.__getnewargs__()
- FloatWithUncertaintiesFixedUnit.__gt__(value, /)
Return self>value.
- FloatWithUncertaintiesFixedUnit.__hash__()
Return hash(self).
- FloatWithUncertaintiesFixedUnit.__iadd__(other)
- FloatWithUncertaintiesFixedUnit.__imul__(other)
- FloatWithUncertaintiesFixedUnit.__init__(value, lower_uncertainty=None, upper_uncertainty=None, measurement_method=None)[source]
- FloatWithUncertaintiesFixedUnit.__init_subclass__()
This method is called when a class is subclassed.
The default implementation does nothing. It may be overridden to extend subclasses.
- FloatWithUncertaintiesFixedUnit.__int__()
int(self)
- FloatWithUncertaintiesFixedUnit.__le__(value, /)
Return self<=value.
- FloatWithUncertaintiesFixedUnit.__lt__(value, /)
Return self<value.
- FloatWithUncertaintiesFixedUnit.__mod__(value, /)
Return self%value.
- FloatWithUncertaintiesFixedUnit.__mul__(value, /)
Return self*value.
- FloatWithUncertaintiesFixedUnit.__ne__(value, /)
Return self!=value.
- FloatWithUncertaintiesFixedUnit.__neg__()
-self
- static FloatWithUncertaintiesFixedUnit.__new__(cls, value, **kwargs)
- FloatWithUncertaintiesFixedUnit.__pos__()
+self
- FloatWithUncertaintiesFixedUnit.__pow__(value, mod=None, /)
Return pow(self, value, mod).
- FloatWithUncertaintiesFixedUnit.__radd__(value, /)
Return value+self.
- FloatWithUncertaintiesFixedUnit.__rdivmod__(value, /)
Return divmod(value, self).
- FloatWithUncertaintiesFixedUnit.__reduce__()
Helper for pickle.
- FloatWithUncertaintiesFixedUnit.__reduce_ex__(protocol, /)
Helper for pickle.
- FloatWithUncertaintiesFixedUnit.__repr__()
Return repr(self).
- FloatWithUncertaintiesFixedUnit.__rfloordiv__(value, /)
Return value//self.
- FloatWithUncertaintiesFixedUnit.__rmod__(value, /)
Return value%self.
- FloatWithUncertaintiesFixedUnit.__rmul__(value, /)
Return value*self.
- FloatWithUncertaintiesFixedUnit.__round__(ndigits=None, /)
Return the Integral closest to x, rounding half toward even.
When an argument is passed, work like built-in round(x, ndigits).
- FloatWithUncertaintiesFixedUnit.__rpow__(value, mod=None, /)
Return pow(value, self, mod).
- FloatWithUncertaintiesFixedUnit.__rsub__(value, /)
Return value-self.
- FloatWithUncertaintiesFixedUnit.__rtruediv__(value, /)
Return value/self.
- FloatWithUncertaintiesFixedUnit.__setattr__(name, value, /)
Implement setattr(self, name, value).
- FloatWithUncertaintiesFixedUnit.__setformat__(fmt, /)
You probably don’t want to use this function.
- typestr
Must be ‘double’ or ‘float’.
- fmt
Must be one of ‘unknown’, ‘IEEE, big-endian’ or ‘IEEE, little-endian’, and in addition can only be one of the latter two if it appears to match the underlying C reality.
It exists mainly to be used in Python’s test suite.
Override the automatic determination of C-level floating point type. This affects how floats are converted to and from binary strings.
- FloatWithUncertaintiesFixedUnit.__sizeof__()
Size of object in memory, in bytes.
- FloatWithUncertaintiesFixedUnit.__str__()
Return str(self).
- FloatWithUncertaintiesFixedUnit.__sub__(value, /)
Return self-value.
- FloatWithUncertaintiesFixedUnit.__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).
- FloatWithUncertaintiesFixedUnit.__truediv__(value, /)
Return self/value.
- FloatWithUncertaintiesFixedUnit.__trunc__()
Return the Integral closest to x between 0 and x.