From b7e4355173da6835b9e39ec4044ffe08ffc4a818 Mon Sep 17 00:00:00 2001 From: Shivesh Mandalia Date: Wed, 27 May 2020 11:32:07 +0100 Subject: python3 --- golemflavor/plot.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'golemflavor/plot.py') 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 -- cgit v1.2.3