diff --git a/Model.py b/Model.py index aba81de..028c7d7 100644 --- a/Model.py +++ b/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() diff --git a/__pycache__/Model.cpython-311.pyc b/__pycache__/Model.cpython-311.pyc index 8493062..9f31ab1 100644 Binary files a/__pycache__/Model.cpython-311.pyc and b/__pycache__/Model.cpython-311.pyc differ diff --git a/fitter.py b/fitter.py index 17b3832..9d6f4ec 100644 --- a/fitter.py +++ b/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()