Ignore:
Timestamp:
Jul 9, 2016 10:45:12 AM (5 years ago)
Author:
vondreele
Message:

add display of inverse pole figure for each histogram - works but are they valid?

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIlattice.py

    r2233 r2367  
    371371    return A,B
    372372   
    373 
    374373def cell2AB(cell):
    375374    """Computes orthogonalization matrix from unit cell constants
     
    392391    B = nl.inv(A)
    393392    return A,B
     393   
     394def 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
    394410   
    395411def U6toUij(U6):
Note: See TracChangeset for help on using the changeset viewer.