diff options
| author | Shivesh Mandalia <shivesh.mandalia@outlook.com> | 2020-02-28 22:32:31 +0000 |
|---|---|---|
| committer | Shivesh Mandalia <shivesh.mandalia@outlook.com> | 2020-02-28 22:32:31 +0000 |
| commit | 4707f109e2bc35c6e6f6b737607323c0a5931e48 (patch) | |
| tree | 63ca211437a1ba297dd91672981b53fe2c3467cf /ipynbs/unitarity.py | |
| parent | efcc7ba1affc226d535f576714169558b8364540 (diff) | |
| parent | 4733e363fbc83b6cad78799d710784906f307677 (diff) | |
| download | GolemFlavor-4707f109e2bc35c6e6f6b737607323c0a5931e48.tar.gz GolemFlavor-4707f109e2bc35c6e6f6b737607323c0a5931e48.zip | |
Merge branch 'local'
Conflicts:
golemflavor/plot.py
plot_llh/.ipynb_checkpoints/fig2-checkpoint.ipynb
plot_llh/.ipynb_checkpoints/thesis-checkpoint.ipynb
Diffstat (limited to 'ipynbs/unitarity.py')
| -rw-r--r-- | ipynbs/unitarity.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ipynbs/unitarity.py b/ipynbs/unitarity.py index c43f430..d6cd899 100644 --- a/ipynbs/unitarity.py +++ b/ipynbs/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) |
