From caa31e13b27432b3858e28568710939d91d7b7a5 Mon Sep 17 00:00:00 2001 From: Ansgar Wehrhahn <31626864+AWehrhahn@users.noreply.github.com> Date: Thu, 3 Jun 2021 14:21:11 +0200 Subject: [PATCH] remove debug plots --- src/pysme/solve.py | 52 +++++++++++++++++++++++----------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/src/pysme/solve.py b/src/pysme/solve.py index c35f038a..9c82e40a 100644 --- a/src/pysme/solve.py +++ b/src/pysme/solve.py @@ -431,32 +431,32 @@ def std(mu, alpha): sigma_estimate = std(*sopt) freep_unc[i] = sigma_estimate - # Debug plots - import matplotlib.pyplot as plt - - # Plot 1 (cumulative distribution) - r = (sopt[0] - 20 * sopt[1], sopt[0] + 20 * sopt[1]) - x = np.linspace(ch_x.min(), ch_x.max(), ch_x.size * 10) - plt.plot(ch_x, ch_y, "+", label="measured") - plt.plot(x, cdf(x, *sopt), label="fit") - plt.xlabel(freep_name[i]) - plt.ylabel("cumulative probability") - plt.show() - # Plot 2 (density distribution) - x = np.linspace(r[0], r[-1], ch_x.size * 10) - plt.hist( - ch_x, - bins="auto", - density=True, - histtype="step", - range=r, - label="measured", - ) - plt.plot(x, norm.pdf(x, loc=sopt[0], scale=sopt[1]), label="fit") - plt.xlabel(freep_name[i]) - plt.ylabel("probability") - plt.xlim(r) - plt.show() + # # Debug plots + # import matplotlib.pyplot as plt + + # # Plot 1 (cumulative distribution) + # r = (sopt[0] - 20 * sopt[1], sopt[0] + 20 * sopt[1]) + # x = np.linspace(ch_x.min(), ch_x.max(), ch_x.size * 10) + # plt.plot(ch_x, ch_y, "+", label="measured") + # plt.plot(x, cdf(x, *sopt), label="fit") + # plt.xlabel(freep_name[i]) + # plt.ylabel("cumulative probability") + # plt.show() + # # Plot 2 (density distribution) + # x = np.linspace(r[0], r[-1], ch_x.size * 10) + # plt.hist( + # ch_x, + # bins="auto", + # density=True, + # histtype="step", + # range=r, + # label="measured", + # ) + # plt.plot(x, norm.pdf(x, loc=sopt[0], scale=sopt[1]), label="fit") + # plt.xlabel(freep_name[i]) + # plt.ylabel("probability") + # plt.xlim(r) + # plt.show() logger.debug(f"{freep_name[i]}: {hmed}, {sigma_estimate}")