From 108ff450ddb8d49ce84fc898a4ae0559af57488b Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Sat, 6 Nov 2010 07:30:39 -0700 Subject: [PATCH] Wider bins and weaker comparisons allow bell_rate to pass doctests. --- pysawsim/test/bell_rate.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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) -- 2.26.2