Interpolations.jl
Interpolations.jl copied to clipboard
Gridded Cubic Splines (WIP)
Very much work in progress! Allows cubic spline interpolation for a uneven grid.
Currently just a 1-D implementation with natural spline boundary conditions that I made for an Empirical Mode Decomposition package I am writing (seemed a shame to have to rely on Fortran's DIERCKX).
To Do (probably in the next week or two):
- [ ] Add
periodic
,not-a-knot
andquadratic
boundary conditions - [ ] Re-write using generated functions for perf + multi-dimensional interpolations
- [ ] Tests!
- Anything else?
Submitting PR now to avoid duplication or if anyone fancies to help :smile:
Very interested to know how this is coming along.
Edit: I tested it out. Once I figured out that the correct call was Gridded(Cubic(Reflect()))
, everything seemed to work ok. In my current setting, performance diff vs gridded linear is not noticeable.
I take it back. I didn't see you said that your implementation was for Natural boundary conditions. Gridded(Cubic(Natural()))
does not work. Only Gridded(Cubic(Reflect()))
gives me anything, which is weird. It looks like you defined some methods for each, but not all methods for either.
This functionality would be great! Any update on this?
It did not make it in before the giant rewrite in #226. It would have to be totally redone. But it should be much easier now that we're not using generated functions for everything. Want to take a crack at it, @lungben? Basically everything that gets added here is added by someone who needs it, and you're the latest!
@timholy thanks for the update! I will take a look, but it probably will take a while and I probably will have to ask stupid questions ;-)
That would be fine! The place to start is the new WeightedIndex infrastructure. That, prefiltering, and the code to calculate the right indexing/weighting are really the pillars of the package.
I did not had the time yet to get into this topic, and probably will not have the time for it in the near future. Sorry for that!