From: W. Trevor King Date: Sat, 6 Nov 2010 14:30:39 +0000 (-0700) Subject: Wider bins and weaker comparisons allow bell_rate to pass doctests. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=108ff450ddb8d49ce84fc898a4ae0559af57488b;p=sawsim.git Wider bins and weaker comparisons allow bell_rate to pass doctests. --- diff --git a/pysawsim/test/bell_rate.py b/pysawsim/test/bell_rate.py index b002a9a..1911900 100644 --- a/pysawsim/test/bell_rate.py +++ b/pysawsim/test/bell_rate.py @@ -152,7 +152,7 @@ def bell_rate(sawsim_runner, num_domains=1, unfolding_rate=1, loading_rate = float(spring_constant * velocity) rho = kB * temperature / unfolding_distance alpha = rho * log(loading_rate / (unfolding_rate * rho)) - w = 0.1 * rho # calculate bin width (in force) + w = 0.2 * rho # calculate bin width (in force) force_mean = alpha - gamma_e * rho theory = Histogram() theory.bin_edges = arange(start=0, stop=max(force_mean,0)+3*rho, step=w) @@ -179,7 +179,7 @@ def bell_rate(sawsim_runner, num_domains=1, unfolding_rate=1, sim_alpha = params[0] sim_rho = abs(params[1]) for s,t,n in [(sim_alpha, alpha, 'alpha'), (sim_rho, rho, 'rho')]: - assert (s - t)/w < 2, ( + assert (s - t)/w < 3, ( 'simulation %s = %g != %g = %s (bin width = %g)' % (n,s,t,n,w)) return sim.residual(theory)