Changeset 2684
- Timestamp:
- Feb 1, 2017 7:58:04 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIctrls.py
r2656 r2684 1322 1322 the window and only entries matching the entered text are shown. 1323 1323 :param dict extraOpts: a dict containing a entries of form label_i and value_i with extra 1324 options to present to the user, where value_i is the default value. At present only bool1325 values are supported.1324 options to present to the user, where value_i is the default value. 1325 Options are listed ordered by the value_i values. 1326 1326 :param kw: optional keyword parameters for the wx.Dialog may 1327 1327 be included such as size [which defaults to `(320,310)`] and -
trunk/GSASIIgrid.py
r2681 r2684 2072 2072 self.ImageMenu = wx.MenuBar() 2073 2073 self.PrefillDataMenu(self.ImageMenu) 2074 2074 2075 self.ImageEdit = wx.Menu(title='') 2075 self.ImageMenu.Append(menu=self.ImageEdit, title=' Operations')2076 self.ImageMenu.Append(menu=self.ImageEdit, title='Calibration') 2076 2077 self.ImageEdit.Append(help='Calibrate detector by fitting to calibrant lines', 2077 2078 id=wxID_IMCALIBRATE, kind=wx.ITEM_NORMAL,text='Calibrate') … … 2080 2081 self.ImageEdit.Append(help='Recalibrate all images by fitting to calibrant lines', 2081 2082 id=wxID_IMRECALIBALL, kind=wx.ITEM_NORMAL,text='Recalibrate all') 2082 self.ImageEdit.Append(help='Clear calibration data points and rings',id=wxID_IMCLEARCALIB, 2083 kind=wx.ITEM_NORMAL,text='Clear calibration') 2084 self.ImageEdit.Append(help='Integrate selected image',id=wxID_IMINTEGRATE, 2083 self.ImageEdit.Append(help='Clear calibration data points and rings', 2084 id=wxID_IMCLEARCALIB, kind=wx.ITEM_NORMAL,text='Clear calibration') 2085 2086 ImageIntegrate = wx.Menu(title='') 2087 self.ImageMenu.Append(menu=ImageIntegrate, title='Integration') 2088 ImageIntegrate.Append(help='Integrate selected image',id=wxID_IMINTEGRATE, 2085 2089 kind=wx.ITEM_NORMAL,text='Integrate') 2086 self.ImageEdit.Append(help='Integrate all images selected from list',id=wxID_INTEGRATEALL,2090 ImageIntegrate.Append(help='Integrate all images selected from list',id=wxID_INTEGRATEALL, 2087 2091 kind=wx.ITEM_NORMAL,text='Integrate all') 2088 self.ImageEdit.Append(help='Copy image controls to other images', 2092 ImageIntegrate.Append(help='Open Auto-integration window to integrate a series of images', 2093 id=wxID_IMAUTOINTEG, kind=wx.ITEM_NORMAL,text='Auto Integrate') 2094 2095 ImageParams = wx.Menu(title='') 2096 self.ImageMenu.Append(menu=ImageParams, title='Parms') 2097 ImageParams.Append(help='Copy image controls to other images', 2089 2098 id=wxID_IMCOPYCONTROLS, kind=wx.ITEM_NORMAL,text='Copy Controls') 2090 self.ImageEdit.Append(help='Copy selected image controls to other images',2099 ImageParams.Append(help='Copy selected image controls to other images', 2091 2100 id=wxID_IMCOPYSELECTED, kind=wx.ITEM_NORMAL,text='Copy Selected') 2092 self.ImageEdit.Append(help='Save image controls to file',2101 ImageParams.Append(help='Save image controls to file', 2093 2102 id=wxID_IMSAVECONTROLS, kind=wx.ITEM_NORMAL,text='Save Controls') 2094 self.ImageEdit.Append(help='Save controls from selected images to file',2103 ImageParams.Append(help='Save controls from selected images to file', 2095 2104 id=wxID_SAVESELECTEDCONTROLS, kind=wx.ITEM_NORMAL,text='Save Multiple Controls') 2096 self.ImageEdit.Append(help='Load image controls from file',2105 ImageParams.Append(help='Load image controls from file', 2097 2106 id=wxID_IMLOADCONTROLS, kind=wx.ITEM_NORMAL,text='Load Controls') 2098 self.ImageEdit.Append(help='Transfer integration range for other detector distances',2107 ImageParams.Append(help='Transfer integration range for other detector distances', 2099 2108 id=wxID_IMXFERCONTROLS, kind=wx.ITEM_NORMAL,text='Xfer angles') 2100 self.ImageEdit.Append(help='Open Auto-integration window to integrate a series of images', 2101 id=wxID_IMAUTOINTEG, kind=wx.ITEM_NORMAL,text='Auto Integrate') 2109 2102 2110 self.PostfillDataMenu() 2103 2111 -
trunk/GSASIIimgGUI.py
r2682 r2684 312 312 'calibskip','pixLimit','cutoff','calibdmin','Flat Bkg','varyList', 313 313 'binType','SampleShape','PolaVal','SampleAbs','dark image','background image'] 314 keyText = [i+'='+str(data[i]) for i in keyList] 314 keyList.sort(key=lambda s: s.lower()) 315 keyText = [i+' = '+str(data[i]) for i in keyList] 315 316 # sort both lists together, ordered by keyText 316 317 selectedKeys = [] … … 474 475 Names.pop(Names.index(Source)) 475 476 # select targets & do copy 476 extraopts = {"label_1":"Xfer scaled calib d-min", "value_1":False} 477 extraopts = {"label_1":"Xfer scaled calib d-min", "value_1":False, 478 "label_2":"Xfer scaled 2-theta min", "value_2":False, 479 "label_3":"Xfer scaled 2-theta max", "value_3":True, 480 } 477 481 dlg = G2G.G2MultiChoiceDialog(G2frame,'Xfer angles', 478 482 'Transfer integration range from '+Source+' to:',Names, … … 480 484 try: 481 485 if dlg.ShowModal() == wx.ID_OK: 482 #xferAng = lambda tth,dist1,dist2: asind(dist1 * sind(tth) / dist2) 486 for i in '_1','_2','_3': 487 if extraopts['value'+i]: break 488 else: 489 G2G.G2MessageBox(G2frame,'Nothing to do!') 490 return 483 491 xferAng = lambda tth,dist1,dist2: atand(dist1 * tand(tth) / dist2) 484 492 items = dlg.GetSelections() … … 497 505 data = G2frame.PatternTree.GetItemPyData(G2gd.GetPatternTreeItemId(G2frame,Id,'Image Controls')) 498 506 dist1 = data['distance'] 499 if ttmin0 < 1.0:500 data['IOtth'] = [ttmin0,xferAng(ttmax0,dist0,dist1)]501 else:502 data['IOtth'] = [xferAng(ttmin0,dist0,dist1),xferAng(ttmax0,dist0,dist1)]507 if extraopts["value_2"]: 508 data['IOtth'][0] = xferAng(ttmin0,dist0,dist1) 509 if extraopts["value_3"]: 510 data['IOtth'][1] = xferAng(ttmax0,dist0,dist1) 503 511 if extraopts["value_1"]: 504 512 ang1 = xferAng(2.0*asind(wave0/(2.*dsp0)),dist0,dist1)
Note: See TracChangeset
for help on using the changeset viewer.