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

Home » Public Forums » archive » Re: Is it possible to speed up the Interpolate command?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Is it possible to speed up the Interpolate command? [message #89244 is a reply to message #89242] Thu, 07 August 2014 19:52 Go to previous messageGo to previous message
wlandsman is currently offline  wlandsman
Messages: 743
Registered: June 2000
Senior Member
On Thursday, August 7, 2014 6:11:29 PM UTC-4, Stephen Messenger wrote:
> I've been stuck on figuring out how to speed up an interpolation calculation and wondered if anyone has any suggestions?

> for i=0, numlines-1 do begin
> Values(*,i)=interpolate(datacube(*,*,i),x_loc,y_loc)
> endfor

One suggestion is to replace the above with

for i=0,numlines-1 do begin
values[0,i] = interpolate(data cube[*,*,i],x_loc,y_loc)
endfor

https://www.idlcoyote.com/code_tips/asterisk.html

You might also find a slight speed improvement with by writing

for i=0,numlines-1 do $
values[0,i] = interpolate(data cube[*,*,i],x_loc,y_loc)

though the improvement will be less than it was in old versions of IDL.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: IDL kernel for IPython/Jupyter Notebooks
Next Topic: help with appending strings

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

Current Time: Fri Oct 10 12:14:21 PDT 2025

Total time taken to generate the page: 0.40102 seconds