The implementation of CTI can be shown as: CTI = ln(a / (tan (beta))
where: a = Upland contributing area [(flow accumulation + 1 ) * (cellsize)] and beta is the slope expressed in radians.
Here are the raster algebra steps to calculate CTI:
cellsize = 30
fd = flowdirection(dem)
sca = flowaccumulation(fd)
slope = ( slope(dem) * 1.570796 ) / 90
tan_slp = con( slope > 0, tan(slope), 0.001 )
sca_scaled = ( sca + 1 ) * cellsize
cti = ln ( sca_scaled / tan_slp )