RbfInterpolationTools.jl

A simple RBF interpolation framework
Author munozariasjm
Popularity
2 Stars
Updated Last
2 Years Ago
Started In
January 2022

RbfInterpolationTools

Documents Build Status Coverage

A simple package to perform interpolations using RadialBasisFunctions (RBF).

Note that the package was developed to teach basic computational methods and palying around with Julia.

Context

There are several ways to use mathematical propieties of functions to estimate value of functions without actually having to compute the function, but actually using few observed points.

The RBF apporach uses real functions such as Gussian, Multiquadratic, Inverse Multiquadratic and Quadratic to construct a basis to estimate escalar valued functions.

Usage

Installation

julia> ]add RbfInterpolationTools

The closing square bracket switches to the package manager interface and the add command installs the package and any missing dependencies. To return to the Julia REPL hit the delete key.

To load the package run

julia> using RbfInterpolationTools

Quick-start

Suppose we have observed some points at random times:

julia> t=hcat(rand(30) .* 6.28)

And the observables (for example, of speed) are:

julia> v_observed = vec(map(x -> sin(x), X))

To estimate the values at those points we are going to create a interpolation environment with:

julia> using RbfInterpolationTools

The sintax for the interpolation environment is simple:

julia> inter = RbfInterpolationTools.Interpolator(X = t, y = y)

Now, we just have to get a Matrix with the points where we want to know the values

julia> new_ts = hcat(0:6.28/(999):6.28)

And simply we get the desired values with:

julia> new_vs = RbfInterpolationTools.interpolateMesh(inter, new_ts)

Available methods:

For all of the methods, it is necesary to create an environment using: Interpolator(X::Matrix, y::vector::, ϵ::Float64 (Default to 1), basis_name::String (Default to "MQ"))

And then, some functionalities implemened are:

  • interpolatePoint(inter::Interpolator,p::Vector): It returns the interpolated values of the functions at the coordinated vector p.
  • interpolateMesh(inter::Interpolator,M::Matrix): It retuns N scalars of interpolated values of points with d dimensions given the matrix M of dimensions (N,d).
  • gradientPoint(inter::Interpolator,p::Vector): Gradient at the vector point p from Forwad differentiation.

Other packages

For more complex and usefull Modules, please check:

Used By Packages

No packages found.