From d428e9ee60411566fefc0e0706960856dc300dc4 Mon Sep 17 00:00:00 2001 From: "r.jaepel" Date: Sat, 2 Dec 2023 13:28:04 +0100 Subject: [PATCH] Fix bad initial value for Yamamoto method Change initial value from the automatic middle of the boundary space (500 & 500) to (1, 1), as an initial value of 500 can lead to numerical errors. --- CADETProcess/tools/yamamoto.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CADETProcess/tools/yamamoto.py b/CADETProcess/tools/yamamoto.py index e55ba72c..26b1952c 100644 --- a/CADETProcess/tools/yamamoto.py +++ b/CADETProcess/tools/yamamoto.py @@ -255,7 +255,7 @@ def yamamoto_wrapper(c_s, nu, k_eq): return yamamoto_equation(c_s, lambda_, nu, k_eq) results, pcov = curve_fit( - yamamoto_wrapper, log_c_salt_at_max_M, log_gradient_slope, bounds=bounds + yamamoto_wrapper, log_c_salt_at_max_M, log_gradient_slope, bounds=bounds, p0=(1, 1) ) return results