aboutsummaryrefslogtreecommitdiffstats
path: root/plot_llh/unitarity.py
diff options
context:
space:
mode:
authorshivesh <s.p.mandalia@qmul.ac.uk>2019-09-11 20:32:12 +0100
committershivesh <s.p.mandalia@qmul.ac.uk>2019-09-11 20:32:12 +0100
commit51f283a2afd6fc59ff5afeae61e5f3c283a8eba0 (patch)
treea2d110a4b049641fbb19a8bebbe0e3d707c5ab35 /plot_llh/unitarity.py
parent541dc3961ecf15707feee6e393c9ac321917b5c7 (diff)
downloadGolemFlavor-51f283a2afd6fc59ff5afeae61e5f3c283a8eba0.tar.gz
GolemFlavor-51f283a2afd6fc59ff5afeae61e5f3c283a8eba0.zip
finish unitarity calculation
Diffstat (limited to 'plot_llh/unitarity.py')
-rw-r--r--plot_llh/unitarity.py15
1 files changed, 2 insertions, 13 deletions
diff --git a/plot_llh/unitarity.py b/plot_llh/unitarity.py
index d764d04..0600077 100644
--- a/plot_llh/unitarity.py
+++ b/plot_llh/unitarity.py
@@ -32,22 +32,11 @@ B_v = np.vectorize(
lambda x, y, z: np.max([0] + [S1(x, y, z)] + S2(x, y, z) + S3(x, y, z))
)
-def norm_quad(x):
- """Normalise to quadrant -pi -> pi."""
- return x
- # n = deepcopy(x)
- # while np.abs(n) > np.pi:
- # if n > np.pi: n -= 2*np.pi
- # else: n += 2*np.pi
- # return n
-
def Bn(B, omega, chi):
"""Normalised B."""
- nchi = norm_quad(chi)
- nomega = norm_quad(omega)
- if np.abs(nchi - nomega) >= (np.pi / 2.):
+ if np.abs(chi - omega) >= (np.pi / 2.):
return np.inf
- return B / np.cos(nchi - omega)
+ return B / np.cos(chi - omega)
def calc_unitarity_bounds(f_s, n_samples):
"""Calculate unitarity boundary for a given source flavour ratio.