Changeset 1613 for trunk/GSASIIspc.py
 Timestamp:
 Dec 19, 2014 9:04:21 AM (8 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/GSASIIspc.py
r1612 r1613 1426 1426 'Sadp':[[0,1,2,3,4,5, 0,1,2,3,4,5],[1.,1.,1.,1.,1.,1., 1.,1.,1.,1.,1.,1.]], 1427 1427 'Smag':[[0,1,2, 0,1,2],[1.,1.,1., 1.,1.,1.]]} 1428 deltx = np.eye((3))*.001 1428 deltx = np.ones((3,4))*.01 1429 deltx[:3,:3] = np.eye((3))*.001 1429 1430 deltu = np.eye((6))*.0001 1430 1431 xyz = np.array(XYZ)%1. 1432 xyzt = np.array(XYZ+[0,])%1. 1431 1433 uij = np.array(UIJ) 1432 1434 SGOps = SGData['SGOps'] … … 1524 1526 # elif SGData['SGLaue'] in ['6/m','6/mmm']: 1525 1527 # 1526 xsin = np.zeros(3) 1527 xcos = np.zeros(3) 1528 usin = np.zeros(6) 1529 ucos = np.zeros(6) 1528 xsin = np.zeros(3,dtype='i') 1529 xcos = np.zeros(3,dtype='i') 1530 usin = np.zeros(6,dtype='i') 1531 ucos = np.zeros(6,dtype='i') 1532 csi = np.ones((6),dtype='i')*1 1530 1533 for i,idelt in enumerate(deltx): 1531 nxyz = (np.inner(sop[0],(xyz+idelt))+sop[1])%1. 1532 print 'nxyz',i,nxyz 1533 xsin[i] = np.equal((xyzidelt)%1.,nxyz)[i] 1534 print 'sin',(xyzidelt)%1. 1535 xcos[i] = np.equal((xyz+idelt)%1.,nxyz)[i] 1536 print 'cos',(xyz+idelt)%1. 1534 print 'idelt:',idelt 1535 nxyzt = np.inner(ssop[0],(xyzt+idelt))+ssop[1] 1536 nxyzt[3] = ssop[1][3] 1537 print 'nxyz',nxyzt 1538 xsin[i] = np.allclose((xyztidelt),nxyzt,1.e6) 1539 print 'sin ',(xyztidelt),xsin[i] 1540 xcos[i] = np.allclose((xyzt+idelt),nxyzt,1.e6) 1541 print 'cos ',(xyzt+idelt),xcos[i] 1542 n = 1 1543 for i,isin in enumerate(xsin): 1544 if isin: 1545 n += 1 1546 csi[i] = n 1547 for i,icos in enumerate(xcos): 1548 if icos: 1549 n += 1 1550 csi[i+3] = n 1551 print csi 1537 1552 print CSI['Spos'][0] 1538 1553 print xsin,xcos
Note: See TracChangeset
for help on using the changeset viewer.