From aa39f331d34a515d9104b38bb8e624ff01393ef2 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Sat, 6 Nov 2010 06:36:02 -0700 Subject: [PATCH] For high K_0, the Bell model's can be negative. Fix pysawsim.test.bell_rate. --- pysawsim/test/bell_rate.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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]) -- 2.26.2