aboutsummaryrefslogtreecommitdiffstats
path: root/golemflavor
diff options
context:
space:
mode:
authorShivesh Mandalia <shivesh.mandalia@outlook.com>2020-05-27 11:32:07 +0100
committerShivesh Mandalia <shivesh.mandalia@outlook.com>2020-05-27 11:32:07 +0100
commitb7e4355173da6835b9e39ec4044ffe08ffc4a818 (patch)
tree828f2a6d8a8502591991f2c21c0aa2297f8e67f8 /golemflavor
parent8fd307438dc40973b78dbbcd08a8e611add8029a (diff)
downloadGolemFlavor-master.tar.gz
GolemFlavor-master.zip
python3HEADmaster
Diffstat (limited to 'golemflavor')
-rw-r--r--golemflavor/fr.py4
-rw-r--r--golemflavor/llh.py2
-rw-r--r--golemflavor/plot.py9
3 files changed, 9 insertions, 6 deletions
diff --git a/golemflavor/fr.py b/golemflavor/fr.py
index 3b5d259..b7c597e 100644
--- a/golemflavor/fr.py
+++ b/golemflavor/fr.py
@@ -98,7 +98,7 @@ def angles_to_fr(src_angles):
(0.38340579025361626, 0.16431676725154978, 0.45227744249483393)
"""
- sphi4, c2psi = map(DTYPE, src_angles)
+ sphi4, c2psi = list(map(DTYPE, src_angles))
psi = (0.5)*ACOS(c2psi)
@@ -135,7 +135,7 @@ def angles_to_u(bsm_angles):
[ 0.28614067-0.42427084j, -0.64749908-0.21213542j, 0.52331757+0.j ]])
"""
- s12_2, c13_4, s23_2, dcp = map(DTYPE, bsm_angles)
+ s12_2, c13_4, s23_2, dcp = list(map(DTYPE, bsm_angles))
dcp = CDTYPE(dcp)
c12_2 = 1. - s12_2
diff --git a/golemflavor/llh.py b/golemflavor/llh.py
index 645ba6e..8283bc0 100644
--- a/golemflavor/llh.py
+++ b/golemflavor/llh.py
@@ -107,7 +107,7 @@ def triangle_llh(theta, args, asimov_paramset, llh_paramset):
fr = fr_utils.flux_averaged_BSMu(theta, args, spectral_index, llh_paramset)
flavor_angles = fr_utils.fr_to_angles(fr)
- # print('flavor_angles', map(float, flavor_angles))
+ # print('flavor_angles', list(map(float, flavor_angles)))
for idx, param in enumerate(hypo_paramset.from_tag(ParamTag.BESTFIT)):
param.value = flavor_angles[idx]
diff --git a/golemflavor/plot.py b/golemflavor/plot.py
index 02aa232..b16b4b2 100644
--- a/golemflavor/plot.py
+++ b/golemflavor/plot.py
@@ -152,6 +152,8 @@ def get_limit(scales, statistic, args, mask_initial=False, return_interp=False):
if args.stat_method is StatCateg.BAYESIAN:
if (statistic[0] - max_st) > np.log(10**(BAYES_K)):
raise AssertionError('Discovered LV!')
+ else:
+ raise NotImplementedError
try:
tck, u = splprep([scales, statistic], s=0)
@@ -293,7 +295,7 @@ def project_toflavor(p, nbins):
def tax_fill(ax, points, nbins, **kwargs):
- pol = np.array(map(project, points))
+ pol = np.array(list(map(project, points)))
ax.fill(pol.T[0]*nbins, pol.T[1]*nbins, **kwargs)
@@ -626,8 +628,9 @@ def plot_statistic(data, outfile, outformat, args, scale_param, label=None):
ax.scatter(scales[1:], -(statistic[1:]-null), color='r')
ax.plot(scales_rm, reduced_ev, color='k', linewidth=1, alpha=1, ls='-')
- ax.axhline(y=np.log(10**(BAYES_K)), color='red', alpha=1., linewidth=1.2, ls='--')
- ax.axvline(x=lim, color='red', alpha=1., linewidth=1.2, ls='--')
+ if args.stat_method is StatCateg.BAYESIAN:
+ ax.axhline(y=np.log(10**(BAYES_K)), color='red', alpha=1., linewidth=1.2, ls='--')
+ ax.axvline(x=lim, color='red', alpha=1., linewidth=1.2, ls='--')
at = AnchoredText(
fig_text, prop=dict(size=10), frameon=True, loc=4