Skip to content

Commit

Permalink
remove debug plots
Browse files Browse the repository at this point in the history
  • Loading branch information
AWehrhahn committed Jun 3, 2021
1 parent be4e499 commit caa31e1
Showing 1 changed file with 26 additions and 26 deletions.
52 changes: 26 additions & 26 deletions src/pysme/solve.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}")

Expand Down

0 comments on commit caa31e1

Please sign in to comment.