Example #1
0
]
for vect in vals:
    vect /= vect.std()

labels = [
    r'$\mathcal{R}, n=2000$, Poisson',
    r'$\mathcal{R}, n=10000$, Poisson',
    r'$\mathcal{R}, n=2000$, PDF',
    r'$\mathcal{R}, n=10000$, PDF',
    r'$\mathcal{I}, n=2000$, Poisson',
    r'$\mathcal{I}, n=10000$, Poisson',
    r'$\mathcal{I}, n=2000$, PDF',
    r'$\mathcal{I}, n=10000$, PDF',
]

#bins = np.linspace(-0.003, 0.003, 61)

bins = np.linspace(-5, 5, 101)
curve_pts = np.linspace(-5, 5, 1001)

gauss_vals = stats.norm.pdf(curve_pts) * re_alm_2000.size / 10.
o_dict = figs.plot_hists("alm", bins, vals, labels=labels)
axes = o_dict['axes']
axes.plot(curve_pts, gauss_vals, 'b-', label="Unit Normal")

testfigpath = os.path.join(Defaults.NUXGAL_PLOT_DIR, 'test')
testfigfile = os.path.join(testfigpath, 'alm_distrib')
Utilityfunc.makedir_safe(testfigfile)

figs.save_all(testfigfile, 'pdf')
Example #2
0
w_cross_150_2000 = w_cross_2000
w_cross_150_10000 = w_cross_10000
w_cross_150_syn_2000 = w_cross_syn_2000
w_cross_150_syn_10000 = w_cross_syn_10000

vals = [
    w_cross_150_2000, w_cross_150_10000, w_cross_150_syn_2000,
    w_cross_150_syn_10000
]
for vect in vals:
    vect /= vect.std(0)

labels = [
    r'$n=2000$, Poisson', r'$n=10000$, Poisson', r'$n=2000$, PDF',
    r'$n=10000$, PDF'
]

bins = np.linspace(-5, 5, 101)
curve_pts = np.linspace(-5, 5, 1001)

gauss_vals = stats.norm.pdf(curve_pts) * w_cross_150_2000.size / 10.
o_dict = figs.plot_hists("w_cross", bins, vals, labels=labels)
axes = o_dict['axes']
axes.plot(curve_pts, gauss_vals, 'b-', label="Unit Normal")

testfigpath = os.path.join(Defaults.NUXGAL_PLOT_DIR, 'test')
testfigfile = os.path.join(testfigpath, 'cl_distrib')
Utilityfunc.makedir_safe(testfigfile)

figs.save_all(testfigfile, 'pdf')