From 42d7e30e7daed3b595e0c1c6730e2039b061805f Mon Sep 17 00:00:00 2001 From: Joseph Timothy Foley Date: Thu, 12 Mar 2026 22:42:54 +0000 Subject: [PATCH] log the stats and AD info --- infocalc.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/infocalc.py b/infocalc.py index 0be12e1..c0668c0 100755 --- a/infocalc.py +++ b/infocalc.py @@ -113,9 +113,10 @@ if args.lowerbound is not None: prob_lower = t.cdf(df=df,x=args.lowerbound, loc=mean, scale=stddev) prob = prob_upper - prob_lower -#print("probability: %f", prob) info = -np.emath.log2(prob) -#print("information content: %f bits", info) +logger.info(f"n={samplesize},df={df},mean={mean},stddev={stddev}") +logger.info(f"P()={prob},I={info} bits") + ## set default fontsize matplotlib.rcParams['font.size']=args.fontsize ## place text on plot: https://matplotlib.org/3.3.4/gallery/recipes/placing_text_boxes.html @@ -149,9 +150,7 @@ if args.lowerbound is not None: if args.upperbound is not None: plt.axvline(args.upperbound, color="red") -plt.plot(x, y, 'b-', label='Normal distribution') -#yt = scipy.stats.t.pdf(x, len(data)-1, mean, stddev) -#plt.plot(x, yt, 'g-', label='T Distribution') +plt.plot(x, y, 'b-', label='T distribution') # Filter for which region to fill coloredregion = x#default fill all