Skip to content

Metric🍋

Convention (Entity) 🍋

Convention class.

Attributes:

Name Type Description
axes_seq str

order of axis.

orientation Tuple[AngleDirection, AngleDirection, AngleDirection]

oriention of angles.

angle_units AngleUnit

unit of angles.

main_axis Coord

main axis considered for direction.

axes_seq: str property readonly 🍋

Returns the order of axis.

orientation: Tuple[geolime.base.enums.AngleDirection, geolime.base.enums.AngleDirection, geolime.base.enums.AngleDirection] property readonly 🍋

Returns the oriention of angles.

angle_units: AngleUnit property readonly 🍋

Returns the unit of angles.

main_axis: Coord property readonly 🍋

Returns the main axis considered for direction.

AziDipPitch (Convention) 🍋

Azimuth Dip Pitch Convention class.

rot_mat(self, angles) 🍋

Rotation matrix computation given geological angles.

Parameters:

Name Type Description Default
angles Angles

Azimuth, Dip and Pitch angles.

required

Returns:

Type Description
np.ndarray

Rotation Matrix.

TrendPlunge (Convention) 🍋

Trend Plunge Convention class.

rot_mat(self, angles) 🍋

Rotation matrix computation given trend and plunge angles.

Parameters:

Name Type Description Default
angles Angles

Trend and plunge angles, in radians.

required

Returns:

Type Description
np.ndarray

Rotation Matrix.

Metric (Entity) 🍋

Metric class.

Attributes:

Name Type Description
scales Vector

Major axes of ellipsoid.

angles Angles

Azimuth/dip/pithc of main direction.

anisotropy Convention

Metric anisotropy matrix.

scales: ~Vector property readonly 🍋

Vector of the ellipsoid used for the anistropy. 2 values in 2 dimensions, 3 values in 3 dimension.

Returns:

Type Description
~Vector

Ellispod scales.

angles: ~Angles property readonly 🍋

Vector of the ellipsoid used for the anistropy. 1 value in 2 dimensions(Azimuth), 3 values in 3 dimensions(Azimuth/Dip/Pitch).

Returns:

Type Description
~Angles

Ellipsoid angles.

anisotropy: ndarray property readonly 🍋

Matrix used for distance computation in a Mahalanobis definition. See: https://docs.scipy.org/doc/scipy/reference/generated/scipy.spatial.distance.mahalanobis.html#scipy.spatial.distance.mahalanobis.

Returns:

Type Description
ndarray

Matrix of anisotropy.

eval(self, x, y) 🍋

Compute the Euclidean distance between two points, given ellipsoid anisotropy.

x and y must be: - Two numpy arrays of same dimension - One numpy matrix and one numpy array, obtaining a numpy vector of distances between the rows of the matrix and the numpy vector (there must be a column compatibility) - Two numpy matrices of the same shape, obtaining a numpy vector with the distances between their rows.

Parameters:

Name Type Description Default
x ~Vector

First array for distance computation.

required
y ~Vector

Second array for distance computation.

required

Returns:

Type Description
float

Metric vector.

distance_matrix(self, x, y) 🍋

Computes the distance matrix of two sets of points in the Euclidean space according to a distance.

Parameters:

Name Type Description Default
x ~Vector

A numpy matrix with the vectors to be analized in its rows.

required
y ~Vector

A numpy matrix with the vectors to be analized in its rows (it must have the same number of columns as X1)

required

Returns:

Type Description
ndarray

This functions returns a numpy matrix, where the (i,j)-th element corresponds to the distance between the i-th row of X1 and the j-th row of X2.

Back to top