Re: INTERPOL [message #26941 is a reply to message #12402] |
Wed, 03 October 2001 19:09   |
Roland Bammer, Ph.D.
Messages: 2 Registered: October 2001
|
Junior Member |
|
|
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.
>>
>>
>
|
|
|