Changes between Version 4 and Version 5 of LatticeComputations
- Timestamp:
- Jul 6, 2010 2:15:04 PM (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
LatticeComputations
v4 v5 10 10 11 11 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 13 a code fragment that shows how this can be used is: 14 {{ 15 import numpy as np 16 import GSASIIlattice as latt 17 A,B = latt.cell2AB( (4.1,4.1,5.2,90,90,90) ) 18 Xfrac = np.array( [0,0,0] ) 19 Xortho = np.sum(A*Xfrac,axis=1) 20 }} 12 21 13 22 In 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.