Ignore:
Timestamp:
Feb 19, 2016 3:58:52 PM (6 years ago)
Author:
vondreele
Message:

remove range restriction on LGmix - inhibited doing refinements
do wx.CallAfter? for size/strain plots in G2ddataGUI
Add TransformDialog?, prodMGMT, TransformCell?, TransformU6, TransformXYZ to G2lattice
A start on TransformAtoms? in G2math
fill in OnTransform?

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIlattice.py

    r2147 r2154  
    193193    g = nl.inv(G)
    194194    return G,g
    195        
     195   
     196def prodMGMT(G,Mat):
     197    '''Transform metric tensor by matrix
     198   
     199    :param G: array metric tensor
     200    :param Mat: array transformation matrix
     201    :return: array new metric tensor
     202   
     203    '''
     204    return np.inner(Mat,np.inner(G,Mat).T)
     205   
     206def TransformCell(cell,Trans):
     207    '''Transform lattice parameters by matrix
     208   
     209    :param cell: list a,b,c,alpha,beta,gamma,(volume)
     210    :param Trans: array transformation matrix
     211    :return: array transformed a,b,c,alpha,beta,gamma,volume
     212   
     213    '''
     214    newCell = np.zeros(7)
     215    g = cell2Gmat(cell)[1]
     216    newg = prodMGMT(g,Trans)
     217    newCell[:6] = Gmat2cell(newg)
     218    newCell[6] = calc_V(cell2A(newCell[:6]))
     219    return newCell
     220   
     221def TransformXYZ(XYZ,Trans,Vec):
     222    return np.inner(XYZ,Trans)+Vec
     223   
     224def TransformU6(U6,Trans):
     225    Uij = np.inner(Trans,np.inner(U6toUij(U6),Trans))
     226    return UijtoU6(Uij)
     227           
    196228def calc_rVsq(A):
    197229    """Compute the square of the reciprocal lattice volume (1/V**2) from A'
Note: See TracChangeset for help on using the changeset viewer.