From 5b630571b3f8b9ea7a48acb0347b7c2e048727b1 Mon Sep 17 00:00:00 2001 From: ralf Date: Mon, 19 Aug 2024 14:52:18 +0300 Subject: [PATCH] fixed fitter and model --- Model.py | 2 +- __pycache__/Model.cpython-311.pyc | Bin 15857 -> 15857 bytes fitter.py | 9 +++------ 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/Model.py b/Model.py index 96abee5..ab154b2 100644 --- a/Model.py +++ b/Model.py @@ -445,5 +445,5 @@ if __name__ == "__main__": times = np.arange(0, 1000, 1.0) states, V = model.solve(initial_values=initial_values, tspan=[0, 1000], dt=1.0, times=times) - + model.plot_results(times, states, V) diff --git a/__pycache__/Model.cpython-311.pyc b/__pycache__/Model.cpython-311.pyc index 9ac3eb2c988c51354f73848d1d87c092bc168cab..7f57843bd7ed945c72a84542ccb470f1978b47d2 100644 GIT binary patch delta 22 ccmexZ{jr*NIWI340}$j(?M^e=$os?=09zUdYybcN delta 22 ccmexZ{jr*NIWI340}$Ne*_~##k@tx$0A7Iy%>V!Z diff --git a/fitter.py b/fitter.py index c55fc00..9233880 100644 --- a/fitter.py +++ b/fitter.py @@ -61,16 +61,13 @@ class Fitter: model.K_pc_half = K_pc_half model.tau_xfer = tau_xfer - model.solve( + states, V = model.solve( times=self.time_points, tspan=self.tspan, dt=self.dt, initial_values=self.initial_values, ) - states = self.initial_values - t = self.time_points - V = model.mem_potential(t) _calc_curr = model.calculated_current(states, V) calculated_current = ( self.convolve_current(_calc_curr, tau=tau_RC)[self.current_time_indecies] @@ -124,8 +121,8 @@ class Fitter: init_parameters, bounds=bounds, xtol=1e-10, - ftol=1e-12, - verbose=2, + ftol=1e-10, + # verbose=2, ) print()