Progress free coding
This commit is contained in:
parent
f4169b17b8
commit
13033f6936
6
Model.py
6
Model.py
@ -362,7 +362,10 @@ class Model:
|
|||||||
)
|
)
|
||||||
r.set_initial_value(initial_values, times[0])
|
r.set_initial_value(initial_values, times[0])
|
||||||
|
|
||||||
states = np.array([[0.0] * times.size] * len(initial_values))
|
#states = np.array([[0.0] * times.size] * len(initial_values))
|
||||||
|
#states[:, 0] = initial_values
|
||||||
|
|
||||||
|
states = np.zeros((len(initial_values), times.size))
|
||||||
states[:, 0] = initial_values
|
states[:, 0] = initial_values
|
||||||
|
|
||||||
for i, t in enumerate(times[1:]):
|
for i, t in enumerate(times[1:]):
|
||||||
@ -414,6 +417,7 @@ class Model:
|
|||||||
ax4.set_ylabel(r"$\mu mol/3l$")
|
ax4.set_ylabel(r"$\mu mol/3l$")
|
||||||
|
|
||||||
plt.show()
|
plt.show()
|
||||||
|
return states, V
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
Binary file not shown.
@ -149,7 +149,12 @@ 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(times=self.time_points)
|
states, V = model.solve(
|
||||||
|
initial_values=self.initial_values,
|
||||||
|
tspan=self.tspan,
|
||||||
|
dt=self.dt,
|
||||||
|
times=self.time_points
|
||||||
|
)
|
||||||
|
|
||||||
_calc_curr = model.calculated_current()
|
_calc_curr = model.calculated_current()
|
||||||
calculated_current = self.convolve_current(_calc_curr, tau=tau_RC) + offset
|
calculated_current = self.convolve_current(_calc_curr, tau=tau_RC) + offset
|
||||||
|
Loading…
Reference in New Issue
Block a user