Interpolate an S2FunHarmonic by given function values at given points on the sphere.
Let \(M\) spherical points \(v_i\) and corresponding function values \(y_i\) be given. We compute the S2FunHarmonic \(f\) of an specific bandwidth which minimizes the least squares problem
\[\sum_{i=1}^M|f(v_i)-y_i|^2.\]
Syntax
sF = S2FunHarmonic.interpolate(nodes, val)
sF = S2FunHarmonic.interpolate(nodes, val, 'bandwidth', bandwidth, 'tol', TOL, 'maxit', MAXIT, 'weights', W)
Input
nodes | vector3d (grid on sphere) |
val | function values on the grid (may be multidimensional) |
Options
bandwidth | maximum degree of the spherical harmonics used to approximate the function |
tol | tolerance for lsqr |
maxit | maximum number of iterations for lsqr |
weights | weight w_n for the node nodes (default: Voronoi weights) |