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

Home » Public Forums » archive » POLY_2D inconsitent 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: POLY_2D inconsitent interpolation [message #49789 is a reply to message #49704] Fri, 11 August 2006 17:41 Go to previous message
Randolf Klein is currently offline  Randolf Klein
Messages: 6
Registered: August 2006
Junior Member
Wayne Landsman wrote:
> Examing the code for CONGRID one finds that use of the CENTER keyword
> alters the input parameters to POLY_2D by 0.5 for the interpolation
> cases but not for the nearest neighbor, just what was found was needed
> in the original posting by Craig DeForest.
>
> It sounds like a similar fix is needed to hastrom.pro in the IDL
> Astronomy Library but I don't have time to do this today (but probably
> within a week). --Wayne
>

Actually congrid uses INTERPOLATE. POLY_2D is only used in the nearest
neighbor sampling. I wonder, if this might also be the solution for hastrom.

But for now I am trying to work with the following change in hastrom.
Replace the call to polywarp with:
if interp eq 0 $ ;Get coefficients
then polywarp, x+.5, y+.5, xref, yref, degree, kx, ky $
else polywarp, x, y, xref, yref, degree, kx, ky

This is not ideal. The image does not get shifted around (good!), but
the area covered by the interpolation is shifted by half an original pixel.

RK
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: output in an array
Next Topic: slow processing of my k-nearest neighour code

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

Current Time: Fri Oct 17 12:58:12 PDT 2025

Total time taken to generate the page: 1.60139 seconds