[SciPy-User] Spline interpolation array instead of loop?

Charles R Harris charlesr.harris@gmail....
Fri Mar 1 21:24:44 CST 2013


On Fri, Mar 1, 2013 at 8:15 PM, Charles R Harris
<charlesr.harris@gmail.com>wrote:

>
>
> On Fri, Mar 1, 2013 at 8:07 PM, Charles R Harris <
> charlesr.harris@gmail.com> wrote:
>
>>
>>
>> On Fri, Mar 1, 2013 at 5:18 PM, Michael Aye <michael.aye@ucla.edu> wrote:
>>
>>> Hi!
>>>
>>> So, I have to do the same spine interpolation (same=same x-axis) for
>>> 189 data channels, so I was wonderding if there is a way to store the
>>> 189 measurements into a 2D array and to set that at once to an
>>> interpolator, is that possible somehow?
>>>
>>> I noticed that InterpolatedUnivariateSpline does not allow me to do
>>> that, it seems.
>>>
>>> So, in other words, what I would like to be able to do is:
>>>
>>> len(x) = 20
>>>
>>> len(y_i) = 20
>>>
>>> i = 1 ..189
>>>
>>> y.shape == (20,189)
>>>
>>> s = UnivariateSpline(x, y)
>>>
>>>
>>> res = s(new_x)
>>>
>>> res.shape == (20, 189)
>>>
>>>
>>> Does something like that exist?
>>>
>>>
>> Well, I'm working on an spline interpolater for scipy and it works with
>> vector valued splines, so that should cover your case. At the moment it is
>> in pure python prototype form, so pretty slow. You might have a look if you
>> are interested and see if it is in the right direction. It is here<https://github.com/charris/bsplines>.
>> Not much documented at the moment since I've only started on it.
>>
>>
> If you do try it out, and it would be a favor to me if you did ;), feel
> free to email me directly if you need help setting it up.
>

And now I remember that I don't do spline creation yet. What sort of
boundary conditions are you using? I also plan to solve for the spline
weights for vector valued data, I'll rough that out this weekend if you are
interested.

Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/scipy-user/attachments/20130301/f6cda56f/attachment-0001.html 


More information about the SciPy-User mailing list