Changeset 2298
- Timestamp:
- May 27, 2016 2:48:22 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIIO.py
r2297 r2298 902 902 nOcc += 1 903 903 item, cookie = G2frame.PatternTree.GetNextChild(G2frame.root, cookie) 904 Aname += '(%3d)'%(nOcc) 904 if nOcc: 905 Aname += '(%d)'%(nOcc) 905 906 Sample = G2pdG.SetDefaultSample() 906 907 Sample['Gonio. radius'] = data['distance'] -
trunk/GSASIIexprGUI.py
r1770 r2298 676 676 self.OKbtn.Enable() 677 677 if self.ExtraBtn: self.ExtraBtn.Enable() 678 679 #========================================================================== 680 #class BondDialog(wx.Dialog): 681 '''A wx.Dialog that allows a user to select a bond length to be evaluated. 682 What needs to be done here? Need phase info for atoms 683 0. Select phase 684 1. Select 1st atom from dialog 685 2. Find neighbors & select one from dialog 686 3. Set up distance equation & save it - has to look like result from Show in above ExpressionDialog 687 Use existing bond & esd calculate routines 688 ''' 689 #========================================================================== 690 #class AngleDialog(wx.Dialog): 691 '''A wx.Dialog that allows a user to select a bond angle to be evaluated. 692 What needs to be done here? Need phase info for atom 693 0. Select phase 694 1. Select 1st atom from dialog 695 2. Find neighbors & select two from dialog 696 3. Set up angle equation & save it - has to look like result from Show in above ExpressionDialog 697 Use existing angle & esd calculate routines 698 ''' 678 699 679 700 if __name__ == "__main__": -
trunk/GSASIIgrid.py
r2272 r2298 136 136 [ wxID_RENAMESEQSEL,wxID_SAVESEQSEL,wxID_SAVESEQSELCSV,wxID_SAVESEQCSV,wxID_PLOTSEQSEL, 137 137 wxID_ORGSEQSEL,wxADDSEQVAR,wxDELSEQVAR,wxEDITSEQVAR,wxCOPYPARFIT,wxID_AVESEQSEL, 138 wxADDPARFIT,wxDELPARFIT,wxEDITPARFIT,wxDOPARFIT, 139 ] = [wx.NewId() for item in range(1 5)]138 wxADDPARFIT,wxDELPARFIT,wxEDITPARFIT,wxDOPARFIT,wxADDSEQDIST,wxADDSEQANGLE 139 ] = [wx.NewId() for item in range(17)] 140 140 141 141 [ wxID_MODELCOPY,wxID_MODELFIT,wxID_MODELADD,wxID_ELEMENTADD,wxID_ELEMENTDELETE, … … 1464 1464 help='Add a new pseudo-variable') 1465 1465 self.SequentialPvars.Append( 1466 id=wxADDSEQDIST, kind=wx.ITEM_NORMAL,text='Add dist', 1467 help='Add a new bond distance pseudo-variable') 1468 self.SequentialPvars.Append( 1469 id=wxADDSEQANGLE, kind=wx.ITEM_NORMAL,text='Add angle', 1470 help='Add a new bond angle pseudo-variable') 1471 self.SequentialPvars.Append( 1466 1472 id=wxDELSEQVAR, kind=wx.ITEM_NORMAL,text='Delete', 1467 1473 help='Delete an existing pseudo-variable') … … 2753 2759 Controls['SeqPseudoVars'][calcobj.eObj.expression] = obj 2754 2760 UpdateSeqResults(G2frame,data,G2frame.dataDisplay.GetSize()) # redisplay variables 2755 2761 2762 def AddNewDistPseudoVar(event): 2763 print 'Add bond distance pseudo-variable here - TBD' 2764 # dlg = G2exG.BondDialog( 2765 # G2frame.dataDisplay,PSvarDict, 2766 # header='Select a Bond here', 2767 # VarLabel = "New Bond", 2768 # fit=False) 2769 # obj = dlg.Show(True) 2770 # dlg.Destroy() 2771 # if obj: 2772 # calcobj = G2obj.ExpressionCalcObj(obj) 2773 # Controls['SeqPseudoVars'][calcobj.eObj.expression] = obj 2774 # UpdateSeqResults(G2frame,data,G2frame.dataDisplay.GetSize()) # redisplay variables 2775 2776 def AddNewAnglePseudoVar(event): 2777 print 'Add bond angle pseudo-variable here - TBD' 2778 # dlg = G2exG.AngleDialog( 2779 # G2frame.dataDisplay,PSvarDict, 2780 # header='Enter an Angle here', 2781 # VarLabel = "New Angle", 2782 # fit=False) 2783 # obj = dlg.Show(True) 2784 # dlg.Destroy() 2785 # if obj: 2786 # calcobj = G2obj.ExpressionCalcObj(obj) 2787 # Controls['SeqPseudoVars'][calcobj.eObj.expression] = obj 2788 # UpdateSeqResults(G2frame,data,G2frame.dataDisplay.GetSize()) # redisplay variables 2756 2789 def UpdateParmDict(parmDict): 2757 2790 '''generate the atom positions and the direct & reciprocal cell values, … … 3181 3214 G2frame.dataFrame.Bind(wx.EVT_MENU, OnReOrgSelSeq, id=wxID_ORGSEQSEL) 3182 3215 G2frame.dataFrame.Bind(wx.EVT_MENU, AddNewPseudoVar, id=wxADDSEQVAR) 3216 G2frame.dataFrame.Bind(wx.EVT_MENU, AddNewDistPseudoVar, id=wxADDSEQDIST) 3217 G2frame.dataFrame.Bind(wx.EVT_MENU, AddNewAnglePseudoVar, id=wxADDSEQANGLE) 3183 3218 G2frame.dataFrame.Bind(wx.EVT_MENU, DelPseudoVar, id=wxDELSEQVAR) 3184 3219 G2frame.dataFrame.Bind(wx.EVT_MENU, EditPseudoVar, id=wxEDITSEQVAR) … … 3382 3417 # Make dict needed for creating & editing pseudovars (PSvarDict). 3383 3418 name = histNames[0] 3384 parmDict = data[name].get('parmDict' )3419 parmDict = data[name].get('parmDict',{}) 3385 3420 PSvarDict = parmDict.copy() 3386 3421 PSvarDict.update(sampleParms) -
trunk/GSASIIplot.py
r2297 r2298 276 276 treeItems, tabname = self.treeItem[tabLabel] 277 277 pid = self.G2frame.root 278 for item in treeItems: 279 pid = G2gd.GetPatternTreeItemId(self.G2frame, pid, item) 280 wx.CallLater(100,self.InvokeTreeItem,pid) 278 try: 279 for item in treeItems: 280 pid = G2gd.GetPatternTreeItemId(self.G2frame, pid, item) 281 wx.CallLater(100,self.InvokeTreeItem,pid) 282 except TypeError: 283 pass 281 284 else: 282 285 print 'OnPageChanged: not found:',tabLabel
Note: See TracChangeset
for help on using the changeset viewer.