On Apr 14, 11:34 am, Spon <christoph.b...@[EMAIL PROTECTED]
> wrote:
> On Apr 13, 1:56 am, tarequea...@[EMAIL PROTECTED]
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


|