aboutsummaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
Diffstat (limited to 'utils')
-rw-r--r--utils/gf.py6
-rw-r--r--utils/plot.py24
2 files changed, 23 insertions, 7 deletions
diff --git a/utils/gf.py b/utils/gf.py
index 0d098f1..59b575e 100644
--- a/utils/gf.py
+++ b/utils/gf.py
@@ -79,12 +79,12 @@ def setup_asimov(fitter, params):
fitter.SetupAsimov(asimov_params)
-def setup_realisation(fitter, params):
+def setup_realisation(fitter, params, seed):
print 'Injecting the model', params
asimov_params = gf.FitParameters(gf.sampleTag.MagicTau)
for parm in params:
asimov_params.__setattr__(parm.name, float(parm.value))
- fitter.Swallow(fitter.SpitExpectation(asimov_params))
+ fitter.Swallow(fitter.SpitRealization(asimov_params, seed))
def setup_fitter(args, asimov_paramset):
@@ -95,7 +95,7 @@ def setup_fitter(args, asimov_paramset):
if args.data is DataType.ASIMOV:
setup_asimov(fitter, asimov_paramset)
elif args.data is DataType.REALISATION:
- setup_realisation(fitter, asimov_paramset)
+ setup_realisation(fitter, asimov_paramset, args.seed)
elif args.data is DataType.REAL:
print 'Using MagicTau DATA'
return fitter
diff --git a/utils/plot.py b/utils/plot.py
index f05b813..4e1a58b 100644
--- a/utils/plot.py
+++ b/utils/plot.py
@@ -408,6 +408,15 @@ def plot_sens_fixed_angle_pretty(data, outfile, outformat, args):
8: (1.4E-45, 1.00E-34)
}
+ best_limits = {
+ 3: ('CMB polarization', 1E-43, 'brown'),
+ 4: ('GRB vacuum birefringence', 1E-38, 'lightgreen'),
+ 5: ('GRB vacuum birefringence', 1E-34, 'lightgreen'),
+ 6: ('UHE cosmic ray', 1E-42, 'violet'),
+ 7: ('GRB vacuum birefringence', 1E-28, 'lightgreen'),
+ 8: ('gravitational Cherenkov radiation', 1E-46, 'lightblue')
+ }
+
show_data = True
en = np.log10([1E4, 1E7])
@@ -448,10 +457,6 @@ def plot_sens_fixed_angle_pretty(data, outfile, outformat, args):
ax.set_xlim(xlims)
ylim = (0.5, 1.5)
ax.set_ylim(ylim)
- # ax.set_yticks([ylim[0], 1., ylim[1]])
- # ax.set_yticklabels([''] + [yticks[ian]] + [''], fontsize=13)
- # ax.yaxis.get_major_ticks()[0].set_visible(False)
- # ax.yaxis.get_major_ticks()[2].set_visible(False)
ax.set_yticks([1.])
ax.set_yticklabels([yticks[ian]], fontsize=13)
ax.yaxis.tick_right()
@@ -488,6 +493,8 @@ def plot_sens_fixed_angle_pretty(data, outfile, outformat, args):
(bote[dim][1], ylim[0]), bote[dim][0]-bote[dim][1], np.diff(ylim),
fill=True, facecolor=col, alpha=alpha, linewidth=0
))
+ bc_limit = best_limits[dim]
+ # ax.axvline(x=np.log10(bc_limit[1]), color=bc_limit[2], alpha=0.7, linewidth=1.5)
scales, statistic = data[idim][isrc][ian].T
tck, u = interpolate.splprep([scales, statistic], s=0)
@@ -532,6 +539,15 @@ def plot_sens_fixed_angle_pretty(data, outfile, outformat, args):
fill=False, hatch='\\\\'
))
+ # fig.text(
+ # 0.06, 0.5, r'Dimension $d$ of SME coefficient', fontsize=16, rotation='90',
+ # verticalalignment='center'
+ # )
+ # fig.text(
+ # 0.96, 0.5, r'New Physics Maximal Mixing Scenario', fontsize=16,
+ # rotation='270', verticalalignment='center'
+ # )
+
ax.get_xaxis().set_visible(True)
ax.set_xlabel(r'${\rm New\:Physics\:Scale}\:[\:{\rm log}_{10} (\Lambda^{-1}\:/\:{\rm GeV}^{-d+4})\: ]$',
fontsize=19)