@@ -2944,35 +2944,6 @@ def H2ThPh2(H,Bmat):
29442944 Az = atan2d (Hcart [:,1 ],Hcart [:,0 ])
29452945 return R ,Az ,Pl
29462946
2947- # def H2ThPh(H,Bmat,Q):
2948- # '''Convert HKL to spherical polar & azimuth angles - wrong!
2949-
2950- # :param array H: array of hkl as [n,3]
2951- # :param [3,3] array Bmat: inv crystal to Cartesian transformation
2952- # :param array Q: quaternion for rotation of HKL to new polar axis
2953- # :returns array Th: HKL azimuth angles
2954- # :returns array Ph: HKL polar angles
2955- # '''
2956- # # A,V = G2mth.Q2AVdeg(Q)
2957- # # QR,R = G2mth.make2Quat(V,np.array([0.,0.,1.0]))
2958- # # QA = G2mth.AVdeg2Q(A,np.array([0.,0.,1.0]))
2959- # # Q2 = G2mth.prodQQ(QR,QA)
2960- # Qmat = G2mth.Q2Mat(Q)
2961- # CH1 = np.inner(H,Bmat.T)
2962- # CH = np.inner(CH1,Qmat.T)
2963- # N = nl.norm(CH,axis=1)
2964- # CH /= N[:,nxs]
2965- # H3 = np.array([0,0,1.])
2966- # DHR = np.inner(CH,H3)
2967- # Ph = np.where(DHR <= 1.0,acosd(DHR),0.0) #polar angle 0<=Ph<=180.; correct
2968- # TH = CH*np.array([1.,1.,0.])[nxs,:] #projection of CH onto xy plane
2969- # N = nl.norm(TH,axis=1)
2970- # N = np.where(N > 1.e-5,N,1.)
2971- # TH /= N[:,nxs]
2972- # Th = atan2d(TH[:,1],TH[:,0]) #azimuth angle 0<=Th<360<
2973- # Th = np.where(Th<0.,Th+360.,Th)
2974- # return Th,Ph #azimuth,polar angles
2975-
29762947def SetUVvec (Neigh ):
29772948 ''' Set deformation coordinate choices from neighbors; called in G2phsGUI/UpdateDeformation
29782949
0 commit comments