From: W. Trevor King Date: Sat, 6 Nov 2010 13:36:02 +0000 (-0700) Subject: For high K_0, the Bell model's can be negative. Fix pysawsim.test.bell_rate. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=aa39f331d34a515d9104b38bb8e624ff01393ef2;p=sawsim.git For high K_0, the Bell model's can be negative. Fix pysawsim.test.bell_rate. --- diff --git a/pysawsim/test/bell_rate.py b/pysawsim/test/bell_rate.py index b7eb3f6..83ca86d 100644 --- a/pysawsim/test/bell_rate.py +++ b/pysawsim/test/bell_rate.py @@ -146,7 +146,7 @@ def bell_rate(sawsim_runner, num_domains=1, unfolding_rate=1, w = 0.1 * rho # calculate bin width (in force) force_mean = alpha - gamma_e * rho theory = Histogram() - theory.bin_edges = arange(start=0, stop=3*force_mean, step=w) + theory.bin_edges = arange(start=0, stop=max(force_mean,0)+3*rho, step=w) theory.bin_centers = theory.bin_edges[:-1] + w/2 theory.counts = w*num_domains*N*probability_distribution( theory.bin_centers, [alpha, rho])