fluidimage.calcul.interpolate.thin_plate_spline_subdom#

Thin plate spline with subdomains#

Translated and adapted from UVmat code (Joel Sommeria, LEGI, CNRS).

This interpolation/smoothing (Duchon, 1976; NguyenDuc and Sommeria, 1988) minimises a linear combination of the squared curvature and squared difference from the initial data.

class fluidimage.calcul.interpolate.thin_plate_spline_subdom.ThinPlateSplineSubdom(centers, subdom_size, smoothing_coef, threshold=None, percent_buffer_area=20)[source]#

Bases: object

Helper class for thin plate interpolation.

compute_tps_weights_subdom(values)[source]#

Compute the TPS weights for all subdomains

init_with_new_positions(new_positions)[source]#

Initialize with the new positions

Parameters:
new_positions: 2d array of int64

new_positions[1] and new_positions[0] correspond to the x and y values, respectively.

interpolate(weights_domains)[source]#

Interpolate on new positions

compute_tps_weights_iter(centers, values: Array_float64_1d, smoothing_coef)[source]#

Compute the thin plate spline (tps) coefficients removing erratic vectors

It computes iteratively “compute_tps_weights”, compares the tps result to the initial data and remove it if difference is larger than the given threshold

Classes

ThinPlateSplineSubdom(centers, subdom_size, ...)

Helper class for thin plate interpolation.