TypeError replaced with IndexError
This commit is contained in:
parent
0824b0c4fe
commit
30289b5744
4
Model.py
4
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)
|
||||
|
BIN
__pycache__/Data.cpython-311.pyc
Normal file
BIN
__pycache__/Data.cpython-311.pyc
Normal file
Binary file not shown.
BIN
__pycache__/Model.cpython-311.pyc
Normal file
BIN
__pycache__/Model.cpython-311.pyc
Normal file
Binary file not shown.
@ -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 = (
|
||||
|
Loading…
Reference in New Issue
Block a user