Skip to content

Commit f7b1592

Browse files
committed
defo cleanup
1 parent 99e4e38 commit f7b1592

2 files changed

Lines changed: 2 additions & 31 deletions

File tree

GSASII/GSASIIlattice.py

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -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-
29762947
def SetUVvec(Neigh):
29772948
''' Set deformation coordinate choices from neighbors; called in G2phsGUI/UpdateDeformation
29782949

GSASII/GSASIIstrMath.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -552,8 +552,8 @@ def MakePolar(Orient,QB):
552552
orKeys = [item for item in orKeys if 'Sl' in item]
553553
orbs = SHCdict[iAt]['1']
554554
UVmat = np.inner(SHCdict[-iAt]['UVmat'],Bmat)
555-
R,Th,Ph = G2lat.H2ThPh2(np.reshape(HKL,(-1,3)),UVmat)
556-
R = 1/R # correct dspacings
555+
R,Th,Ph = G2lat.H2ThPh2(np.reshape(HKL,(-1,3)),UVmat) #radius,azimuth,polar
556+
# R = 1/R # correct dspacings - not used
557557
atFlg.append(1.0)
558558
orbTable = ORBtables[Atype] # should point at Sl core
559559
ffOrb = orbTable['Sl core']

0 commit comments

Comments
 (0)