Changeset 1837
- Timestamp:
- May 5, 2015 4:28:26 PM (9 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIIO.py
r1834 r1837 1255 1255 'PFhkl':[0,0,1], 1256 1256 'PFxyz':[0,0,1], 1257 'PlotType':'Pole figure'}}, 1257 'PlotType':'Pole figure', 1258 'Penalty':[['',],0.1,False,1.0]}}, 1258 1259 'Atoms':[], 1259 1260 'Drawing':{}, -
trunk/GSASIIddataGUI.py
r1835 r1837 916 916 if DData.GetSizer(): 917 917 DData.GetSizer().Clear(True) 918 useList = [] 919 for name in keyList: 920 if name in UseList: 921 useList.append(name) 918 922 mainSizer = wx.BoxSizer(wx.VERTICAL) 919 923 mainSizer.Add(wx.StaticText(DData,wx.ID_ANY,' Histogram data for '+PhaseName+':'),0,WACV) 920 924 if G2frame.hist != '': 921 useList = UseList.keys()922 925 topSizer = wx.FlexGridSizer(1,2,5,5) 923 926 select = wx.ListBox(DData,choices=useList,style=wx.LB_SINGLE,size=(-1,120)) -
trunk/GSASIImath.py
r1830 r1837 1745 1745 break 1746 1746 1747 # for hist in keyList:1748 # print ' Texture corrections for '+hist1749 # for ref in refData[hist]:1750 # print ' %d %d %d %.3f %.3f'%(int(ref[0]),int(ref[1]),int(ref[2]),ref[5],ref[6])1751 1747 if ncyc: 1752 1748 for parm in parmDict: -
trunk/GSASIIphsGUI.py
r1835 r1837 216 216 generalData['F000X'] = F000X 217 217 generalData['F000N'] = F000N 218 generalData['Mass'] = G2mth.getMass(generalData) 218 219 219 220 … … 3614 3615 wx.CallAfter(G2plt.PlotTexture,G2frame,data) 3615 3616 3617 def SHPenalty(Penalty): 3618 3619 def OnHKLList(event): 3620 dlg = G2G.G2MultiChoiceDialog(G2frame, 'Select penalty hkls', 3621 'Penalty hkls',hkls,filterBox=False) 3622 try: 3623 if dlg.ShowModal() == wx.ID_OK: 3624 Penalty[0] = [hkls[i] for i in dlg.GetSelections()] 3625 if not Penalty[0]: 3626 Penalty[0] = ['',] 3627 else: 3628 return 3629 finally: 3630 dlg.Destroy() 3631 wx.CallLater(100,UpdateTexture) 3632 3633 def OnshToler(event): 3634 try: 3635 value = float(shToler.GetValue()) 3636 Penalty[1] = value 3637 except ValueError: 3638 pass 3639 shToler.SetValue('%.2f'%(Penalty[1])) 3640 3641 A = G2lat.cell2A(generalData['Cell'][1:7]) 3642 hkls = G2lat.GenPfHKLs(10,SGData,A) 3643 shPenalty = wx.BoxSizer(wx.HORIZONTAL) 3644 shPenalty.Add(wx.StaticText(Texture,wx.ID_ANY,' Negative MRD penalty list: '),0,WACV) 3645 shPenalty.Add(wx.ComboBox(Texture,value=Penalty[0][0],choices=Penalty[0], 3646 style=wx.CB_DROPDOWN),0,WACV) 3647 hklList = wx.Button(Texture,label='Select penalty hkls') 3648 hklList.Bind(wx.EVT_BUTTON,OnHKLList) 3649 shPenalty.Add(hklList,0,WACV) 3650 shPenalty.Add(wx.StaticText(Texture,wx.ID_ANY,' Zero MRD tolerance: '),0,WACV) 3651 shToler = wx.TextCtrl(Texture,wx.ID_ANY,'%.2f'%(Penalty[1]),style=wx.TE_PROCESS_ENTER) 3652 shToler.Bind(wx.EVT_TEXT_ENTER,OnshToler) 3653 shToler.Bind(wx.EVT_KILL_FOCUS,OnshToler) 3654 shPenalty.Add(shToler,0,WACV) 3655 return shPenalty 3656 3616 3657 # UpdateTexture executable starts here 3617 3658 #Texture.DestroyChildren() # bad, deletes scrollbars on Mac! … … 3634 3675 except KeyError: 3635 3676 textureData.update({'PFxyz':[0,0,1.],'PlotType':'Pole figure'}) 3677 if 'Penalty' not in textureData: 3678 textureData['Penalty'] = [['',],0.1,False,1.0] 3636 3679 shModels = ['cylindrical','none','shear - 2/m','rolling - mmm'] 3637 3680 SamSym = dict(zip(shModels,['0','-1','2/m','mmm'])) … … 3736 3779 angSizer.Add(angVal,0,WACV|wx.LEFT,5) 3737 3780 mainSizer.Add(angSizer,0,WACV|wx.LEFT,5) 3781 # mainSizer.Add(SHPenalty(textureData['Penalty']),0,WACV|wx.LEFT,5) for future 3738 3782 SetPhaseWindow(G2frame.dataFrame,Texture,mainSizer) 3739 3783 … … 5941 5985 if Error: 5942 5986 wx.MessageBox(Error,caption='Fit Texture Error',style=wx.ICON_EXCLAMATION) 5987 for hist in keyList: 5988 print ' Texture corrections for '+hist 5989 for ref in refData[hist]: 5990 print ' %d %d %d %.3f %.3f'%(int(ref[0]),int(ref[1]),int(ref[2]),ref[5],ref[6]) 5943 5991 UpdateTexture() 5944 5992 G2plt.PlotTexture(G2frame,data,Start=False)
Note: See TracChangeset
for help on using the changeset viewer.