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

Home » Public Forums » archive » Regrid / Interpolation Question
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
Regrid / Interpolation Question [message #79686] Thu, 22 March 2012 16:18
Sean[1] is currently offline  Sean[1]
Messages: 11
Registered: July 2005
Junior Member
All,

I have what seems to be a straightforward re-gridding/interpolation problem, but AFAIK there is no built-in vectorized way to do this that avoids loops.

Here's my inputs --
vin and yin are arrays of size (ni, nj), and the values of yin are ordered along rows
(e.g., yin[i+1,*] > yin[i,*] for 0 =< i =< (ni-2) )
yout is an array of length nk

The looped version of the interpolation is the following:

yout = fltarr(nk,nj)
for j = 0, nj-1 do yout[*,j] = interpol( yin[*,j], vin[*,j], yout)

Is there an elegant and/or built-in way to do this without involving a loop?

I've written a somewhat convoluted program to do this without a loop, but it involves some transforming and doesn't seem very elegant. I'm happy to upload if someone wants to see it.

Sean
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Bug(s) in debugger? Breakpoint stepping for nested HASH's.
Next Topic: external string EXP for MATH_DOIT (ENVI)

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

Current Time: Wed Oct 08 18:52:36 PDT 2025

Total time taken to generate the page: 0.00434 seconds