import math


def make_jc_matrix(t, a=1.):
    """
    Returns Juke Cantor transition matrix

    t -- time span
    a -- mutation rate (sub/site/time)
    """
    eat = math.exp(-4*a/3.*t)
    r =  .25 * (1 + 3*eat)
    s =  .25 * (1 - eat)

    return [[r, s, s, s],
            [s, r, s, s],
            [s, s, r, s],
            [s, s, s, r]]