fixed fitter and model
This commit is contained in:
parent
06a2b217d4
commit
5b630571b3
2
Model.py
2
Model.py
@ -445,5 +445,5 @@ if __name__ == "__main__":
|
|||||||
times = np.arange(0, 1000, 1.0)
|
times = np.arange(0, 1000, 1.0)
|
||||||
|
|
||||||
states, V = model.solve(initial_values=initial_values, tspan=[0, 1000], dt=1.0, times=times)
|
states, V = model.solve(initial_values=initial_values, tspan=[0, 1000], dt=1.0, times=times)
|
||||||
|
|
||||||
model.plot_results(times, states, V)
|
model.plot_results(times, states, V)
|
||||||
|
Binary file not shown.
@ -61,16 +61,13 @@ class Fitter:
|
|||||||
model.K_pc_half = K_pc_half
|
model.K_pc_half = K_pc_half
|
||||||
model.tau_xfer = tau_xfer
|
model.tau_xfer = tau_xfer
|
||||||
|
|
||||||
model.solve(
|
states, V = model.solve(
|
||||||
times=self.time_points,
|
times=self.time_points,
|
||||||
tspan=self.tspan,
|
tspan=self.tspan,
|
||||||
dt=self.dt,
|
dt=self.dt,
|
||||||
initial_values=self.initial_values,
|
initial_values=self.initial_values,
|
||||||
)
|
)
|
||||||
|
|
||||||
states = self.initial_values
|
|
||||||
t = self.time_points
|
|
||||||
V = model.mem_potential(t)
|
|
||||||
_calc_curr = model.calculated_current(states, V)
|
_calc_curr = model.calculated_current(states, V)
|
||||||
calculated_current = (
|
calculated_current = (
|
||||||
self.convolve_current(_calc_curr, tau=tau_RC)[self.current_time_indecies]
|
self.convolve_current(_calc_curr, tau=tau_RC)[self.current_time_indecies]
|
||||||
@ -124,8 +121,8 @@ class Fitter:
|
|||||||
init_parameters,
|
init_parameters,
|
||||||
bounds=bounds,
|
bounds=bounds,
|
||||||
xtol=1e-10,
|
xtol=1e-10,
|
||||||
ftol=1e-12,
|
ftol=1e-10,
|
||||||
verbose=2,
|
# verbose=2,
|
||||||
)
|
)
|
||||||
|
|
||||||
print()
|
print()
|
||||||
|
Loading…
Reference in New Issue
Block a user