Progress - new typeError emerged on a new line
This commit is contained in:
parent
a999da570e
commit
f4169b17b8
3
Model.py
3
Model.py
@ -318,11 +318,12 @@ class Model:
|
|||||||
]
|
]
|
||||||
|
|
||||||
def mem_potential(self, t):
|
def mem_potential(self, t):
|
||||||
|
t = np.asarray(t)
|
||||||
v1 = 0
|
v1 = 0
|
||||||
t0 = 100
|
t0 = 100
|
||||||
t1 = 350
|
t1 = 350
|
||||||
n = (t // self.period) * self.period
|
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):
|
def get_initial_values(self):
|
||||||
Cai_0 = 0.11712 # Cai
|
Cai_0 = 0.11712 # Cai
|
||||||
|
Binary file not shown.
@ -69,7 +69,7 @@ class Fitter:
|
|||||||
)
|
)
|
||||||
|
|
||||||
states = self.initial_values
|
states = self.initial_values
|
||||||
t = model.tspan
|
t = [0, 1000]
|
||||||
V = model.mem_potential(t)
|
V = model.mem_potential(t)
|
||||||
_calc_curr = model.calculated_current(states, t, V)
|
_calc_curr = model.calculated_current(states, t, V)
|
||||||
calculated_current = (
|
calculated_current = (
|
||||||
|
Loading…
Reference in New Issue
Block a user