Changeset 5273
- Timestamp:
- May 10, 2022 10:59:01 AM (9 months ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIpwd.py
r5271 r5273 1384 1384 The default is peakFitMode=True. This is changed only in 1385 1385 :func:`setPeakInstPrmMode`, which is called from :mod:`GSASIIscriptable` 1386 or GSASII OnSetPeakWidMode ('Gen unvaried widths' menu item).1386 or GSASIIphsGUI.OnSetPeakWidMode ('Gen unvaried widths' menu item). 1387 1387 ''' 1388 1388 … … 2338 2338 2339 2339 def SetPeaksParms(dataType,Peaks): 2340 '''Set the contents of peakDict from list Peaks 2341 ''' 2340 2342 peakDict = {} 2341 2343 peakVary = [] … … 2355 2357 2356 2358 def GetPeaksParms(Inst,parmDict,Peaks,varyList): 2359 '''Put values into the Peaks list from the refinement results from inside 2360 the parmDict array 2361 ''' 2357 2362 off = 0 2358 2363 if 'LF' in Inst['Type'][0]: … … 2367 2372 parName = names[j]+str(i) 2368 2373 if parName in varyList or not peakInstPrmMode: 2369 peak[2*j+off] = parmDict[parName] 2374 peak[2*j+off] = parmDict[parName] 2375 if 'pos'+str(i) not in parmDict: continue 2370 2376 pos = parmDict['pos'+str(i)] 2371 2377 if 'LF' in Inst['Type'][0]: peak[0] = pos … … 2373 2379 dsp = pos/Inst['difC'][1] 2374 2380 for j in range(len(names)): 2381 parName = names[j]+str(i) 2382 if peak[2*j+off + 1] or not peakInstPrmMode: continue 2375 2383 if 'alp' in parName: 2376 2384 if 'T' in Inst['Type'][0]: 2377 peak[2*j ] = G2mth.getTOFalpha(parmDict,dsp)2385 peak[2*j+off] = G2mth.getTOFalpha(parmDict,dsp) 2378 2386 else: #'B' 2379 peak[2*j ] = G2mth.getPinkalpha(parmDict,pos)2387 peak[2*j+off] = G2mth.getPinkalpha(parmDict,pos) 2380 2388 elif 'bet' in parName: 2381 2389 if 'T' in Inst['Type'][0]: 2382 peak[2*j ] = G2mth.getTOFbeta(parmDict,dsp)2390 peak[2*j+off] = G2mth.getTOFbeta(parmDict,dsp) 2383 2391 else: #'B' 2384 peak[2*j ] = G2mth.getPinkbeta(parmDict,pos)2392 peak[2*j+off] = G2mth.getPinkbeta(parmDict,pos) 2385 2393 elif 'sig' in parName: 2386 2394 if 'T' in Inst['Type'][0]: 2387 peak[2*j ] = G2mth.getTOFsig(parmDict,dsp)2395 peak[2*j+off] = G2mth.getTOFsig(parmDict,dsp) 2388 2396 elif 'E' in Inst['Type'][0]: 2389 peak[2*j ] = G2mth.getEDsig(parmDict,pos)2397 peak[2*j+off] = G2mth.getEDsig(parmDict,pos) 2390 2398 else: #'C' & 'B' 2391 peak[2*j ] = G2mth.getCWsig(parmDict,pos)2399 peak[2*j+off] = G2mth.getCWsig(parmDict,pos) 2392 2400 elif 'gam' in parName: 2393 2401 if 'T' in Inst['Type'][0]: 2394 peak[2*j ] = G2mth.getTOFgamma(parmDict,dsp)2402 peak[2*j+off] = G2mth.getTOFgamma(parmDict,dsp) 2395 2403 else: #'C' & 'B' 2396 peak[2*j ] = G2mth.getCWgam(parmDict,pos)2404 peak[2*j+off] = G2mth.getCWgam(parmDict,pos) 2397 2405 2398 2406 def PeaksPrint(dataType,parmDict,sigDict,varyList,ptsperFW): -
trunk/GSASIIpwdGUI.py
r5271 r5273 1141 1141 state = G2frame.dataWindow.setPeakMode.IsChecked() 1142 1142 G2pwd.setPeakInstPrmMode(state) 1143 1143 1144 #====================================================================== 1144 1145 #### beginning of UpdatePeakGrid 1145 #======================================================================1146 1146 G2frame.GetStatusBar().SetStatusText('Global refine: select refine column & press Y or N',1) 1147 1147 G2gd.SetDataMenuBar(G2frame,G2frame.dataWindow.PeakMenu) … … 1213 1213 if i == 0: 1214 1214 pos = data['peaks'][i][0] 1215 data['LaueFringe']['clat'] = 0.5 * lam / np.sin(pos*np.pi/360)1216 l = 11215 data['LaueFringe']['clat'] = data['LaueFringe']['lmin'] * 0.5 * lam / np.sin(pos*np.pi/360) 1216 l = data['LaueFringe']['lmin'] 1217 1217 else: 1218 1218 l = data['LaueFringe']['clat'] / (0.5 * lam / np.sin(data['peaks'][i][0]*np.pi/360)) … … 1247 1247 data['LaueFringe']['ncell'] = data['LaueFringe'].get('ncell',20) 1248 1248 data['LaueFringe']['clat'] = data['LaueFringe'].get('clat',9.0) 1249 data['LaueFringe']['lmin'] = data['LaueFringe'].get('lmin',1) 1249 1250 data['LaueFringe']['clat-ref'] = data['LaueFringe'].get('clat-ref',False) 1250 1251 data['LaueFringe']['Show'] = data['LaueFringe'].get('Show',0) … … 1256 1257 topSizer.Add(cRef,0,WACV) 1257 1258 topSizer.Add((15,-1)) 1259 siz = G2G.G2SpinWidget(G2frame.dataWindow,data['LaueFringe'] ,'lmin', 1260 'l min') 1261 topSizer.Add(siz,0,WACV) 1262 topSizer.Add((15,-1)) 1258 1263 siz = G2G.G2SpinWidget(G2frame.dataWindow,data['LaueFringe'] ,'ncell', 1259 1264 'Laue ncell', 1260 1265 onChange=RefreshPeakGrid,onChangeArgs=[None]) 1261 1266 topSizer.Add(siz,0,WACV) 1267 topSizer.Add((15,-1)) 1262 1268 topSizer.Add(wx.StaticText(G2frame.dataWindow,label=' Show '),0,WACV) 1263 1269 ch = G2G.EnumSelector(G2frame.dataWindow,data['LaueFringe'],'Show',
Note: See TracChangeset
for help on using the changeset viewer.