def sigma_plateau(dratio, cov=.01): k = gaussian_kde(dratio, cov) result = asscalar(k(0)) * 2 return result / sqrt(2 * pi)
def sigma_plateau(dratio, cov=.01): k = gaussian_kde(dratio, cov) result = asscalar(k(0)) * 2 return result / sqrt(2*pi)
def sigma_peak(dratio, guess=1., cov=.0004): k = gaussian_kde(dratio, cov) peak = asscalar(fmin(lambda x: -k(x), guess, disp=0)) return 1 / erfinv(peak) / sqrt(8)