Changeset 2491
- Timestamp:
- Oct 13, 2016 10:34:04 AM (7 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASII.py
r2486 r2491 3008 3008 if item in refList: 3009 3009 del(refList[item]) 3010 self.PatternTree.SetItemPyData(Id,refList)3010 # self.PatternTree.SetItemPyData(Id,refList) 3011 3011 elif 'HKLF' in name: 3012 3012 data = self.PatternTree.GetItemPyData(item) 3013 3013 data[0] = {} 3014 self.PatternTree.SetItemPyData(item,data)3014 # self.PatternTree.SetItemPyData(item,data) 3015 3015 3016 3016 item, cookie = self.PatternTree.GetNextChild(self.root, cookie) -
trunk/GSASIIIO.py
r2486 r2491 1987 1987 self.parmDict.update(rbDict) 1988 1988 rbIds = rigidbodyDict.get('RBIds',{'Vector':[],'Residue':[]}) 1989 Natoms,atomIndx,phaseVary,phaseDict,pawleyLookup,FFtables,BLtables, maxSSwave = G2stIO.GetPhaseData(1989 Natoms,atomIndx,phaseVary,phaseDict,pawleyLookup,FFtables,BLtables,MFtables,maxSSwave = G2stIO.GetPhaseData( 1990 1990 Phases,RestraintDict=None,rbIds=rbIds,Print=False) 1991 1991 self.parmDict.update(phaseDict) -
trunk/GSASIIconstrGUI.py
r2489 r2491 1168 1168 elif warnmsg: 1169 1169 print 'Unexpected contraint warning:\n',warnmsg 1170 1171 ################################################################################ 1172 #### Make nuclear-magnetic phase constraints - called by OnTransform in G2phsGUI 1173 ################################################################################ 1174 1175 def MagConstraints(G2frame,oldPhase,newPhase,Trans,Vec): 1176 print 'make nuclear-magnetic phase constraints here' 1170 1177 1171 1178 ################################################################################ -
trunk/GSASIIgrid.py
r2486 r2491 531 531 self.Common = 'abc' 532 532 self.ifMag = False 533 self.ifConstr = True 533 534 self.Draw() 534 535 … … 623 624 def OnMag(event): 624 625 self.ifMag = mag.GetValue() 626 627 def OnConstr(event): 628 self.ifConstr = constr.GetValue() 625 629 626 630 self.panel.Destroy() … … 686 690 mainSizer.Add(wx.StaticText(self.panel, \ 687 691 label=' NB: Nonmagnetic atoms will be deleted from new phase'),0,WACV) 692 constr = wx.CheckBox(self.panel,label=' Make constraints between phases?') 693 constr.SetValue(self.ifConstr) 694 constr.Bind(wx.EVT_CHECKBOX,OnConstr) 695 mainSizer.Add(constr,0,WACV) 688 696 689 697 TestBtn = wx.Button(self.panel,-1,"Test") … … 710 718 self.Phase['General']['Name'] += ' %s'%(self.Common) 711 719 self.Phase['General']['Cell'][1:] = G2lat.TransformCell(self.oldCell[:6],self.Trans) 712 return self.Phase,self.Trans,self.Vec,self.ifMag 720 return self.Phase,self.Trans,self.Vec,self.ifMag,self.ifConstr 713 721 714 722 def OnOk(self,event): -
trunk/GSASIIphsGUI.py
r2486 r2491 50 50 import GSASIIobj as G2obj 51 51 import GSASIIctrls as G2G 52 import GSASIIconstrGUI as G2cnstG 52 53 import atmdata 53 54 import numpy as np … … 1383 1384 try: 1384 1385 if dlg.ShowModal() == wx.ID_OK: 1385 newPhase,Trans,Vec,ifMag = dlg.GetSelection()1386 newPhase,Trans,Vec,ifMag,ifConstr = dlg.GetSelection() 1386 1387 else: 1387 1388 return … … 1405 1406 G2gd.GetPatternTreeItemId(G2frame,G2frame.root,'Phases'),text=phaseName) 1406 1407 G2frame.PatternTree.SetItemPyData(sub,newPhase) 1408 if ifMag and ifConstr: 1409 G2cnstG.MagConstraints(G2frame,data,newPhase,Trans,Vec) #data is old phase 1407 1410 G2gd.MovePatternTreeToGrid(G2frame,sub) #bring up new phase General tab 1408 1411 # if nuc - mag transformtion: make constraints here? Needed for Type 4 magnetics -
trunk/GSASIIpwdGUI.py
r2431 r2491 3396 3396 pId = G2gd.GetPatternTreeItemId(G2frame,G2frame.root,'Phases') 3397 3397 phaseId = G2gd.GetPatternTreeItemId(G2frame,pId,phaseName) 3398 if not phaseId: #phase deleted 3399 return None 3398 3400 General = G2frame.PatternTree.GetItemPyData(phaseId)['General'] 3399 3401 Super = General.get('Super',0) … … 3490 3492 if G2frame.refTable[phaseName].GetTable() is None: 3491 3493 PeakTable = MakeReflectionTable(phaseName) 3494 if PeakTable == None: 3495 return 3492 3496 G2frame.refTable[phaseName].SetTable(PeakTable, True) 3493 3497 G2frame.refTable[phaseName].EnableEditing(False) -
trunk/GSASIIstrMath.py
r2486 r2491 694 694 if SGData['SGInv']: 695 695 Gdata = np.hstack((Gdata,-Gdata)) #inversion if any 696 Nops *= 2697 696 Gdata = np.repeat(Gdata,Ncen,axis=1) #dup over cell centering 698 697 Gdata = SGData['MagMom'][nxs,:,nxs]*Gdata #flip vectors according to spin flip … … 769 768 if 'N' in calcControls[hfx+'histType'] and parmDict[pfx+'isMag']: 770 769 MF = refDict['FF']['MF'][iBeg:iFin].T[Tindx].T #Nref,Natm 771 # TMcorr = 0.5*0.539*Tcorr[:,0,:]*MF*len(SGMT)/Mdata #Nref,Natm 772 TMcorr = 0.539*Tcorr[:,0,:]*MF/Nops #Nref,Natm 770 TMcorr = 0.5*0.539*(np.reshape(Tiso,Tuij.shape)*Tuij)[:,0,:]*Mdata*MF/(Nops*Ncen) #Nref,Natm 773 771 if SGData['SGInv']: 774 772 mphase = np.hstack((phase,-phase)) 773 TMcorr = TMcorr/2. 775 774 else: 776 775 mphase = phase
Note: See TracChangeset
for help on using the changeset viewer.