bladex.ndinterpolator.reconstruct_f

reconstruct_f(original_input, original_output, rbf_input, rbf_output, basis, radius)[source]

Reconstruct a function by using the radial basis function approximations.

Parameters:
  • original_input (array_like) – the original values of function inputs.
  • original_output (array_like) – the original values of function output.
  • rbf_input (array_like) – the input data for RBF approximation.
  • rbf_output (array_like) – the array elements to be updated with the RBF interpolated outputs after the approximation.
  • basis (string) – radial basis function.
  • radius (float) – smoothing length, also called the cut-off radius.
Example:
>>> import numpy as np
>>> from bladex.ndinterpolator import reconstruct_f
>>> x = np.arange(10)
>>> y = np.square(x)
>>> radius = 10
>>> n_interp = 50
>>> x_rbf = np.linspace(x[0], x[-1], num=n_interp)
>>> y_rbf = np.zeros(n_interp)
>>> reconstruct_f(original_input=x, original_output=y, rbf_input=x_rbf,
    rbf_output=y_rbf, radius=radius, basis='beckert_wendland_c2_basis')