diff --git a/Model.py b/Model.py index b076230..d14e346 100644 --- a/Model.py +++ b/Model.py @@ -332,7 +332,7 @@ class Model: n = (t // self.period) * self.period return v1 if t0 + n <= t < t1 + n else self.V_mem_rest - def solve(self, initial_values, tspan, dt): + def solve(self, initial_values, tspan, dt, times): times = np.arange(*tspan, dt) r = ode(self.ode_system) @@ -425,4 +425,4 @@ if __name__ == "__main__": Cai_0, # Cai FCa_0, # FCa ] - model.solve(initial_values=initial_values, tspan=[0, 1000], dt=1.0) + model.solve(initial_values=initial_values, tspan=[0, 1000], dt=1.0, times=None) diff --git a/__pycache__/Data.cpython-311.pyc b/__pycache__/Data.cpython-311.pyc new file mode 100644 index 0000000..571dfd5 Binary files /dev/null and b/__pycache__/Data.cpython-311.pyc differ diff --git a/__pycache__/Model.cpython-311.pyc b/__pycache__/Model.cpython-311.pyc new file mode 100644 index 0000000..36fb931 Binary files /dev/null and b/__pycache__/Model.cpython-311.pyc differ diff --git a/fitter.py b/fitter.py index 7c82ca3..3b1f4c7 100644 --- a/fitter.py +++ b/fitter.py @@ -23,6 +23,7 @@ class Fitter: self.fit_results = {} self.tspan = [0, 1000] + self.initial_values=[] self.dt = 1 # 1.0 self.time_points = np.arange(*self.tspan, self.dt) @@ -58,7 +59,7 @@ class Fitter: model.K_pc_half = K_pc_half model.tau_xfer = tau_xfer - model.solve(times=self.time_points) + model.solve(times=self.time_points, tspan=self.tspan, dt=self.dt, initial_values=self.initial_values) _calc_curr = model.calculated_current() calculated_current = (