Changeset 2367 for trunk/GSASIIlattice.py
 Timestamp:
 Jul 9, 2016 10:45:12 AM (5 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/GSASIIlattice.py
r2233 r2367 371 371 return A,B 372 372 373 374 373 def cell2AB(cell): 375 374 """Computes orthogonalization matrix from unit cell constants … … 392 391 B = nl.inv(A) 393 392 return A,B 393 394 def HKL2SpAng(H,cell,SGData): 395 """Computes spherical coords for hkls; view along 001 396 397 :param array H: arrays of hkl 398 :param tuple cell: a,b,c, alpha, beta, gamma (degrees) 399 :param dict SGData: space group dictionary 400 :returns: arrays of r,phi,psi (radius,inclination,azimuth) about 001 401 """ 402 A,B = cell2AB(cell) 403 xH = np.inner(B,H) 404 r = np.sqrt(np.sum(xH**2,axis=0)) 405 phi = acosd(xH[2]/r) 406 psi = atan2d(xH[1],xH[0]) 407 phi = np.where(phi>90.,180.phi,phi) 408 # GSASIIpath.IPyBreak() 409 return r,phi,psi 394 410 395 411 def U6toUij(U6):
Note: See TracChangeset
for help on using the changeset viewer.