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.

We first need to compute tps coefficients U_tps (function compute_tps_coeff). Interpolated data can then be obtained as the matrix product dot(U_tps, EM) where the matrix EM is obtained by the function compute_tps_matrix. The spatial derivatives are obtained as dot(U_tps, EMDX) and dot(U_tps, EMDY), where EMDX and EMDY are obtained from the function compute_tps_matrix_dxy. A helper class is also provided.

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

Bases: object

Helper class for thin plate interpolation.

compute_tps_coeff_iter(centers, U)[source]#

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

It computes iteratively “compute_tps_coeff”, 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.