Changeset 391 for trunk/GSASIIlattice.py


Ignore:
Timestamp:
Oct 13, 2011 10:48:51 AM (10 years ago)
Author:
vondreele
Message:

set default atom frac=1 for cif files
store covMatrix not normalized by diagonal
make esds on cell parameters

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIlattice.py

    r384 r391  
    8585    return G,g
    8686
    87 def A2Gmat(A):
     87def A2Gmat(A,inverse=True):
    8888    """Fill real & reciprocal metric tensor (G) from A
    8989
    90     :param A: reciprocal metric tensor elements as [G11,G22,G33,2*G12,2*G13,2*G23]
     90    :param
     91        A: reciprocal metric tensor elements as [G11,G22,G33,2*G12,2*G13,2*G23]
     92        inverse: if True return bot G and g; else just G
    9193    :return: reciprocal (G) & real (g) metric tensors (list of two numpy 3x3 arrays)
    9294
     
    9799        [A[3]/2.,A[1],    A[5]/2.],
    98100        [A[4]/2.,A[5]/2.,    A[2]]]
    99     g = nl.inv(G)
    100     return G,g
     101    if inverse:
     102        g = nl.inv(G)
     103        return G,g
     104    else:
     105        return G
    101106
    102107def Gmat2A(G):
Note: See TracChangeset for help on using the changeset viewer.