Skip to content

scalar_interpolator

ScalarInterpolator

Preprocessing of the LAT values of the input.

cluster_scalars(coords, mesh_coords, mesh_scalars, distance=10, vocal=False) staticmethod

Interpolate the scalar values based on the neighborhood.

Parameters:

Name Type Description Default
coords ndarray

Coordinates of the points you want to smooth.

required
mesh_coords list

Coordinates of the mesh.

required
mesh_scalars list

Scalars of the mesh.

required
distance int

Smoothing distance. Defaults to 10.

10
vocal bool

Print progress. Defaults to False.

False

Returns:

Name Type Description
ndarray ndarray

Array of smoothed values for all coords.

stitch_scalars(triangles, scalars, threshold=95) staticmethod

Remove the triangles where the vertices of the triangles have a big differences in scalars and stitch the mesh back toghether using the scalars of the neighboring vertices.

Parameters:

Name Type Description Default
triangles ndarray

Triangles of the mesh.

required
scalars ndarray

Scalars of all mesh vertices.

required
threshold float

Percentile of all LAT differences between the vertices in a triangle that are considered good. Defaults to 95.

95

Returns:

Type Description
tuple[ndarray, ndarray]

triangles, scalars (tuple): Stitched triangles and scalars of the improved mesh.