       subroutine calt60_62(temp,m,idata,dtype,itype,Upsilon)
c
c  This rutine takes the coefficients in data type 60 and 62 (reals
c  as dtype and integers as itype) and return effective collision
c  strengths according to fits by Callaway (1994).
c  "temp" is the temperature in Kelvin and "m" is the number of
c  reals in dtype. "idata" is the data type either 60 or 62.
c      author: M. Bautista
c
        implicit none
c
c
        integer m
        real dtype(m)
        real temp,Upsilon
        integer itype(m),i,idata
        real t1,de,tmax,tt,rat
c
        t1=temp*6.33652e-6
        if (temp.gt.1.e9) t1=6.33652e+3
        de=1./float(itype(1))**2-1./float(itype(2))**2
        tmax=4.*de
        tmax=1.
        tt=t1
        if (t1.gt.tmax) tt=tmax
        if (idata.eq.60) then
         rat=0.
         do i=1,m-2
          rat=rat+dtype(i+2)*(tt**(i-1))
         enddo
         Upsilon=rat
        else
         rat=0.
         do i=1,m-5
          rat=rat+dtype(i+2)*(tt**(i-1))
         enddo
         Upsilon=rat+dtype(m-2)*log(dtype(m-1)*tt)*exp(-dtype(m)*tt)
        endif
c
         if (t1.gt.tt) then
          upsilon=Upsilon*(1.+log(t1/tmax)/(log(t1/tmax)+1.))
         endif
c
      return
      end
