Skip to content

Interpolation accuracy comparison #2

Description

@kalosu

Hi @DannyRuijters,

Thanks a lot for putting out this really nice project available for everyone.

I have followed your cubic spline based interpolation with prefiltering to guarantee that the interpolation function goes through the original data points.

What I want to do is to evaluate the interpolation of a function over multiple points (in frequency space - 2D). However my evaluation points are really a lot and that is why I decided to give it a try to your implementation.

In general my re implementation (just copying your code) kind of works but when I compare the accuracy to a python's scipy RectBivariateSpline based evaluation, I can notice some differences.

What I do for comparison is to interpolate the same function ($x^2 + y^2$) using both approaches (GPU based and scipy's based approach on CPU). I then evaluate the interpolation functions at the original points that were used to define the interpolation objects.

The scipy based evaluations is really good (the difference is just limited by the numerical accuracy).
However for the GPU based implementation I obtain residues in the order of 1e-6.

For image visualization purposes I guess that this is not a big problem.
However in my case I use the results from the interpolations for some further numerical analysis (I am trying to perform some surface integrals).

Do you have any thoughts or ideas about the limit in accuracy for your interpolation approach? Do the residues that I observe in my GPU implementation sound normal to you? Or do you think that the accuracy should be better? (It can also be that I am doing something wrong in my CUDA code).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions