Changeset 3795
- Timestamp:
- Jan 24, 2019 12:14:33 PM (4 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIctrlGUI.py
r3780 r3795 3237 3237 nG = 1 3238 3238 j = 0 3239 if self.ifGray:3240 nG = 23241 3239 for ng in range(nG): 3242 3240 if ng: 3243 3241 mainSizer.Add(wx.StaticText(self.panel,label=" for (0,0,0)+1'"),0,WACV) 3242 j = 0 3244 3243 for ic,cent in enumerate(cents): 3245 Cent = np.array(Cents[ic]) 3244 Cent = np.zeros(3) 3245 if cent: 3246 cent = cent.strip(' (').strip(')+\n') 3247 Cent = np.array(eval(cent)[:3]) 3248 # Cent = np.array(Cents[ic]) 3246 3249 if ic: 3247 3250 if cent: cent = cent.strip(' (').strip(')+\n') -
trunk/GSASIIphsGUI.py
r3774 r3795 1916 1916 SGData = generalData['SGData'] 1917 1917 SpcGrp = SGData['SpGrp'] 1918 if SGData['SGGray']: 1919 SpcGrp += " 1'" 1918 1920 SGErr,SGData = G2spc.SpcGroup(SpcGrp) 1919 1921 if '_' in BNSlatt: … … 1921 1923 else: 1922 1924 SGData['BNSlattsym'] = [SGData['SGLatt'],[0.,0.,0.]] 1923 SGData['SGSpin'] = [1,]*len(SGData['SGSpin']) 1925 SGData['SGSpin'] = [1,]*len(SGData['SGSpin']) #set to all black 1924 1926 GenSym,GenFlg = G2spc.GetGenSym(SGData)[:2] 1925 1927 SGData['GenSym'] = GenSym … … 1958 1960 OprNames = G2spc.GenMagOps(SGData)[0] 1959 1961 else: 1960 if not len(GenSym) or SGData['SGGray']:1962 if not len(GenSym): # or SGData['SGGray']: 1961 1963 spinSizer.Add(wx.StaticText(General,label=' No spin inversion allowed'),0,WACV) 1962 1964 OprNames,SpnFlp = G2spc.GenMagOps(SGData) … … 2005 2007 def OnShowSOps(event): 2006 2008 SSGData = generalData['SSGData'] 2007 text,table = G2spc.SSGPrint(generalData['SGData'],SSGData )2009 text,table = G2spc.SSGPrint(generalData['SGData'],SSGData,True) 2008 2010 msg = 'Superspace Group Information' 2009 2011 G2G.SGMessageBox(General,msg,text,table).ShowModal() … … 2073 2075 if SGData['SGGray']: 2074 2076 SpGrp += " 1'" 2077 if 'BNSlattsym' in SGData and '_' in SGData['BNSlattsym'][0]: 2078 SpGrp = SGData['BNSlattsym'][0]+SpGrp[1:] 2075 2079 modSizer.Add(wx.StaticText(General,label=' Superspace group: %s '%SpGrp),0,WACV) 2076 2080 if not SGData['SGFixed']: -
trunk/GSASIIpwdGUI.py
r3787 r3795 3420 3420 PatternId = G2frame.PatternId 3421 3421 peaks = G2frame.GPXtree.GetItemPyData(G2gd.GetGPXtreeItemId(G2frame,PatternId, 'Index Peak List')) 3422 if not len(peaks[0]):3423 G2frame.ErrorDialog('No peaks!', 'Nothing to refine!')3424 return3425 3422 print (' Refine cell') 3426 3423 controls,bravais,cells,dminx,ssopt,magcells = G2frame.GPXtree.GetItemPyData(G2gd.GetGPXtreeItemId(G2frame,PatternId, 'Unit Cells List')) … … 4101 4098 G2frame.dataWindow.IndexPeaks.Enable(True) 4102 4099 G2frame.dataWindow.RefineCell.Enable(False) 4103 if controls[12] > 1.0 : #if a "real" volume (i.e. not default)4100 if controls[12] > 1.0 and len(peaks[0]): #if a "real" volume (i.e. not default) and peaks 4104 4101 G2frame.dataWindow.RefineCell.Enable(True) 4105 4102 G2frame.dataWindow.CopyCell.Enable(False) -
trunk/GSASIIspc.py
r3768 r3795 845 845 elif 'R' in SGData['SGLatt']: 846 846 BNSsym = {'R_I':[0,0,.5]} 847 848 if SGData['SGGray']: 849 for bns in BNSsym: 850 BNSsym[bns].append(0.5) 851 847 852 return UsymOp,OprFlg,BNSsym 848 853 … … 878 883 return Tmat 879 884 SGData['SGSpin'].append(-1) 880 C = SGCen+A 885 C = SGCen+A[:3] 881 886 SGData['SGCen'] = np.vstack((SGCen,C))%1. 882 887 return Tmat … … 1278 1283 sgOp = [M for M,T in SGData['SGOps']] 1279 1284 oprName = [GetOprPtrName(str(irtx)) for irtx in PackRot(SGData['SGOps'])] 1280 if SGData['SGInv'] and not SGData['SGFixed'] and not SGData['SGGray']:1285 if SGData['SGInv'] and not SGData['SGFixed']: 1281 1286 Nsym *= 2 1282 1287 sgOp += [-M for M,T in SGData['SGOps']] … … 1295 1300 GenFlg = SGData.get('GenFlg',[0]) 1296 1301 Ngen = len(SGData['SGGen']) 1297 # print ('GenFlg:',SGData['GenFlg'])1298 # print ('GenSym:',SGData['GenSym'])1299 1302 Nfl = len(GenFlg) 1300 1303 for ieqv in range(Nsym): … … 1302 1305 if SGData['SGGen'][ieqv%Ngen] & GenFlg[iunq]: 1303 1306 SpnFlp[ieqv] *= FlpSpn[iunq] 1304 # print ('\nMagSpGrp:',SGData['MagSpGrp'],Ncv)1305 # print ('FlpSpn:',Nfl,FlpSpn)1306 1307 for incv in range(Ncv): 1307 1308 if incv: … … 1314 1315 MagMom = SpnFlp*np.array(Ncv*detM) #duplicate for no. centerings 1315 1316 SGData['MagMom'] = MagMom 1316 # print ('SgOps:',OprNames)1317 # print ('SGGen:',SGData['SGGen'])1318 # print ('SpnFlp:',SpnFlp)1319 # print ('MagMom:',MagMom)1320 1317 return OprNames,SpnFlp 1321 1318 … … 1641 1638 elif SGData['SGLaue'] in ['3R','3mR']: 1642 1639 return '(3+1) superlattices not defined for rhombohedral settings - use hexagonal setting',None 1643 # if SGData['SGGray'] and SSymbol[-1] == 's':1644 # SSymbol = SSymbol[:-1]1645 1640 try: 1646 1641 modsym,gensym = splitSSsym(SSymbol) … … 1663 1658 if SGData['SGGray']: 1664 1659 SSgSpc = SSgSpc.replace('('," 1'(") 1665 # SSgSpc += 's'1666 1660 SSGData = {'SSpGrp':SSgSpc,'modQ':modQ,'modSymb':modsym,'SSGKl':SSGKl} 1667 1661 SSCen = np.zeros((len(SGData['SGCen']),4)) 1668 1662 for icen,cen in enumerate(SGData['SGCen']): 1669 1663 SSCen[icen,0:3] = cen 1670 SSCen[0] = np.zeros(4)1671 1664 SSGData['SSGCen'] = SSCen 1672 1665 SSGData['SSGOps'] = [] … … 1833 1826 Mult = len(SSGData['SSGCen'])*len(SSGData['SSGOps']) 1834 1827 SSsymb = SSGData['SSpGrp'] 1828 if 'BNSlattsym' in SGData and '_' in SGData['BNSlattsym'][0]: 1829 SSsymb = SGData['BNSlattsym'][0]+SSsymb[1:] 1835 1830 if SGData.get('SGGray',False): 1836 1831 if SGData.get('SGFixed',False): Mult //= 2 … … 1874 1869 for i,Opr in enumerate(SSGData['SSGOps']): 1875 1870 IOpr = [-Opr[0],-Opr[1]] 1876 SSGTable.append('(%2d) %s'%(i+1,SSMT2text(IOpr))) 1877 if SGData['SGGray']: 1878 SSGTable.append(" for 1'") 1879 for i,Opr in enumerate(SSGData['SSGOps']): 1880 Opr2 = [Opr[0],Opr[1]+np.array([0,0,0,.5])] 1881 SSGTable.append('(%2d) %s'%(i+1,SSMT2text(Opr2))) 1871 SSGTable.append('(%2d) %s'%(i+1+len(SSGData['SSGOps']),SSMT2text(IOpr))) 1882 1872 return SSGText,SSGTable 1883 1873 … … 3542 3532 iAx = abs(Ax[0]) 3543 3533 nA = iAx%100-1 3544 nC = len(SGOps)*(iAx//100) 3534 if SGData['SGInv'] and not SGData['SGFixed']: 3535 nC = 2*len(SGOps)*(iAx//100) 3536 else: 3537 nC = len(SGOps)*(iAx//100) 3545 3538 NA = nA 3546 3539 if Ax[0] < 0: -
trunk/GSASIIstrMath.py
r3778 r3795 1530 1530 Q = HM[:,:,nxs,nxs,nxs]*eDotK[nxs,:,:,:,:]-Kdata[:,nxs,:,:,:] #Mxyz,Nref,Nop,Ntau,Natm 1531 1531 1532 fam = Q*TMcorr[nxs,:,nxs,nxs,:]*cosm[nxs,:,:,nxs,:]*SMag[nxs,nxs,:,:,:] #ditto1533 fbm = Q*TMcorr[nxs,:,nxs,nxs,:]*sinm[nxs,:,:,nxs,:]*SMag[nxs,nxs,:,:,:] #ditto1532 fam = Q*TMcorr[nxs,:,nxs,nxs,:]*cosm[nxs,:,:,nxs,:]*SMag[nxs,nxs,:,:,:]*glWt[nxs,nxs,nxs,:,nxs] #ditto 1533 fbm = Q*TMcorr[nxs,:,nxs,nxs,:]*sinm[nxs,:,:,nxs,:]*SMag[nxs,nxs,:,:,:]*glWt[nxs,nxs,nxs,:,nxs] #ditto 1534 1534 1535 1535 fams = np.sum(np.sum(fam,axis=2),axis=-1) #xyz,Nref,ntau 1536 1536 fbms = np.sum(np.sum(fbm,axis=2),axis=-1) #ditto 1537 1537 1538 fams = np.sum(np.sum(fams **2,axis=0)*glWt[nxs,:],axis=-1)1539 fbms = np.sum(np.sum(fbms **2,axis=0)*glWt[nxs,:],axis=-1)1538 fams = np.sum(np.sum(fams,axis=0)**2,axis=-1) 1539 fbms = np.sum(np.sum(fbms,axis=0)**2,axis=-1) 1540 1540 1541 1541 if 'T' in calcControls[hfx+'histType']:
Note: See TracChangeset
for help on using the changeset viewer.