Skip to content

Metric🍋

AziDipPitch 🍋

Bases: Convention

Azimuth Dip Pitch Convention class.

rot_mat(angles) 🍋

Rotation matrix computation given geological angles.

Parameters:

Name Type Description Default
angles Angles

Azimuth, Dip and Pitch angles.

required

Returns:

Type Description
ndarray

np.ndarray: Rotation Matrix.

Convention 🍋

Bases: Entity

Convention class.

Attributes:

Name Type Description
axes_seq str

order of axis.

orientation Tuple[AngleDirection, AngleDirection, AngleDirection]

orientation of angles.

angle_units AngleUnit

unit of angles.

main_axis Coord

main axis considered for direction.

angle_units: AngleUnit property 🍋

Returns the unit of angles.

axes_seq: str property 🍋

Returns the order of axis.

main_axis: Coord property 🍋

Returns the main axis considered for direction.

orientation: Tuple[AngleDirection, AngleDirection, AngleDirection] property 🍋

Returns the orientation of angles.

Metric 🍋

Bases: Entity

Metric class.

Attributes:

Name Type Description
scales Vector

Major axes of ellipsoid.

angles Angles

Azimuth/dip/pitch of main direction.

anisotropy Convention

Metric anisotropy matrix.

angles: Angles property writable 🍋

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

Returns:

Type Description
Angles

Ellipsoid angles.

anisotropy: np.ndarray property 🍋

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.

convention: Convention property 🍋

Return Metric convention.

Returns:

Type Description
Convention

Metric Convention.

dimension: int property 🍋

Return Metric dimension.

Returns:

Type Description
int

Metric Dimension.

scales: Vector property writable 🍋

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

Returns:

Type Description
Vector

Ellipsoid scales.

distance_matrix(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

ndarray

corresponds to the distance between the i-th row of X1 and the

ndarray

j-th row of X2.

eval(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.

to_pyvista(center=[0.0, 0.0, 0.0]) 🍋

Export Metric to Pyvista PolyData.

Returns:

Type Description

PolyData object.


Last update: 2022-12-23