Progress - new typeError emerged on a new line

This commit is contained in:
ralf 2024-08-05 13:52:51 +03:00
parent a999da570e
commit f4169b17b8
3 changed files with 3 additions and 2 deletions

View File

@ -318,11 +318,12 @@ class Model:
]
def mem_potential(self, t):
t = np.asarray(t)
v1 = 0
t0 = 100
t1 = 350
n = (t // self.period) * self.period
return v1 if t0 + n <= t < t1 + n else self.V_mem_rest
return np.where((t0 + n <= t) & (t < t1 + n), v1, self.V_mem_rest)
def get_initial_values(self):
Cai_0 = 0.11712 # Cai

Binary file not shown.

View File

@ -69,7 +69,7 @@ class Fitter:
)
states = self.initial_values
t = model.tspan
t = [0, 1000]
V = model.mem_potential(t)
_calc_curr = model.calculated_current(states, t, V)
calculated_current = (