obspy.core.inventory.util.Longitude

class Longitude(value, **kwargs)[source]

Bases: obspy.core.util.obspy_types.FloatWithUncertaintiesFixedUnit

Longitude object

Parameters
  • value (float) – Longitude value

  • lower_uncertainty (float) – Lower uncertainty (aka minusError)

  • upper_uncertainty (float) – Upper uncertainty (aka plusError)

  • datum (str) – Datum for longitude coordinate

  • measurement_method (str) – Method used in the measurement.

Attributes

imag

the imaginary part of a complex number

real

the real part of a complex number

unit

Public Methods

as_integer_ratio

Return integer ratio.

conjugate

Return self, the complex conjugate of any float.

fromhex

Create a floating-point number from a hexadecimal string.

hex

Return a hexadecimal representation of a floating-point number.

is_integer

Return True if the float is an integer.

Special Methods

Longitude.__abs__()

abs(self)

Longitude.__add__(value, /)

Return self+value.

Longitude.__bool__()

self != 0

Longitude.__ceil__()

Return the ceiling as an Integral.

Longitude.__delattr__(name, /)

Implement delattr(self, name).

Longitude.__dir__()

Default dir() implementation.

Longitude.__divmod__(value, /)

Return divmod(self, value).

Longitude.__eq__(value, /)

Return self==value.

Longitude.__float__()

float(self)

Longitude.__floor__()

Return the floor as an Integral.

Longitude.__floordiv__(value, /)

Return self//value.

Longitude.__format__(format_spec, /)

Formats the float according to format_spec.

Longitude.__ge__(value, /)

Return self>=value.

Longitude.__getattribute__(name, /)

Return getattr(self, name).

Longitude.__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.

Longitude.__getnewargs__()
Longitude.__gt__(value, /)

Return self>value.

Longitude.__hash__()

Return hash(self).

Longitude.__iadd__(other)
Longitude.__imul__(other)
Longitude.__init__(value, lower_uncertainty=None, upper_uncertainty=None, datum=None)[source]
Longitude.__init_subclass__()

This method is called when a class is subclassed.

The default implementation does nothing. It may be overridden to extend subclasses.

Longitude.__int__()

int(self)

Longitude.__le__(value, /)

Return self<=value.

Longitude.__lt__(value, /)

Return self<value.

Longitude.__mod__(value, /)

Return self%value.

Longitude.__mul__(value, /)

Return self*value.

Longitude.__ne__(value, /)

Return self!=value.

Longitude.__neg__()

-self

static Longitude.__new__(cls, value, **kwargs)
Longitude.__pos__()

+self

Longitude.__pow__(value, mod=None, /)

Return pow(self, value, mod).

Longitude.__radd__(value, /)

Return value+self.

Longitude.__rdivmod__(value, /)

Return divmod(value, self).

Longitude.__reduce__()

Helper for pickle.

Longitude.__reduce_ex__(protocol, /)

Helper for pickle.

Longitude.__repr__()

Return repr(self).

Longitude.__rfloordiv__(value, /)

Return value//self.

Longitude.__rmod__(value, /)

Return value%self.

Longitude.__rmul__(value, /)

Return value*self.

Longitude.__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).

Longitude.__rpow__(value, mod=None, /)

Return pow(value, self, mod).

Longitude.__rsub__(value, /)

Return value-self.

Longitude.__rtruediv__(value, /)

Return value/self.

Longitude.__set_format__(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.

Longitude.__setattr__(name, value, /)

Implement setattr(self, name, value).

Longitude.__sizeof__()

Size of object in memory, in bytes.

Longitude.__str__()

Return str(self).

Longitude.__sub__(value, /)

Return self-value.

Longitude.__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).

Longitude.__truediv__(value, /)

Return self/value.

Longitude.__trunc__()

Return the Integral closest to x between 0 and x.