- Timestamp:
- Jun 16, 2022 1:28:02 PM (3 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/GSASIIdataGUI.py ¶
r5301 r5303 6469 6469 6470 6470 # PWDR / Index Peak List 6471 G2G.Define_wxId('wxID_INDXRELOAD','wxID_INDEXSAVE', )6471 G2G.Define_wxId('wxID_INDXRELOAD','wxID_INDEXSAVE','wxID_INDEXEXPORTDICVOL') 6472 6472 self.IndPeaksMenu = wx.MenuBar() 6473 6473 self.PrefillDataMenu(self.IndPeaksMenu) … … 6476 6476 self.IndPeaksEdit.Append(G2G.wxID_INDXRELOAD,'Load/Reload','Load/Reload index peaks from peak list') 6477 6477 self.IndPeaksEdit.Append(G2G.wxID_INDEXSAVE,'Save','Save index peaks to CSV file') 6478 self.IndPeaksEdit.Append(G2G.wxID_INDEXEXPORTDICVOL,'Export to PreDICT','Export index peaks to PreDICT (.csv)') 6478 6479 self.PostfillDataMenu() 6479 6480 -
TabularUnified trunk/GSASIIpwdGUI.py ¶
r5301 r5303 3276 3276 dlg.Destroy() 3277 3277 3278 def OnExportPreDICT(event): 3279 'Place 2theta positions from Index Peak List into clipboard for cut-&-paste' 3280 if wx.TheClipboard.Open(): 3281 txt = '' 3282 c = 0 3283 for refl in data[0]: 3284 if refl[2]: 3285 c += 1 3286 txt += '{}\n'.format(refl[0]) 3287 wx.TheClipboard.SetData(wx.TextDataObject(txt)) 3288 wx.TheClipboard.Close() 3289 else: 3290 G2frame.ErrorDialog('Clipboard locked','Sorry, unable to access the clipboard, try again later. You might need to restart GSAS-II or reboot') 3291 return 3292 G2G.G2MessageBox(G2frame, 3293 '{} reflection positions placed in clipboard. '.format(c)+ 3294 'In PreDICT open the DICVOL input. Update the number of ' 3295 'reflections (& wavelength if needed) in GUI. Then' 3296 ' use paste to replace the reflections ' 3297 '(starting at line 6...) in the DICVOL input.', 3298 'DICVOL input generated') 3299 3278 3300 def KeyEditPickGrid(event): 3279 3301 colList = G2frame.indxPeaks.GetSelectedCols() … … 3301 3323 G2frame.Bind(wx.EVT_MENU, OnReload, id=G2G.wxID_INDXRELOAD) 3302 3324 G2frame.Bind(wx.EVT_MENU, OnSave, id=G2G.wxID_INDEXSAVE) 3325 G2frame.Bind(wx.EVT_MENU, OnExportPreDICT, id=G2G.wxID_INDEXEXPORTDICVOL) 3303 3326 G2frame.dataWindow.IndexPeaks.Enable(False) 3304 3327 G2frame.IndexPeaksTable = []
Note: See TracChangeset
for help on using the changeset viewer.