Commit abb37cfd authored by Stephen Privitera's avatar Stephen Privitera

fudge factor to avoid log(0)

Original: c14e51b293a1459bf5c29e4837146bc3f17f05a1
parent 1c94041a
......@@ -412,7 +412,7 @@ fig.savefig(name+"_match_vs_tmpltM_vs_tmpltchi.png")
fig = Figure()
ax = fig.add_axes((0.1, 0.1, 0.85, 0.85), xscale="log", yscale="log")
count, bin_edges = np.histogram(np.log(1 - match), bins=40)
count, bin_edges = np.histogram(np.log(1 - match + 1e-5), bins=40) # fudge factor to avoid log(0)
bin_centers = np.exp(-(bin_edges[:-1] * bin_edges[1:])**0.5)
ax.plot(bin_centers, count, linewidth=2.5)
ax.plot((1 - min_match, 1 - min_match), (1, 10**ceil(log10(count.max()))), "k--")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment