no idea how to stop it from plotting too many plots
This commit is contained in:
parent
4bebf2fece
commit
02bcffbe63
2
Model.py
2
Model.py
@ -465,4 +465,4 @@ if __name__ == "__main__":
|
||||
FCa_0, # FCa
|
||||
]
|
||||
model.solve(initial_values=initial_values, tspan=[0, 1000], dt=1.0, times=None)
|
||||
plt.show()
|
||||
#plt.show()
|
||||
|
Binary file not shown.
29
fitter.py
29
fitter.py
@ -82,18 +82,18 @@ class Fitter:
|
||||
self.iteration += 1
|
||||
print(self.iteration, parameters.tolist(), "err", err)
|
||||
|
||||
if self.iteration < -0:
|
||||
t = self.time_points[self.current_time_indecies]
|
||||
plt.plot(
|
||||
t, _calc_curr[self.current_time_indecies], label="calculated current"
|
||||
)
|
||||
plt.plot(t, self.measured_current, label="measured current")
|
||||
plt.plot(t, calculated_current, label="conv calculated current")
|
||||
plt.plot(t, self.measured_current - calculated_current, label="error")
|
||||
plt.xlabel("time, ms")
|
||||
plt.ylabel("current, pA/pF")
|
||||
plt.legend(frameon=False)
|
||||
plt.show()
|
||||
# if self.iteration < -0:
|
||||
# t = self.time_points[self.current_time_indecies]
|
||||
# plt.plot(
|
||||
# t, _calc_curr[self.current_time_indecies], label="calculated current"
|
||||
# )
|
||||
# plt.plot(t, self.measured_current, label="measured current")
|
||||
# plt.plot(t, calculated_current, label="conv calculated current")
|
||||
# plt.plot(t, self.measured_current - calculated_current, label="error")
|
||||
# plt.xlabel("time, ms")
|
||||
# plt.ylabel("current, pA/pF")
|
||||
# plt.legend(frameon=False)
|
||||
# plt.show()
|
||||
|
||||
return res # , measured_fluo - calculated_fluo)
|
||||
|
||||
@ -156,7 +156,7 @@ class Fitter:
|
||||
times=self.time_points,
|
||||
)
|
||||
|
||||
_calc_curr = model.calculated_current()
|
||||
_calc_curr = model.calculated_current(states, V)
|
||||
calculated_current = self.convolve_current(_calc_curr, tau=tau_RC) + offset
|
||||
print("Elapsed time:", time.time() - t0)
|
||||
|
||||
@ -226,4 +226,5 @@ if __name__ == "__main__":
|
||||
# fig.savefig(f"{plot_filename}.png")
|
||||
# fig.savefig(f"{plot_filename}.pdf")
|
||||
fig.savefig("naidis_fit.pdf")
|
||||
plt.show()
|
||||
#matplotlib.pyplot.close()
|
||||
#fig = plt.figure()
|
||||
|
Loading…
Reference in New Issue
Block a user