comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Searching for fast linear interpolation routine
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Searching for fast linear interpolation routine [message #8551] Fri, 04 April 1997 00:00
Wayne Landsman is currently offline  Wayne Landsman
Messages: 117
Registered: January 1997
Senior Member
Roger J. Dejus wrote:
>
> Did someone write a fast linear interpolation routine for irregular one
> dimensional arrays (monotonically ascending or descending abscissas)
> similar in functionality to the INTERPOL.PRO routine from RSI?
>

The INTERPOL function consists of two steps: (1) finding the effective
index of the interpolation value (e.g. it is located between indicies 12
and 13 in the abscissa), and (2) performing the interpolation. I know
of at least 3 ways in which the speed of the INTERPOL function can be
improved:

(1) INTERPOL uses a incremental search algorithm to find the
effective index, whereas the quickest way to search a monotonic array is
a binary search (divide and conquer).
(2) the effective index search is not vectorized
(3) the intrinsic INTERPOLATE function (available since V2.2) is not
used to do the interpolation

The program LINTERP in the IDL Astronomy Library incorporates these
three improvements and I get a factor of four improvement in speed on my
Ultra-2.

http://idlastro.gsfc.nasa.gov/ftp/pro/math/linterp.pro

LINTERP calls the program TABINV to find the effective index

http://idlastro.gsfc.nasa.gov/ftp/pro/math/tabinv.pro

These procedures also call ISARRAY (from the JHUAPL library) and
ZPARCHECK

http://idlastro.gsfc.nasa.gov/ftp/pro/jhuapl/isarray.pro
http://idlastro.gsfc.nasa.gov/ftp/pro/misc/zparcheck.pro
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Q: testing if windows exist
Next Topic: Re: Hyperhelp on Linux

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 15:22:37 PDT 2025

Total time taken to generate the page: 0.00431 seconds