Changeset 1957 for trunk/GSASIIspc.py
 Timestamp:
 Aug 14, 2015 3:08:55 PM (8 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/GSASIIspc.py
r1956 r1957 903 903 ''' 904 904 modsym,gensym = SSymbol.replace(' ','').split(')') 905 if gensym in ['0','00','000','0000']: #get rid of extraneous symbols 906 gensym = '' 905 907 nfrac = modsym.count('/') 906 908 modsym = modsym.lstrip('(') … … 1431 1433 return CSuinel[indx[1]] 1432 1434 1435 def getTauT(tau,sop,ssop,XYZ): 1436 ssopinv = nl.inv(ssop[0]) 1437 mst = ssopinv[3][:3] 1438 epsinv = ssopinv[3][3] 1439 sdet = nl.det(sop[0]) 1440 ssdet = nl.det(ssop[0]) 1441 dtau = mst*(XYZsop[1])epsinv*ssop[1][3] 1442 dT = 1.0 1443 if np.any(dtau%.5): 1444 dT = np.tan(np.pi*np.sum(dtau%.5)) 1445 tauT = np.inner(mst,XYZsop[1])+epsinv*(taussop[1][3]) 1446 return sdet,ssdet,dtau,dT,tauT 1447 1448 def OpsfromStringOps(A,SGData,SSGData): 1449 SGOps = SGData['SGOps'] 1450 SSGOps = SSGData['SSGOps'] 1451 Ax = A.split('+') 1452 Ax[0] = int(Ax[0]) 1453 iC = 1 1454 if Ax[0] < 0: 1455 iC = 1 1456 Ax[0] = abs(Ax[0]) 1457 nA = Ax[0]%1001 1458 return SGOps[nA],SSGOps[nA],iC 1459 1433 1460 def GetSSfxuinel(waveType,nH,XYZ,SGData,SSGData,debug=False): 1434 1461 … … 1443 1470 csi[i] = parms.index(csi[i]) 1444 1471 return CSI 1445 1472 1446 1473 def fracCrenel(tau,Toff,Twid): 1447 1474 Tau = (tauToff[:,np.newaxis])%1. … … 1486 1513 for i in SdIndx: 1487 1514 sop = Sop[i] 1488 ssop = SSop[i] 1489 ssopinv = nl.inv(ssop[0]) 1490 mst = ssopinv[3][:3] 1491 epsinv = ssopinv[3][3] 1492 sdet = nl.det(sop[0]) 1493 ssdet = nl.det(ssop[0]) 1494 dtau = mst*(XYZsop[1])epsinv*ssop[1][3] 1495 dT = 1.0 1496 if np.any(dtau%.5): 1497 dT = np.tan(np.pi*np.sum(dtau%.5)) 1498 tauT = np.inner(mst,XYZsop[1])+epsinv*(taussop[1][3]) 1515 ssop = SSop[i] 1516 sdet,ssdet,dtau,dT,tauT = getTauT(tau,sop,ssop,XYZ) 1499 1517 fsc = np.ones(2,dtype='i') 1500 1518 if 'Crenel' in waveType: … … 1551 1569 sop = Sop[i] 1552 1570 ssop = SSop[i] 1571 sdet,ssdet,dtau,dT,tauT = getTauT(tau,sop,ssop,XYZ) 1553 1572 xsc = np.ones(6,dtype='i') 1554 ssopinv = nl.inv(ssop[0])1555 mst = ssopinv[3][:3]1556 epsinv = ssopinv[3][3]1557 sdet = nl.det(sop[0])1558 ssdet = nl.det(ssop[0])1559 dtau = mst*(XYZsop[1])epsinv*ssop[1][3]1560 dT = 1.01561 if np.any(dtau%.5):1562 dT = np.tan(np.pi*np.sum(dtau%.5))1563 tauT = np.inner(mst,XYZsop[1])+epsinv*(taussop[1][3])1564 1573 if waveType == 'Fourier': 1565 1574 dXT = posFourier(np.sort(tauT),nH,delt6[:3],delt6[3:]) #+np.array(XYZ)[:,np.newaxis,np.newaxis] … … 1634 1643 sop = Sop[i] 1635 1644 ssop = SSop[i] 1636 ssopinv = nl.inv(ssop[0]) 1637 mst = ssopinv[3][:3] 1638 epsinv = ssopinv[3][3] 1639 sdet = nl.det(sop[0]) 1640 ssdet = nl.det(ssop[0]) 1641 dtau = mst*(XYZsop[1])epsinv*ssop[1][3] 1642 dT = 1.0 1643 if np.any(dtau%.5): 1644 dT = np.tan(np.pi*np.sum(dtau%.5)) 1645 tauT = np.inner(mst,XYZsop[1])+epsinv*(taussop[1][3]) 1645 sdet,ssdet,dtau,dT,tauT = getTauT(tau,sop,ssop,XYZ) 1646 1646 usc = np.ones(12,dtype='i') 1647 1647 dUT = posFourier(tauT,nH,delt12[:6],delt12[6:]) #Uij modulations  6x12x49 array … … 2114 2114 else: 2115 2115 cellA = np.zeros(3) 2116 newX = Cen+(12*iC)*(np.inner(M,X) +T)+cellA2116 newX = Cen+(12*iC)*(np.inner(M,X).T+T)+cellA 2117 2117 if len(Uij): 2118 2118 U = Uij2U(Uij)
Note: See TracChangeset
for help on using the changeset viewer.