[daip] Re: AIPS task OGEOM interpolation question
Eric Greisen
egreisen at nrao.edu
Mon Nov 1 19:34:20 EST 2004
Clayton Hogen writes:
> Hello,
>
> I need to know how OGEOM calculates the new pixel values when the image is
> translated by a non-integer pixel value. Thank you for your prompt
> response.
>
> Cheers,
> Clayton Hogen-Chin
> chogen at astro.umn.edu
I did not design this software and so am not entirely familiar with
it. In $APLOOP/INTERPLATE.FOR there are a variety of subroutines.
The actual function is recomputed at every pixel by subroutine IMINFN.
The term Lagrangian is mentioned in the comments.
INT(1) = POS
C Fractional pixel
IPOS = POS + 0.5
C Set first pixel
CEN = IPOS - IHALF
CEN = MAX (1, MIN (CEN, (N-IWID+1)))
C Make 0 rel
CEN = CEN - 1
C Set "x" at first pixel to 1.0
XX = POS - CEN
C Compute interpolating kernal
DO 50 J = 1,IWID
PROD = DENOM(J)
DO 30 I = 1,IWID
IF (I.NE.J) PROD = PROD * (XX - I)
30 CONTINUE
INT(J+1) = PROD
50 CONTINUE
is the actual code and
C Calculate Lagrangian
C denominators
DO 210 J = 1,IWID
PROD = 1.0
DO 200 I = 1,IWID
IF (I.NE.J) PROD = PROD * (J - I)
200 CONTINUE
DENOM(J) = 1.0 / PROD
210 CONTINUE
is done at the start.
Eric Greisen
More information about the Daip
mailing list