      SUBROUTINE FILTER (TEM,TE,Y,DIM,DI,X,ZEM,ZE,W,QM,Q,Z,FILTA)
      DIMENSION
     1  Q( 289 ), TE( 289 , 7 ), DI( 289 , 7 ), ZE( 289 , 7 ),
     2  Z( 289 ),  Y( 289 , 7 ),  X( 289 , 7 ),  W( 289 , 7 ),
     3 QM( 289 ),TEM( 289 , 7 ),DIM( 289 , 7 ),ZEM( 289 , 7 )
      COMPLEX TEM, TE, Y, DIM, DI, X, ZEM, ZE, W, QM, Q, Z
      FILTB = (1. - FILTA) * 0.5
C     QM CONTAINS N-1,  Q CONTAINS N,  Z CONTAINS N+1  ETC.
      DO 21 LE=1, 7
      DO 21 I=1, 289
      TEM(I,LE) = CMPLX(
     1 FILTA* REAL(TE(I,LE)) + FILTB* REAL(TEM(I,LE)),
     2 FILTA*AIMAG(TE(I,LE)) + FILTB*AIMAG(TEM(I,LE)))
21    CONTINUE
      DO 22 LE=1, 7
      DO 22  I=1, 289
      DIM(I,LE) = CMPLX(
     1 FILTA* REAL(DI(I,LE)) + FILTB*( REAL(X(I,LE))+ REAL(DIM(I,LE))),
     2 FILTA*AIMAG(DI(I,LE)) + FILTB*(AIMAG(X(I,LE))+AIMAG(DIM(I,LE))))
22    CONTINUE
      DO 23 LE=1, 7
      DO 23  I=1, 289
      ZEM(I,LE) = CMPLX(
     1 FILTA* REAL(ZE(I,LE)) + FILTB*( REAL(W(I,LE))+ REAL(ZEM(I,LE))),
     2 FILTA*AIMAG(ZE(I,LE)) + FILTB*(AIMAG(W(I,LE))+AIMAG(ZEM(I,LE))))
23    CONTINUE
      DO 24  I=1, 289
      QM(I) = CMPLX(
     1 FILTA* REAL(Q(I)) + FILTB*( REAL(Z(I))+ REAL(QM(I))),
     2 FILTA*AIMAG(Q(I)) + FILTB*(AIMAG(Z(I))+AIMAG(QM(I))))
24    CONTINUE
      DO 1003 LEV=1, 7
      DO 1003 I=1, 289
      DI(I,LEV)=X(I,LEV)
      TE(I,LEV)=Y(I,LEV)
      ZE(I,LEV)=W(I,LEV)
1003  CONTINUE
      DO 1004 I=1, 289
      Q(I) = Z(I)
1004  CONTINUE
C(DEBUGLINE) VERSION CREATED JULY 8 1982 BY J.SELA,NMC.
      RETURN
      END
