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

Home » Public Forums » archive » interpol
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: INTERPOL [message #27016 is a reply to message #26941] Mon, 08 October 2001 13:15 Go to previous messageGo to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
Hi Roland--

Sorry for the delay, I got preoccupied.

I guess what I was hoping for is some simplified example of why you
think something is not working right. It doesn't actually have to be
the original data, in fact it is better if it is *not*. Best if you
can make a 20-element vector that shows the problem.

I can't see anything obviously wrong with your code. However I use
INTERPOL() regularly inside of PLOTIMAGE and it rarely misses a beat.
Have you tried SPL_INIT/SPL_INTERP? That has also always been a
winner for me.

Craig


"Roland Bammer, Ph.D." <roland@s-word.stanford.edu> writes:
> Hi Craig and others,
>
> "in_vec" is a vector of length "ydim" taken from a column of an image.
> the content of this vector should be shifted "shift" and scaled "mag"
> (squeezed or magnified) and resampled on a regular grid ("new_vec").
> The first and last few elements of "in_vec" are usually mere noise.
> Problems occur at the edges of the array when warp_x(0) > 0 or
> warp_x(ydim-1) < ydim-1, ie. some elements have some unreasonable high
> values. I would understand if this problem arises in the "extrapolation
> zone" but these distortions extent into the area where gridpoints are
> available (from in_vec and warp_y); and the slightly (a few %) elevated
> signal intensity compared to the input is still an enigma.
> Any guesses? It occurs for all interpolation schemes (/SPLINE, ...)
> Mirroring the data around warp_x(0) and warp_x(ydim-1) helps but the
> intensity shift is still there...
>
> Roland.
>
>
>
> Craig Markwardt wrote:
>
>> Hi Roland,
>>
>> Can you fill us in a little on what this procedure should do, like
>> with an example of what you did, what was the result, and what you
>> were expecting?
>>
>> Craig
>>
>>
>> "Roland Bammer, Ph.D." <roland@s-word.stanford.edu> writes:
>>
>>> Hi all,
>>>
>>> I have encountered some problems (some data fluctuations at the edges)
>>> with the INTERPOL-Function:
>>> when warp_x(0) > 0 or warp(ydim-1) < ydim-1 in the code below.
>>> Moreover, it seems that the overall signal values are shifted towards
>>> higher values. Restricting the values of regrid to CEIL(warp_x(0))<=
>>> regrid <= FLOOR(warp(ydim-1)) (i.e. no extrapolation) did not help at all.
>>>
>>> Any suggestions?
>>>
>>> PRO regridding, in_vec, new_vec, ydim, mag, shift_y
>>> x0 = ydim/2.0 - 0.5
>>> regrid = FINDGEN(ydim)
>>> x1 = x0 + (regrid-x0)*mag
>>> warp_x = x1 + shift_y
>>> new_vec = INTERPOL(in_vec,warp_x,regrid,/SPLINE)
>>> END;
>>>
>>> Roland.
>>>
>>>
>>
>

--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: CASE statement
Next Topic: VARRAY for SGI IRIX64

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

Current Time: Sat Oct 11 19:57:25 PDT 2025

Total time taken to generate the page: 0.71830 seconds