diff options
| author | Shivesh Mandalia <shivesh.mandalia@outlook.com> | 2020-02-28 16:57:36 +0000 |
|---|---|---|
| committer | Shivesh Mandalia <shivesh.mandalia@outlook.com> | 2020-02-28 16:57:36 +0000 |
| commit | 4733e363fbc83b6cad78799d710784906f307677 (patch) | |
| tree | d4d84d03aef3b1768fa296dedd2e3853dc93581c /plot_llh/unitarity.py | |
| parent | 7f20ccfb7dddc0d7d498a9bcd56e1285f999afb6 (diff) | |
| download | GolemFlavor-4733e363fbc83b6cad78799d710784906f307677.tar.gz GolemFlavor-4733e363fbc83b6cad78799d710784906f307677.zip | |
plot_llh scripts
Diffstat (limited to 'plot_llh/unitarity.py')
| -rw-r--r-- | plot_llh/unitarity.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/plot_llh/unitarity.py b/plot_llh/unitarity.py index c43f430..d6cd899 100644 --- a/plot_llh/unitarity.py +++ b/plot_llh/unitarity.py @@ -9,7 +9,7 @@ Calculation follows from DOI 10.1103/PhysRevD.98.123023 "Unitary bounds of astrophysical neutrinos" by M. Ahlers, M. Bustamante, S. Mu """ -from __future__ import absolute_import, division +from __future__ import absolute_import, division, print_function import numpy as np @@ -56,7 +56,7 @@ def calc_unitarity_bounds(f_s, n_samples): domega = np.linspace(-np.pi/2., np.pi/2, n_samples) eta = np.full_like(chi, np.inf, dtype=np.float) - for i_chi in xrange(n_samples): + for i_chi in range(n_samples): omega = chi[i_chi] + domega x = (1 - f_s[0] - 2*f_s[1]) * np.sin(omega) y = (1 - 2*f_s[0] - f_s[1]) * np.cos(omega) @@ -64,15 +64,15 @@ def calc_unitarity_bounds(f_s, n_samples): B = B_v(x, y, z) if np.any(~np.isfinite(B)): - print 'B', B + print('B', B) raise AssertionError('inf elements found!') nB = [] - for i_ome in xrange(n_samples): + for i_ome in range(n_samples): nB.append(Bn(B[i_ome], omega[i_ome], chi[i_chi])) eta[i_chi] = np.min(nB) if np.any(~np.isfinite(eta)): - print 'eta', eta + print('eta', eta) raise AssertionError('inf elements found!') df_em = eta * np.cos(chi) |
