def lnlike(theta, x, y, yerr):
    mod = model(x, theta)
    inv_sigma2 = (1 / (yerr ** 2))
    return ((- 0.5) * np.sum((((y - mod) ** 2) * inv_sigma2)))
def lnlike(theta, x, y, yerr):
    mod = model(x, theta)
    inv_sigma2 = (1 / (yerr ** 2))
    return ((- 0.5) * np.sum((((y - mod) ** 2) * inv_sigma2)))