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

Home » Public Forums » archive » Interpolation
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: Interpolation [message #59871 is a reply to message #2184] Mon, 14 April 2008 13:13 Go to previous messageGo to previous message
tarequeaziz is currently offline  tarequeaziz
Messages: 20
Registered: November 2007
Junior Member
On Apr 14, 11:34 am, Spon <christoph.b...@gmail.com> wrote:
> On Apr 13, 1:56 am, tarequea...@gmail.com wrote:
>
>> Step one: Real data in a XY frame
>> Step two: 'Design a new xy frame, say X'Y' frame, whose values are
>> generated from a chosen r_vec and theta_vec.
>> Step 3: Now interpolate from XY to X'Y'.
>
>> Tareque
>
> Hi Tareque,
>
> I'm guessing you know whereabouts your small frame is, within your big
> frame, right?
> So, if you take your big normal (x'y') frame, your small frame can be
> defined by two points,
> bottom-left and top-right - let's call them (b,l) & (t,r) - in terms
> of x'y' grid co-oords.
>
> -----
> ; Once you've worked out where these two points are, you can use
> CONGRID on your xy dataset:
> tempx = r - l ; How many data points of the x'y' grid does the xy grid
> span
> tempy = t - b ; in each dimension?
>
> ; interpolate to new sub-grid
> newdata = congrid(data, tempx, tempy)
>
> ; Your x'y' frame co-ordinates for this data are
> newx = l + lindgen(tempx)
> newy = b + lindgen(tempy)
>
> ; (this bit is just array juggling to avoid for loops)
> newx = rebin(newx,tempx,tempy)
> newy = rebin(reform(newy,1,tempy),tempx,tempy)
> newx = reform(newx,n_elements(newx))
> newy = reform(newy,n_elements(newy))
>
> ; x'y' co-ordinates for ever datapoint in 'newdata'
> xycoords = transpose([[newx],[newy]])
>
> ; so your new data should be at r/theta co-ordinates defined by:
> polarcoords = cv_coord(from_rect = xycoords, /to_polar)
> -----
>
> I've assumed that your big circle is centered on the origin.
> I've also assumed your small circle is in the upper-right quadrant of
> your large circle here,
> so I don't have to wrap my mind around minus-signs and the like...
>
> I hope this helps and that I've understood your question
> correctly. :-)
>
> Regards,
> Chris

Hi Chris,

Thank you so much for getting back at this.
Without your permission I sent a picture of my set up. Hope that will
be able to shed some light on it.

Once again, much appreciated!

Best,
Tareque
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: IDLDOC question
Next Topic: Plotting one ps file with different plots in separate pages

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

Current Time: Wed Oct 08 17:19:01 PDT 2025

Total time taken to generate the page: 0.00515 seconds