[daip] XSMTH
Eric Greisen
egreisen at nrao.edu
Mon Jul 28 13:40:36 EDT 2003
The task figures out the position in each input row corresponding to
the output pixel. Then it finds the range of pixels in the input row
the corresponds to +- one support radius. It weights these with the
Gaussian function into the output pixel.
The code is fairly straightforward
LROW = TRC(1) - BLC(1) + 1.01 input size
IROW = CATBLK(KINAX) output size
XMUL = (LROW-1.0) / (IROW-1.0)
XJ = 1.0 - XMUL
XDIV = IXDIV # divisions/cell in
lookup table
DO 30 I = 1,IROW
XJ = XJ + XMUL
J1 = XJ - SUPRAD + 0.9999
J2 = XJ + SUPRAD
J1 = MAX (1, J1)
J2 = MIN (LROW, J2)
S = 0.0
W = 0.0
DO 10 J = J1,J2
IF (XDATA(J).NE.FBLANK) THEN
L = ABS(XJ-J)*XDIV + 1.5
S = XDATA(J) * TAB(L) + S
W = TAB(L) + W
END IF
10 CONTINUE
20 RESULT(I) = FBLANK
IF (W.GT.WCUTOF) RESULT(I) = S / W
30 CONTINUE
Eric Greisen
More information about the Daip
mailing list