Changes between Version 4 and Version 5 of LatticeComputations


Ignore:
Timestamp:
Jul 6, 2010 2:15:04 PM (13 years ago)
Author:
toby
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • LatticeComputations

    v4 v5  
    1010
    1111  1/D^2^ = ''h''^2^*A(1) + ''k''^2^*A(2) + ''l''^2^*A(3) + ''h''*''k''*A(4) + ''h''*''l''*A(5) + ''k''*''l''*A(6)
     12
     13a code fragment that shows how this can be used is:
     14{{
     15import numpy as np
     16import GSASIIlattice as latt
     17A,B = latt.cell2AB( (4.1,4.1,5.2,90,90,90) )
     18Xfrac = np.array( [0,0,0] )
     19Xortho = np.sum(A*Xfrac,axis=1) 
     20}}
    1221
    1322In addition, A and B are used to define a pair of 3x3 transformation matrices, where A*x converts Cartesian coordinates x into fractional ones and B does the inverse transform.