[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: very fast spline interp function for heavy oversampling?
- Subject: Re: very fast spline interp function for heavy oversampling?
- From: Martin Schultz <martin.schultz(at)dkrz.de>
- Date: Wed, 21 Jun 2000 11:48:02 +0200
- Newsgroups: comp.lang.idl-pvwave
- Organization: MPI fuer Meteorologie
- References: <7nS35.70$482.44454@den-news1.rmi.net>
- Xref: news.doit.wisc.edu comp.lang.idl-pvwave:20000
"R.G. Stockwell" wrote:
>
> Greetings,
>
> I have a situation where I take a time series, and need to interpolate the
> function to many more samples.
> i.e. original time index = [1,2,3,4....10]
> and I need samples at new time index =
> [1.000,1.001,1.002.......9.999,10.000].
>
> The canned IDL routine spline() works great, but is slow. Unfortunately, I
> don't have time to rewrite the interpolation to something more efficient.
>
> I don't want to use any linear scheme to interpolate, since I want a smooth
> function (i.e. smooth "derivatives") around the data points. I would guess
> that
> it would be easy to efficiently calculate this interp with spline, perhaps
> some vectorization could be put into the function. Or perhaps an
> "upsample" function would work, but modifications would be needed as the
> time series is not evenly sampled.
>
> Are there any user routines out there that can do this interpolation
> efficiently?
>
> Cheers,
> bob
Well, if you don't have time to solve the problem, then you must have
enough
time to wait for the results ;-) But, seriously, as far as I
understand, IDL
uses the Numeical Recipes SPLINE functions, and there are two related
functions which operate in two steps:
SPL_INIT and SPL_INTERP
Since SPL_INIT is executed only once with your coarse data set as input,
this might be
what you are looking for. See the online help for more info.
Martin
--
[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[
[[ Dr. Martin Schultz Max-Planck-Institut fuer Meteorologie [[
[[ Bundesstr. 55, 20146 Hamburg [[
[[ phone: +49 40 41173-308 [[
[[ fax: +49 40 41173-298 [[
[[ martin.schultz@dkrz.de [[
[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[