c/* %W%      latest revision %G% %U% */
      subroutine COSTAP (ast, lel)
************************************************************************

c *** M.J. Paez, R.H. Landau, and M.E. Sagen

c *** Coefficients according to Stapp, Ypsilantis, and Metropolis
c *** Phys Rev 105 (1957)

c *** lel = 1 + l
c *** Code  a(i,j)  i = 1 m11, 2: m00, 3: mo1, 4: m10, 5: m1-1
c ***               j = 1 al,l+1, 2: al,l, 3: al,l-1, 4: al+1, 5:al-1

      implicit real*8 (a-h, o-z)

      dimension ast(5,5)

c >>> FIRST EXECUTABLE STATEMENT <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

      sr2 = sqrt( 2. )
      al   = lel - 1
      al1  = al + 1
      al2  = al + 2
      alm1 = al - 1
      tal1 = 2. * al + 1.
      th1  = 1.
      if (alm1 .lt. 0.) th1 = 0.
      alm1 = alm1 * th1
      ast(1,1) = al2/4.
      ast(1,2) = tal1/4.
      ast(1,3) = alm1/4.
      prod1 = al1 * al2
      ast(1,4) = -0.25 * sqrt( prod1 )
      prod3 = al * al1
      prod2 = al * alm1
      ast(1,5) = -0.25 * sqrt( prod2 )
      ast(2,1) = al1/2.
      ast(2,2) = 0.
      ast(2,3) = al/2.
      ast(2,4) = 0.5 * sqrt( prod1 )
      ast(2,5) = 0.5 * sqrt( prod2 )
      ast(3,1) = -sr2 * al2/al1/4.
      ast(3,2) = 0.
      if (prod3 .gt. 0.) ast(3,2) = sr2 * tal1/prod3/4.
      ast(3,3) = 0.
      if (al .gt. 0.) ast(3,3) = sr2 * alm1/al/4.
      ast(3,4) = 0.
      if (al1 .gt. 0.) ast(3,4) = sr2 * sqrt( al2 )/4./sqrt( al1 )
      ast(3,5) = 0.
      if ((al .gt. 0.) .AND. alm1 .ge. 0.) then
         ast(3,5) = -0.25 * sr2 * sqrt( alm1 )/sqrt( al )
      endif
      ast(4,1) = sr2/4.
      ast(4,2) = 0.
*************** tm amps 9/13/91 below*****
      ast(4,3) = -sr2/4.
      ast(4,4) = ast(3,4)
      ast(4,5) = ast(3,5)
      ast(5,1) = 1./4./al1
      ast(5,2) = 0.
      if (al .gt. 0) ast(5,2) = -tal1/al1/al/4.
      ast(5,3) = 0.
      if (al .gt. 0.) ast(5,3) = 0.25/al
      ast(5,4) = -0.25/sqrt( al1 )/sqrt( al2 )
      ast(5,5) = 0.
      if ((alm1 .gt. 0.) .AND. (al .gt. 0.)) then
         ast(5,5) = -0.25/sqrt( al )/sqrt( alm1 )
      endif
      RETURN
      end
