def emcee_schmidt(x, y, yerr, pos=None, pose=None, nwalkers=None, nsteps=None, burnin=200, verbose=True):
    '\n    emcee_schmidt provides a convenient wrapper for fitting the schimdt law\n    to binned x,log(y) data. Generally, it fits a normalization and a slope\n    '

    def model(x, theta):
        '\n        theta = (beta, kappa)\n        '
        return np.log(schmidt_law(x, theta))

    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 lnprior(theta):
        if (len(theta) == 3):
            (beta, kappa, Ak0) = theta
            c3 = (0.0 < Ak0 <= 5.0)
            c4 = True
        else:
            (beta, kappa) = theta
            c3 = True
            c4 = True
        c1 = (0 <= beta <= 6)
        c2 = (0 <= kappa)
        if (c1 and c2 and c3 and c4):
            return 0.0
        return (- np.inf)

    def lnprob(theta, x, y, yerr):
        lp = lnprior(theta)
        if (not np.isfinite(lp)):
            return (- np.inf)
        return (lp + lnlike(theta, x, y, yerr))
    (ndim, nwalkers) = (len(pos), nwalkers)
    pos = [(np.array(pos) + ((np.array(pose) * 0.5) * (0.5 - np.random.rand(ndim)))) for i in range(nwalkers)]
    sampler = emcee.EnsembleSampler(nwalkers, ndim, lnprob, args=(x, y, yerr))
    sampler.run_mcmc(pos, nsteps)
    samples = sampler.chain[:, burnin:, :].reshape(((- 1), sampler.ndim))
    theta_mcmc = np.percentile(samples, [16, 50, 84], axis=0).T
    if verbose:
        print(sampler.acor)
    if verbose:
        for (i, item) in enumerate(theta_mcmc):
            j = ['beta', 'kappa', 'A_{K,0}', 'A_{K,f}']
            inserts = (j[i], item[1], (item[2] - item[1]), (item[1] - item[0]))
            print(('%s = %0.2f (+%0.2f,-%0.2f)' % inserts))
    return (sampler, np.median(samples, axis=0), np.std(samples, axis=0))
emcee_schmidt provides a convenient wrapper for fitting the schimdt law
to binned x,log(y) data. Generally, it fits a normalization and a slope
def emcee_schmidt(x, y, yerr, pos=None, pose=None, nwalkers=None, nsteps=None, burnin=200, verbose=True):
    '\n    emcee_schmidt provides a convenient wrapper for fitting the schimdt law\n    to binned x,log(y) data. Generally, it fits a normalization and a slope\n    '

    def model(x, theta):
        '\n        theta = (beta, kappa)\n        '
        return np.log(schmidt_law(x, theta))

    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 lnprior(theta):
        if (len(theta) == 3):
            (beta, kappa, Ak0) = theta
            c3 = (0.0 < Ak0 <= 5.0)
            c4 = True
        else:
            (beta, kappa) = theta
            c3 = True
            c4 = True
        c1 = (0 <= beta <= 6)
        c2 = (0 <= kappa)
        if (c1 and c2 and c3 and c4):
            return 0.0
        return (- np.inf)

    def lnprob(theta, x, y, yerr):
        lp = lnprior(theta)
        if (not np.isfinite(lp)):
            return (- np.inf)
        return (lp + lnlike(theta, x, y, yerr))
    (ndim, nwalkers) = (len(pos), nwalkers)
    pos = [(np.array(pos) + ((np.array(pose) * 0.5) * (0.5 - np.random.rand(ndim)))) for i in range(nwalkers)]
    sampler = emcee.EnsembleSampler(nwalkers, ndim, lnprob, args=(x, y, yerr))
    sampler.run_mcmc(pos, nsteps)
    samples = sampler.chain[:, burnin:, :].reshape(((- 1), sampler.ndim))
    theta_mcmc = np.percentile(samples, [16, 50, 84], axis=0).T
    if verbose:
        print(sampler.acor)
    if verbose:
        for (i, item) in enumerate(theta_mcmc):
            j = ['beta', 'kappa', 'A_{K,0}', 'A_{K,f}']
            inserts = (j[i], item[1], (item[2] - item[1]), (item[1] - item[0]))
            print(('%s = %0.2f (+%0.2f,-%0.2f)' % inserts))
    return (sampler, np.median(samples, axis=0), np.std(samples, axis=0))