Changeset 4370 for trunk/GSASIIddataGUI.py
- Timestamp:
- Mar 15, 2020 2:57:46 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/GSASIIddataGUI.py ¶
r4080 r4370 263 263 wx.CallLater(100,RepaintHistogramInfo,DData.GetScrollPos(wx.VERTICAL)) 264 264 265 def OnHstrainRef(event):266 Obj = event.GetEventObject()267 hist,pid = Indx[Obj.GetId()]268 UseList[G2frame.hist]['HStrain'][1][pid] = Obj.GetValue()269 270 def OnHstrainVal(event):271 event.Skip()272 Obj = event.GetEventObject()273 hist,pid = Indx[Obj.GetId()]274 try:275 strain = float(Obj.GetValue())276 UseList[G2frame.hist]['HStrain'][0][pid] = strain277 except ValueError:278 pass279 Obj.SetValue("%.3g"%(UseList[G2frame.hist]['HStrain'][0][pid])) #reset in case of error280 281 265 def OnPOAxis(event): 282 266 event.Skip() … … 477 461 478 462 def HstrainSizer(): 463 464 def OnHstrainRef(event): 465 Obj = event.GetEventObject() 466 hist,pid = Indx[Obj.GetId()] 467 UseList[G2frame.hist]['HStrain'][1][pid] = Obj.GetValue() 468 469 def OnHstrainVal(event): 470 event.Skip() 471 Obj = event.GetEventObject() 472 hist,pid = Indx[Obj.GetId()] 473 try: 474 strain = float(Obj.GetValue()) 475 UseList[G2frame.hist]['HStrain'][0][pid] = strain 476 except ValueError: 477 pass 478 Obj.SetValue("%.3g"%(UseList[G2frame.hist]['HStrain'][0][pid])) #reset in case of error 479 479 480 hstrainSizer = wx.FlexGridSizer(0,6,5,5) 480 481 Hsnames = G2spc.HStrainNames(SGData) … … 689 690 flackSizer.Add(flackVal,0,WACV) 690 691 return flackSizer 692 693 def DispSizer(): 694 695 def OnDispRef(event): 696 Obj = event.GetEventObject() 697 UseList[G2frame.hist]['Layer Disp'][1] = Obj.GetValue() 698 699 dispSizer = wx.BoxSizer(wx.HORIZONTAL) 700 dispRef = wx.CheckBox(DData,wx.ID_ANY,label=' Layer displacement (\xb5m): ') 701 dispRef.SetValue(UseList[G2frame.hist]['Layer Disp'][1]) 702 dispRef.Bind(wx.EVT_CHECKBOX, OnDispRef) 703 dispSizer.Add(dispRef,0,WACV|wx.LEFT,5) 704 dispSizer.Add(G2G.ValidatedTxtCtrl(DData,UseList[G2frame.hist]['Layer Disp'],0,nDig=(10,2),typeHint=float),0,WACV) 705 return dispSizer 691 706 692 707 def twinSizer(): … … 903 918 G2frame.hist+' not in GSAS-II data tree') 904 919 return 905 if 'Use' not in UseList[G2frame.hist]: #patch 920 #patch 921 if 'Use' not in UseList[G2frame.hist]: 906 922 UseList[G2frame.hist]['Use'] = True 907 923 if 'LeBail' not in UseList[G2frame.hist]: … … 913 929 if 'Fix FXU' not in UseList[G2frame.hist]: 914 930 UseList[G2frame.hist]['Fix FXU'] = ' ' 931 if 'Flack' not in UseList[G2frame.hist]: 932 UseList[G2frame.hist]['Flack'] = [0.0,False] 933 if 'Twins' not in UseList[G2frame.hist]: 934 UseList[G2frame.hist]['Twins'] = [[np.array([[1,0,0],[0,1,0],[0,0,1]]),[1.0,False]],] 935 if 'Layer Disp' not in UseList[G2frame.hist]: 936 UseList[G2frame.hist]['Layer Disp'] = [0.0,False] 937 #end patch 915 938 bottomSizer = wx.BoxSizer(wx.VERTICAL) 916 939 useBox = wx.BoxSizer(wx.HORIZONTAL) … … 1003 1026 bottomSizer.Add(wx.StaticText(DData,wx.ID_ANY,' Hydrostatic/elastic strain:')) 1004 1027 bottomSizer.Add(HstrainSizer()) 1028 bottomSizer.Add(DispSizer()) 1005 1029 1006 1030 poSizer = wx.BoxSizer(wx.VERTICAL) … … 1029 1053 bottomSizer.Add(BabSizer(),0,WACV|wx.BOTTOM,5) 1030 1054 elif G2frame.hist[:4] == 'HKLF': 1031 #patch1032 if 'Flack' not in UseList[G2frame.hist]:1033 UseList[G2frame.hist]['Flack'] = [0.0,False]1034 if 'Twins' not in UseList[G2frame.hist]:1035 UseList[G2frame.hist]['Twins'] = [[np.array([[1,0,0],[0,1,0],[0,0,1]]),[1.0,False]],]1036 #end patch1037 1055 bottomSizer.Add(ExtSizer('HKLF'),0,WACV|wx.BOTTOM,5) 1038 1056 bottomSizer.Add(BabSizer(),0,WACV|wx.BOTTOM,5)
Note: See TracChangeset
for help on using the changeset viewer.