diff --git a/fitter.py b/fitter.py index deed0eb..c55fc00 100644 --- a/fitter.py +++ b/fitter.py @@ -100,6 +100,7 @@ class Fitter: def optimize(self, init_parameters=None): t0 = time.time() self.iteration = 0 + if init_parameters is None: m = self.model() K_pc_half = m.K_pc_half @@ -119,12 +120,12 @@ class Fitter: ) res = least_squares( - self.cost_func, - init_parameters, - bounds=bounds, + self.cost_func, + init_parameters, + bounds=bounds, xtol=1e-10, - ftol=1e-12, - verbose=2 + ftol=1e-12, + verbose=2, ) print()