-
Notifications
You must be signed in to change notification settings - Fork 8
/
run_testsuite.py
208 lines (165 loc) · 7.62 KB
/
run_testsuite.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
# -*- coding: utf-8 -*-
r"""Produce a suite of test plots of probabilities.
Running this module ('python run_testsuite.py') creates a number of
test plots of the two- and three-neutrino oscillation probabilities
vs. baseline and vs. energy. Also generates the plot included in the
paper.
Created: 2019/04/22 16:23
Last modified: 2019/04/27 17:19
"""
from __future__ import print_function
__version__ = "1.0"
__author__ = "Mauricio Bustamante"
__email__ = "[email protected]"
from numpy import *
import sys
sys.path.append('./src')
sys.path.append('./test')
import oscprob2nu_plot
import oscprob3nu_plot
import oscprob2nu_plotpaper
import oscprob3nu_plotpaper
print('NuOscProbExact: Running test suite (plots will be stored inside ./fig)')
print()
print('Generating plots of 2nu probability vs. baseline:')
for case in ['vacuum', 'matter', 'nsi', 'liv']:
print(' Case: '+case)
print(' Pee, Pem... ', end='')
oscprob2nu_plot.plot_probability_2nu_vs_baseline(
case, '12', energy=1.e-2,
log10_l_min=0.0, log10_l_max=3.0, log10_l_npts=3000,
plot_prob_ee=True, plot_prob_em=True, plot_prob_mm=False,
output_filename='prob_2nu_'+case+'_vs_baseline_ee_em',
output_format='png', output_path='./fig/',
legend_loc='center left', legend_ncol=1)
print('Done')
print(' Pmm, Pmt... ', end='')
oscprob2nu_plot.plot_probability_2nu_vs_baseline(
case, '23', energy=1.e-2,
log10_l_min=0.0, log10_l_max=3.0, log10_l_npts=3000,
plot_prob_ee=True, plot_prob_em=True, plot_prob_mm=False,
output_filename='prob_2nu_'+case+'_vs_baseline_mm_mt',
output_format='png', output_path='./fig/',
legend_loc='center left', legend_ncol=1)
print('Done')
print(' Done')
print()
print('Generating plots of 2nu probability vs. energy:')
for case in ['vacuum', 'matter', 'nsi', 'liv']:
print(' Case: '+case)
print(' Pee, Pem... ', end='')
oscprob2nu_plot.plot_probability_2nu_vs_energy(
case, '12', baseline=1.e3,
log10_energy_min=-1.0, log10_energy_max=1.0,
log10_energy_npts=600,
plot_prob_ee=True, plot_prob_em=True, plot_prob_mm=False,
output_filename='prob_2nu_'+case+'_vs_energy_ee_em',
output_format='png', output_path='./fig/',
legend_loc='center right', legend_ncol=1)
print('Done')
print(' Pee, Pem... ', end='')
oscprob2nu_plot.plot_probability_2nu_vs_energy(
case, '23', baseline=1.e3,
log10_energy_min=-1.0, log10_energy_max=1.0,
log10_energy_npts=600,
plot_prob_ee=True, plot_prob_em=True, plot_prob_mm=False,
output_filename='prob_2nu_'+case+'_vs_energy_mm_mt',
output_format='png', output_path='./fig/',
legend_loc='center right', legend_ncol=1)
print('Done')
print(' Done')
print()
print('Generating plots of 3nu probability vs. baseline:')
for case in ['vacuum', 'matter', 'nsi', 'liv']:
print(' Case: '+case)
print(' Pee, Pem, Pet... ', end='')
# Pee, Pem, Pet
oscprob3nu_plot.plot_probability_3nu_vs_baseline(
case, energy=1.e-2,
log10_l_min=0.0, log10_l_max=3.0, log10_l_npts=1000,
plot_prob_ee=True, plot_prob_em=True, plot_prob_et=True,
plot_prob_me=False, plot_prob_mm=False, plot_prob_mt=False,
plot_prob_te=False, plot_prob_tm=False, plot_prob_tt=False,
output_filename='prob_3nu_'+case+'_vs_baseline_ee_em_et',
output_format='png', output_path='./fig/',
legend_loc='center left', legend_ncol=1)
print('Done')
print(' Pme, Pmm, Pmt... ', end='')
# Pme, Pmm, Pmt
oscprob3nu_plot.plot_probability_3nu_vs_baseline(
case, energy=1.e-2,
log10_l_min=0.0, log10_l_max=3.0, log10_l_npts=1000,
plot_prob_ee=False, plot_prob_em=False, plot_prob_et=False,
plot_prob_me=True, plot_prob_mm=True, plot_prob_mt=True,
plot_prob_te=False, plot_prob_tm=False, plot_prob_tt=False,
output_filename='prob_3nu_'+case+'_vs_baseline_me_mm_mt',
output_format='png', output_path='./fig/',
legend_loc='center left', legend_ncol=1)
print('Done')
print(' Pte, Ptm, Ptt... ', end='')
# Pte, Ptm, Ptt
oscprob3nu_plot.plot_probability_3nu_vs_baseline(
case, energy=1.e-2,
log10_l_min=0.0, log10_l_max=3.0, log10_l_npts=1000,
plot_prob_ee=False, plot_prob_em=False, plot_prob_et=False,
plot_prob_me=False, plot_prob_mm=False, plot_prob_mt=False,
plot_prob_te=True, plot_prob_tm=True, plot_prob_tt=True,
output_filename='prob_3nu_'+case+'_vs_baseline_te_tm_tt',
output_format='png', output_path='./fig/',
legend_loc='center left', legend_ncol=1)
print('Done')
print(' Done')
print()
print('Generating plots of 3nu probability vs. energy:')
for case in ['vacuum', 'matter', 'nsi', 'liv']:
print(' Case: '+case)
print(' Pee, Pem, Pet... ', end='')
# Pee, Pem, Pet
oscprob3nu_plot.plot_probability_3nu_vs_energy(
case, baseline=1.e3,
log10_energy_min=-1.0, log10_energy_max=1.0,
log10_energy_npts=200,
plot_prob_ee=True, plot_prob_em=True, plot_prob_et=True,
plot_prob_me=False, plot_prob_mm=False, plot_prob_mt=False,
plot_prob_te=False, plot_prob_tm=False, plot_prob_tt=False,
output_filename='prob_3nu_'+case+'_vs_energy_ee_em_et',
output_format='png', output_path='./fig/',
legend_loc='center right', legend_ncol=1)
print('Done')
print(' Pme, Pmm, Pmt... ', end='')
# Pme, Pmm, Pmt
oscprob3nu_plot.plot_probability_3nu_vs_energy(
case, baseline=1.e3,
log10_energy_min=-1.0, log10_energy_max=1.0,
log10_energy_npts=200,
plot_prob_ee=False, plot_prob_em=False, plot_prob_et=False,
plot_prob_me=True, plot_prob_mm=True, plot_prob_mt=True,
plot_prob_te=False, plot_prob_tm=False, plot_prob_tt=False,
output_filename='prob_3nu_'+case+'_vs_energy_me_mm_mt',
output_format='png', output_path='./fig/',
legend_loc='center right', legend_ncol=1)
print('Done')
print(' Pte, Ptm, Ptt... ', end='')
# Pte, Ptm, Ptt
oscprob3nu_plot.plot_probability_3nu_vs_energy(
case, baseline=1.e3,
log10_energy_min=-1.0, log10_energy_max=1.0,
log10_energy_npts=200,
plot_prob_ee=False, plot_prob_em=False, plot_prob_et=False,
plot_prob_me=False, plot_prob_mm=False, plot_prob_mt=False,
plot_prob_te=True, plot_prob_tm=True, plot_prob_tt=True,
output_filename='prob_3nu_'+case+'_vs_energy_te_tm_tt',
output_format='png', output_path='./fig/',
legend_loc='center right', legend_ncol=1)
print('Done')
print(' Done')
print()
print('Generating 2nu plot in paper... ', end='')
oscprob2nu_plotpaper.plot_probability_2nu_vs_energy_compare( \
output_format='png', output_path='./fig/')
print('Done')
print()
print('Generating 3nu plot in paper... ', end='')
oscprob3nu_plotpaper.plot_probability_3nu_vs_energy_compare( \
output_format='png', output_path='./fig/')
print('Done')