Files
seiscomp-training/lib/python/gempa/Processing.py

155 lines
5.3 KiB
Python

# This file was automatically generated by SWIG (https://www.swig.org).
# Version 4.3.0
#
# Do not make changes to this file unless you know what you are doing - modify
# the SWIG interface file instead.
from sys import version_info as _swig_python_version_info
# Import the low-level C/C++ module
if __package__ or "." in __name__:
from . import _gProcessing
else:
import _gProcessing
try:
import builtins as __builtin__
except ImportError:
import __builtin__
def _swig_repr(self):
try:
strthis = "proxy of " + self.this.__repr__()
except __builtin__.Exception:
strthis = ""
return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
def _swig_setattr_nondynamic_instance_variable(set):
def set_instance_attr(self, name, value):
if name == "this":
set(self, name, value)
elif name == "thisown":
self.this.own(value)
elif hasattr(self, name) and isinstance(getattr(type(self), name), property):
set(self, name, value)
else:
raise AttributeError("You cannot add instance attributes to %s" % self)
return set_instance_attr
def _swig_setattr_nondynamic_class_variable(set):
def set_class_attr(cls, name, value):
if hasattr(cls, name) and not isinstance(getattr(cls, name), property):
set(cls, name, value)
else:
raise AttributeError("You cannot add class attributes to %s" % cls)
return set_class_attr
def _swig_add_metaclass(metaclass):
"""Class decorator for adding a metaclass to a SWIG wrapped class - a slimmed down version of six.add_metaclass"""
def wrapper(cls):
return metaclass(cls.__name__, cls.__bases__, cls.__dict__.copy())
return wrapper
class _SwigNonDynamicMeta(type):
"""Meta class to enforce nondynamic attributes (no new attributes) for a class"""
__setattr__ = _swig_setattr_nondynamic_class_variable(type.__setattr__)
class Ecef2Enu(object):
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
__repr__ = _swig_repr
def __init__(self, lat, lon, h):
_gProcessing.Ecef2Enu_swiginit(self, _gProcessing.new_Ecef2Enu(lat, lon, h))
def convert(self, x, y, z):
return _gProcessing.Ecef2Enu_convert(self, x, y, z)
__swig_destroy__ = _gProcessing.delete_Ecef2Enu
# Register Ecef2Enu in _gProcessing:
_gProcessing.Ecef2Enu_swigregister(Ecef2Enu)
class Enu2Ecef(object):
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
__repr__ = _swig_repr
def __init__(self, lat, lon, h):
_gProcessing.Enu2Ecef_swiginit(self, _gProcessing.new_Enu2Ecef(lat, lon, h))
def convert(self, e, n, u):
return _gProcessing.Enu2Ecef_convert(self, e, n, u)
__swig_destroy__ = _gProcessing.delete_Enu2Ecef
# Register Enu2Ecef in _gProcessing:
_gProcessing.Enu2Ecef_swigregister(Enu2Ecef)
def geodetic2ecef(lat, lon, h):
return _gProcessing.geodetic2ecef(lat, lon, h)
def distance(strike1, dip1, rake1, strike2, dip2, rake2, scaleX=1.0, scaleY=1.0, scaleZ=1.0):
return _gProcessing.distance(strike1, dip1, rake1, strike2, dip2, rake2, scaleX, scaleY, scaleZ)
def rotAngleNP(strike1, dip1, rake1, strike2, dip2, rake2):
return _gProcessing.rotAngleNP(strike1, dip1, rake1, strike2, dip2, rake2)
def rotAngleMT(strike1, dip1, rake1, strike2, dip2, rake2):
return _gProcessing.rotAngleMT(strike1, dip1, rake1, strike2, dip2, rake2)
def otherNodalPlane(inStrike, inDip, inRake):
return _gProcessing.otherNodalPlane(inStrike, inDip, inRake)
def nodalPlane2Tensor(strike, dip, rake):
return _gProcessing.nodalPlane2Tensor(strike, dip, rake)
class Vector3D(object):
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
__repr__ = _swig_repr
def __init__(self, *args):
_gProcessing.Vector3D_swiginit(self, _gProcessing.new_Vector3D(*args))
def length(self):
return _gProcessing.Vector3D_length(self)
def dot(self, v):
return _gProcessing.Vector3D_dot(self, v)
def cross(self, a, b):
return _gProcessing.Vector3D_cross(self, a, b)
def normalize(self):
return _gProcessing.Vector3D_normalize(self)
def __imul__(self, scale):
return _gProcessing.Vector3D___imul__(self, scale)
def __mul__(self, *args):
return _gProcessing.Vector3D___mul__(self, *args)
def __iadd__(self, other):
return _gProcessing.Vector3D___iadd__(self, other)
def __isub__(self, other):
return _gProcessing.Vector3D___isub__(self, other)
def __add__(self, other):
return _gProcessing.Vector3D___add__(self, other)
def __sub__(self, other):
return _gProcessing.Vector3D___sub__(self, other)
def fromAngles(self, radAzimuth, radDip):
return _gProcessing.Vector3D_fromAngles(self, radAzimuth, radDip)
def toAngles(self, radAzimuth, radDip):
return _gProcessing.Vector3D_toAngles(self, radAzimuth, radDip)
x = property(_gProcessing.Vector3D_x_get, _gProcessing.Vector3D_x_set)
y = property(_gProcessing.Vector3D_y_get, _gProcessing.Vector3D_y_set)
z = property(_gProcessing.Vector3D_z_get, _gProcessing.Vector3D_z_set)
__swig_destroy__ = _gProcessing.delete_Vector3D
# Register Vector3D in _gProcessing:
_gProcessing.Vector3D_swigregister(Vector3D)