From 24dc183465b7a5acb8d13875706a9461b969c7ed Mon Sep 17 00:00:00 2001 From: shivesh Date: Wed, 26 Jun 2019 11:23:25 -0500 Subject: Wed 26 Jun 11:23:25 CDT 2019 --- austin.py | 55 +++++++++++++++++++++++-------------------------------- misc/command | 2 +- utils/plot.py | 2 +- 3 files changed, 25 insertions(+), 34 deletions(-) diff --git a/austin.py b/austin.py index cddbed1..726a762 100755 --- a/austin.py +++ b/austin.py @@ -101,57 +101,48 @@ def main(): print n_params # Data + prefix = 'austin' # data_path = '/home/aschneider/programs/GOLEMSPACE/sources/GolemFit/scripts/diffuse/mcmcs/results/dpl_numu_prior_flavor_20190302-162221-a747f528-8aa6-4488-8c80-059572c099fe.json' - data_path = '/home/aschneider/programs/GOLEMSPACE/sources/GolemFit/scripts/diffuse/mcmcs/results/spl_flavor_20190311-170924-5297d736-3c6e-447f-8de7-4a0653a51bb6.json' + # data_path = '/home/aschneider/programs/GOLEMSPACE/sources/GolemFit/scripts/diffuse/mcmcs/results/spl_flavor_20190311-170924-5297d736-3c6e-447f-8de7-4a0653a51bb6.json' + data_path = '/home/aschneider/programs/GOLEMSPACE/sources/GolemFit/scripts/diffuse/mcmcs/results/spl_flavor_20190420-161513-524f1731-0bcb-49e3-a2ea-ff3c69b4e53c.json' with open(data_path) as f: d_json = json.load(f) - names = d_json['func_args'] chains = np.array(d_json['chain']) print 'names', names print 'chains.shape', chains.shape - flavour_angles = chains[:,4:6] flavour_ratios = np.array( map(fr_utils.angles_to_fr, flavour_angles) ) + # # Load HESE contour. + # prefix = 'shivesh' + # contour_infile = '/data/user/smandalia/flavour_ratio/data/contour/contour_REAL.npy' + # contour_angles = np.load(contour_infile)[:,-2:] + # flavour_ratios = np.array(map(fr_utils.angles_to_fr, contour_angles)) + nbins = 25 + ax_labels = [r'$f_{e}^{\oplus}$', r'$f_{\mu}^{\oplus}$', r'$f_{\tau}^{\oplus}$'] fig = plt.figure(figsize=(8, 8)) ax = fig.add_subplot(111) - tax = plot_utils.get_tax(ax, scale=nbins) - - plot_utils.flavour_contour( - frs = flavour_ratios, - ax = ax, - nbins = nbins, - coverage = 99, - linewidth = 2, - color = 'green' - ) - - plot_utils.flavour_contour( - frs = flavour_ratios, - ax = ax, - nbins = nbins, - coverage = 90, - linewidth = 2, - color = 'blue' - ) - - plot_utils.flavour_contour( - frs = flavour_ratios, - ax = ax, - nbins = nbins, - coverage = 68, - linewidth = 2, - color = 'red' - ) + tax = plot_utils.get_tax(ax, scale=nbins, ax_labels=ax_labels) + + levels = [10, 20, 40, 60, 68, 80, 90, 99] + for l in levels: + plot_utils.flavour_contour( + frs = flavour_ratios, + ax = ax, + nbins = nbins, + coverage = l, + linewidth = 2, + # color = 'green' + ) ax.legend() - fig.savefig('test_austin.png', bbox_inches='tight', dpi=150) + fig.savefig('contour_{0}.png'.format(prefix), bbox_inches='tight', dpi=150) print "DONE!" diff --git a/misc/command b/misc/command index bb81d7e..7761e84 100644 --- a/misc/command +++ b/misc/command @@ -1,4 +1,4 @@ -python contour.py --data real --debug true --nsteps 100 --burnin 10 --nwalkers 20 --datadir ./test_ --seed 26 --stat-method bayesian --threads max +python contour.py --data real --debug true --nsteps 100 --burnin 10 --nwalkers 20 --datadir ./test_ --seed 26 --threads max python sens.py --debug True --data real --datadir ./test --dimension 6 --eval-segment 1 --mn-live-points 100 --mn-output ./test --mn-tolerance 0.3 --seed 26 --segments 10 --source-ratio 1 2 0 --stat-method bayesian --threads 4 --texture oeu python plot_sens.py --data real --datadir /data/user/smandalia/flavour_ratio/data/sensitivity/ --dimensions 6 --plot-x True --segments 10 --x-segments 20 --split-jobs True --stat-method bayesian --texture none diff --git a/utils/plot.py b/utils/plot.py index 89cd1c3..284ba63 100644 --- a/utils/plot.py +++ b/utils/plot.py @@ -505,7 +505,7 @@ def plot_statistic(data, outfile, outformat, args, scale_param, label=None): min_idx = np.argmin(scales) null = statistic[min_idx] - fig_text += '\nnull lnZ = {0:.2f}'.format(null) + # fig_text += '\nnull lnZ = {0:.2f}'.format(null) if args.stat_method is StatCateg.BAYESIAN: reduced_ev = -(statistic_rm - null) -- cgit v1.2.3