From 349a48bf498c3cd342876eb9e66110fd8dbf8b9b Mon Sep 17 00:00:00 2001 From: shivesh Date: Thu, 25 Apr 2019 17:01:48 +0100 Subject: refactor emcee scripts --- plot_llh/MinimalTools.py | 166 ----------------------------------------------- 1 file changed, 166 deletions(-) delete mode 100644 plot_llh/MinimalTools.py (limited to 'plot_llh/MinimalTools.py') diff --git a/plot_llh/MinimalTools.py b/plot_llh/MinimalTools.py deleted file mode 100644 index 4ae8360..0000000 --- a/plot_llh/MinimalTools.py +++ /dev/null @@ -1,166 +0,0 @@ -import numpy as np -from PhysConst import PhysicsConstants - -def eigenvectors(M): - """ Calculates the eigenvectors and eigenvalues ordered by eigenvalue size - - @type M : matrix - @param M : matrix M - - @rtype : list - @return : [eigenvalues list, eigenvector list] - """ - D,V = np.linalg.eig(M) - DV = [] - VT = V.T - for i,eigenvalue in enumerate(D): - DV.append([eigenvalue,VT[i]]) - - DV = sorted(DV,key = lambda x : x[0].real)#np.abs(x[0].real)) - - V2 = [] - D2 = [] - for e in DV: - V2.append(e[1]) - D2.append(e[0]) - return D2,V2 - -# General Rotation Matrix -def R(i,j,cp,param): - """ Rotation Matrix - Calculates the R_ij rotations. Also incorporates CP-phases when necesary. - @type i : int - @param i : i-column. - @type j : int - @param j : j-row. - @type cp : int - @param cp : if cp = 0 : no CP-phase. else CP-phase = CP_array[cp] - - @rtype : numpy.array - @return : returns the R_ij rotation matrix. - """ - # if cp = 0 -> no complex phase - # R_ij, i