Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado
nicholas@dsuap1> Does anyone have a fast (read as no 'For' loops) nicholas@dsuap1> interpolation routine? I tried using INTERPOL nicholas@dsuap1> but found it very slow compared to using nicholas@dsuap1> call_external and a fortran routine. Thanks for nicholas@dsuap1> any input. Andy IDL's userlib interpol is slow because it starts from scratch for every point it looks up in the arrays to be interpolated - so it spends all it's time searching the x,y arrays to interpolate on. A sort of the input array and starting each search from where the previous point left off works much faster. So, sort the vector of desired x's, save the map, then un-sort the output vector to match the input. I have a version of interpol (which I didn't write), but the parameters and keywords are not compatible with the userlib interpol. ============================================================ ===== David Huenemoerder Center for Space Research/AXAF Science Center MIT 37-667 Cambridge, MA 02139 dph@space.mit.edu 617-253-4283 fax: 617-253-0861 ============================================================ =====