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

Home » Public Forums » archive » Interpolate whole array instead of looping through elements
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: Interpolate whole array instead of looping through elements [message #94326 is a reply to message #94325] Tue, 11 April 2017 12:07 Go to previous messageGo to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
On Tuesday, April 11, 2017 at 12:18:30 PM UTC-4, liam....@gmx.co.uk wrote:
...
> out_vals[j,i] = bilinear(temp[*,*,j,i],ival,jval)
...
> Is there any method where one or both of the loops can be removed, and the interpolation can be carried out on the entire array (i.e. on the time and level dimensions at the same time)? I've tried to think of a quicker method, but I'm stumped.

As long as TEMP[*,*,j,i] has a lot of elements, you won't really get much of a speed-up removing the FOR loops. Try timing this loop,

for i = 0, ntime-1 do begin
for j = 0, nlev-1 do begin
DUMMY = 1
endfor
endfor

However long this loop takes to run, is the amount of time you will save by removing the loop in your code.

Craig
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Taylor Diagrams in IDL
Next Topic: Newcomer to IDL

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

Current Time: Wed Oct 08 11:43:02 PDT 2025

Total time taken to generate the page: 0.00408 seconds