From 3c842a7eb38ae5190925b33507955fa6e31c99c8 Mon Sep 17 00:00:00 2001 From: "Felipe S. S. Schneider" Date: Fri, 3 Dec 2021 15:10:49 -0300 Subject: [PATCH] Adjust maximum time to something more reasonable --- overreact/_cli.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/overreact/_cli.py b/overreact/_cli.py index b64cac58..634a49c6 100644 --- a/overreact/_cli.py +++ b/overreact/_cli.py @@ -616,14 +616,18 @@ def _yield_kinetics(self): factor = y(y.t_max)[active].max() reference = y(y.t_max)[active] / factor - alpha = 0.9 - n_max = np.log(1e-8) / np.log(alpha) + step = 0.9 # multiply by this factor to decrease t_max + n_max = np.log(1e-8) / np.log(step) + + # We plot until concentrations are within this value from the + # final concentrations. + alpha = 0.05 t_max, i = y.t_max, 0 while i < n_max and np.allclose( - y(t_max)[active] / factor, reference, atol=1e-3 + y(t_max)[active] / factor, reference, atol=alpha ): - t_max = alpha * t_max + t_max = step * t_max i += 1 num = 100