Added current, failed to make it work, new error to be fixed found
This commit is contained in:
parent
d825cdc811
commit
7d6124752b
5
Model.py
5
Model.py
@ -348,8 +348,9 @@ class Model:
|
||||
FCa_0, # FCa
|
||||
]
|
||||
|
||||
def calculated_current(self):
|
||||
return
|
||||
def calculated_current(self, states, t, V):
|
||||
ICaL = self.gCaL * states[1, :] * (V - self.ECaL)
|
||||
return ICaL
|
||||
|
||||
def solve(self, initial_values, tspan, dt, times):
|
||||
times = np.arange(*tspan, dt)
|
||||
|
Binary file not shown.
@ -42,7 +42,7 @@ class Fitter:
|
||||
return current
|
||||
|
||||
k = np.zeros(current.size)
|
||||
k[k.size // 2 :] = np.exp(-np.arange(k.size // 2) / np.abs(tau))
|
||||
k[k.size // 2:] = np.exp(-np.arange(k.size // 2) / np.abs(tau))
|
||||
k /= k.sum()
|
||||
|
||||
if tau > 0:
|
||||
@ -68,7 +68,10 @@ class Fitter:
|
||||
initial_values=self.initial_values
|
||||
)
|
||||
|
||||
_calc_curr = model.calculated_current()
|
||||
states = self.initial_values
|
||||
V = model.mem_potential(t)
|
||||
t = self.tspan
|
||||
_calc_curr = model.calculated_current(states, t, V)
|
||||
calculated_current = (
|
||||
self.convolve_current(_calc_curr, tau=tau_RC)[self.current_time_indecies]
|
||||
+ offset
|
||||
|
Loading…
Reference in New Issue
Block a user