Standardize max step calculation and fit-parameter requirements in pysawsim.test.
[sawsim.git] / pysawsim / test / bell_rate.py
index 19119004244b34fcc3e74668d1d829df1587b836..f54243368dd7cf0d8de6e13ad726fbfe4faffda7 100644 (file)
@@ -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 < 3, (
+        assert abs(s - t)/w < 3, (
             'simulation %s = %g != %g = %s (bin width = %g)' % (n,s,t,n,w))
     return sim.residual(theory)