From 85c519ce9560efa01a4bcb72c65ed3d9c689b6ea Mon Sep 17 00:00:00 2001 From: ralf Date: Mon, 12 Aug 2024 14:05:54 +0300 Subject: [PATCH] reverted tomfoolery --- fitter.py | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/fitter.py b/fitter.py index 9d6f4ec..9fe4bc9 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) @@ -226,5 +226,3 @@ if __name__ == "__main__": # fig.savefig(f"{plot_filename}.png") # fig.savefig(f"{plot_filename}.pdf") fig.savefig("naidis_fit.pdf") - #matplotlib.pyplot.close() - #fig = plt.figure()