aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorshivesh <s.p.mandalia@qmul.ac.uk>2019-06-26 17:34:15 +0100
committershivesh <s.p.mandalia@qmul.ac.uk>2019-06-26 17:34:15 +0100
commit18928b0f5f7afe14e649f72b178a2c685bd602a6 (patch)
treeefa70b62a27b6e3154b506e4f65a2e28c959d67b
parent8310ac4f965b35fc3f23175cd26692808fb8b669 (diff)
parent3d15334cab7604bb832cdc91e32338f96ac754bd (diff)
downloadGolemFlavor-18928b0f5f7afe14e649f72b178a2c685bd602a6.tar.gz
GolemFlavor-18928b0f5f7afe14e649f72b178a2c685bd602a6.zip
Merge branch 'master' of github.com:ShiveshM/flavour_ratio
-rwxr-xr-xaustin.py55
-rwxr-xr-xmc_x.py3
-rw-r--r--misc/command2
-rw-r--r--utils/plot.py2
4 files changed, 27 insertions, 35 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/mc_x.py b/mc_x.py
index 81ba127..b1fad71 100755
--- a/mc_x.py
+++ b/mc_x.py
@@ -187,7 +187,8 @@ def main():
srcs = [fr_utils.normalise_fr((x, 1-x, 0)) for x in samples.T[-1]]
mmxs = map(fr_utils.angles_to_u, samples.T[:-1].T)
frs = np.array(
- [fr_utils.u_to_fr(srcs[i], mmxs[i]) for i in xrange(nsamples)]
+ [fr_utils.u_to_fr(srcs[i], mmxs[i]) for i in xrange(nsamples)],
+ dtype=np.float64
)
mcmc_utils.save_chains(frs, outfile)
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)