- Timestamp:
- Jan 30, 2017 2:25:48 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/GSASII.py ¶
r2669 r2674 3152 3152 DelItemList = [] 3153 3153 nItems = {'PWDR':0,'SASD':0,'IMG':0,'HKLF':0,'PDF':0} 3154 PDFnames = [] 3154 3155 if self.PatternTree.GetCount(): 3155 3156 item, cookie = self.PatternTree.GetFirstChild(self.root) … … 3162 3163 if 'IMG' in name: nItems['IMG'] += 1 3163 3164 if 'HKLF' in name: nItems['HKLF'] += 1 3164 if 'PDF' in name: nItems['PDF'] += 1 3165 if 'PDF' in name: 3166 PDFnames.append(name) 3167 nItems['PDF'] += 1 3165 3168 TextList.append(name) 3166 3169 item, cookie = self.PatternTree.GetNextChild(self.root, cookie) 3170 for pdfName in PDFnames: 3171 TextList.remove('PWDR'+pdfName[4:]) 3167 3172 dlg = G2G.G2MultiChoiceDialog(self, 'Which data to delete?', 'Delete data', TextList, wx.CHOICEDLG_STYLE) 3168 3173 try: -
TabularUnified trunk/GSASIIElemGUI.py ¶
r2668 r2674 26 26 class PickElement(wx.Dialog): 27 27 '''Makes periodic table widget for picking element. Modes: 28 oneOnly if True element symbols are provided, otherwise select isotope29 ifNone ?28 oneOnly if True element symbols are provided, otherwise select valence 29 ifNone if True show None button 30 30 ifMag if True present magnetic scatters only 31 31 multiple if True multiple elements can be selected … … 72 72 def ElButton(self, name, pos, tip, color): 73 73 'Creates an element button widget' 74 self.color = color 74 75 if not self.ifNone and name[0] == 'None': 75 76 return … … 105 106 self.Elem = El 106 107 if self.multiple: 107 self.elementList.append(El) 108 event.GetEventObject().SetBackgroundColour('black') # Shows on Mac 108 if El in self.elementList: 109 self.elementList.remove(El) 110 event.GetEventObject().SetBackgroundColour(self.color) # Shows on Mac 111 else: 112 self.elementList.append(El) 113 event.GetEventObject().SetBackgroundColour('black') # Shows on Mac 109 114 event.GetEventObject().SetColour( 110 115 wx.Colour(*[int(i/2) for i in event.GetEventObject().GetColour()])) -
TabularUnified trunk/GSASIIgrid.py ¶
r2660 r2674 99 99 100 100 [ wxID_MASKCOPY, wxID_MASKSAVE, wxID_MASKLOAD, wxID_NEWMASKSPOT,wxID_NEWMASKARC,wxID_NEWMASKRING, 101 wxID_NEWMASKFRAME, wxID_NEWMASKPOLY,wxID_MASKLOADNOT,wxID_FINDSPOTS, 102 ] = [wx.NewId() for item in range(1 0)]101 wxID_NEWMASKFRAME, wxID_NEWMASKPOLY,wxID_MASKLOADNOT,wxID_FINDSPOTS,wxID_DELETESPOTS 102 ] = [wx.NewId() for item in range(11)] 103 103 104 104 [ wxID_STRSTACOPY, wxID_STRSTAFIT, wxID_STRSTASAVE, wxID_STRSTALOAD,wxID_STRSTSAMPLE, … … 2121 2121 self.MaskEdit.Append(help='Auto search for spot masks; NB: will clear old spot masks', 2122 2122 id=wxID_FINDSPOTS, kind=wx.ITEM_NORMAL,text='Auto spot masks') 2123 self.MaskEdit.Append(help='Delete all spot masks', 2124 id=wxID_DELETESPOTS, kind=wx.ITEM_NORMAL,text='Delete spot masks') 2123 2125 submenu.Append(help='Create an arc mask with mouse input', 2124 2126 id=wxID_NEWMASKARC, kind=wx.ITEM_NORMAL,text='Arc mask') -
TabularUnified trunk/GSASIIimgGUI.py ¶
r2673 r2674 1320 1320 G2frame.ErrorDialog('Auto spot search error',Error) 1321 1321 wx.CallAfter(UpdateMasks,G2frame,data) 1322 wx.CallAfter(G2plt.PlotExposedImage,G2frame,event=event) 1322 wx.CallAfter(G2plt.PlotExposedImage,G2frame,event=event) 1323 1324 def OnDeleteSpotMask(event): 1325 data['Points'] = [] 1326 wx.CallAfter(UpdateMasks,G2frame,data) 1327 wx.CallAfter(G2plt.PlotExposedImage,G2frame,event=event) 1323 1328 1324 1329 def ToggleSpotMaskMode(event): … … 1513 1518 G2frame.dataFrame.Bind(wx.EVT_MENU, OnSaveMask, id=G2gd.wxID_MASKSAVE) 1514 1519 G2frame.dataFrame.Bind(wx.EVT_MENU, OnAutoSpotMask, id=G2gd.wxID_FINDSPOTS) 1520 G2frame.dataFrame.Bind(wx.EVT_MENU, OnDeleteSpotMask, id=G2gd.wxID_DELETESPOTS) 1515 1521 G2frame.dataFrame.Bind(wx.EVT_MENU, ToggleSpotMaskMode, id=G2gd.wxID_NEWMASKSPOT) 1516 1522 G2frame.dataFrame.Bind(wx.EVT_MENU, OnNewArcMask, id=G2gd.wxID_NEWMASKARC) -
TabularUnified trunk/GSASIIpwdGUI.py ¶
r2673 r2674 4933 4933 def OnAddElement(event): 4934 4934 ElList = data['ElList'] 4935 PE = G2elemGUI.PickElement(G2frame,oneOnly=True,multiple=True) 4935 choice = ElList.keys() 4936 PE = G2elemGUI.PickElements(G2frame,choice) 4936 4937 if PE.ShowModal() == wx.ID_OK: 4937 for El in PE. elementList:4938 if El not in ElList and El != 'None':4938 for El in PE.Elem: 4939 if El not in ElList: 4939 4940 try: 4940 4941 data['ElList'][El] = G2elem.GetElInfo(El,inst) … … 5251 5252 noRing.SetValue(data['noRing']) 5252 5253 noRing.Bind(wx.EVT_CHECKBOX, OnNoRing) 5253 sqBox.Add(noRing,0 )5254 sqBox.Add(noRing,0,WACV) 5254 5255 mainSizer.Add(sqBox,0) 5255 5256 … … 5326 5327 Source = G2frame.PatternTree.GetItemText(G2frame.PatternId) 5327 5328 if len(TextList) == 1: 5328 G2frame.ErrorDialog('Nothing to copy controls to','There must be more than one "PDF" pattern')5329 G2frame.ErrorDialog('Nothing to copy PDF peaks to','There must be more than one "PDF" pattern') 5329 5330 return 5330 5331 dlg = G2G.G2MultiChoiceDialog(G2frame,'Copy PDF peaks','Copy peaks from '+Source+' to:',TextList) … … 5342 5343 5343 5344 def OnFitPDFpeaks(event): 5345 PatternId = G2frame.PatternId 5346 data = G2frame.PatternTree.GetItemPyData(G2gd.GetPatternTreeItemId(G2frame,PatternId, 'PDF Controls'))['G(R)'] 5347 peaks = G2frame.PatternTree.GetItemPyData(G2gd.GetPatternTreeItemId(G2frame,PatternId, 'PDF Peaks')) 5348 if not peaks: 5349 G2frame.ErrorDialog('No peaks!','Nothing to fit!') 5350 return 5351 5344 5352 print 'fit peaks' 5345 5353
Note: See TracChangeset
for help on using the changeset viewer.