      SUBROUTINE KMIXUP (BN,BNF,RT,AIT)
C *** SEE R H LANDAU, PROGRAM LPOTT, 1981
      IMPLICIT  REAL*8   (A-H,O-Z)
      DIMENSION BN(16), BNF(16), T(28), RT(14), AIT(14)
C
C     FORM PARTIAL WAVE DECOMPOSITON OF K+P, L+N AMPLI-
C     TUDES. NON FLIP SP,PP,PN ...ETC P:PROTON,N: NETRON
C     CODE FOR BN,BNF
C     ALL FOR K PLUS
C     1 RE S,P    2 IM S,P    3 RE S,N   4 IM S,N
C     5 RE P,P    6 IM P,P    7 RE P,N   8 IM P,N
C     9 RE D,P   10 IM D,P   11 RE D,N  12 IM D,N
C     13RE F,P  14 IM F,P    15 RE F,N   16 IM F,N
C     SPIN NON-FLIP
      DO 10 N=1,14
         NODD = 2*N-1
         NEVEN = 2*N
         T(NODD) = RT(N)
         T(NEVEN) = AIT(N)
 10   CONTINUE
      BN(1) = T(1)
      BN(2) = T(2)
      BN(3) = (T(1)+T(7))/2.
      BN(4) = (T(2)+T(8))/2.
      BN(5) = (2.*T(5))+T(3)
      BN(6) = 2.*T(6)+T(4)
      BN(7) = ((2.*T(5))+T(3)+(2.*T(11))+T(9))/2.
      BN(8) = ((2.*T(6))+T(4)+(2.*T(12))+T(10))/2.
      BN(9) = 3.*T(15)+2.*T(13)
      BN(10) = 3.*T(16)+2.*T(14)
      BN(11) = ((3.*T(15))+(2.*T(13))+(3.*T(21))+(2.*T(19)))/2.
      BN(12) = ((3.*T(16))+(2.*T(14))+(3.*T(22))+(2.*T(20)))/2.
      BN(13) = 3.*T(17)
      BN(14) = 3.*T(18)
      BN(15) = ((3.*T(17))+(3.*T(23)))/2.
      BN(16) = ((3.*T(18))+(3.*T(24)))/2.
C     SPIN FLIP SAME ORDER AS ABOVE
      BNF(1) = 0.
      BNF(2) = 0.
      BNF(3) = 0.
      BNF(4) = 0.
      BNF(5) = T(5)-T(3)
      BNF(6) = T(6)-T(4)
      BNF(7) = (T(5)-T(3)+T(11)-T(9))/2.
      BNF(8) = (T(6)-T(4)+T(12)-T(10))/2.
      BNF(9) = T(15)-T(13)
      BNF(10) = T(16)-T(14)
      BNF(11) = (T(15)-T(13)+T(21)-T(19))/2.
      BNF(12) = (T(16)-T(14)+T(22)-T(20))/2.
      BNF(13) = -T(17)
      BNF(14) = -T(18)
      BNF(15) = (-T(17)-T(23))/2.
      BNF(16) = (-T(18)-T(24))/2.
      RETURN
      END
