Changeset 3193
- Timestamp:
- Dec 15, 2017 9:59:48 AM (5 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIimgGUI.py
r3186 r3193 176 176 177 177 def OnCalibrate(event): 178 if not data['calibrant']: 179 G2G.G2MessageBox(G2frame,'No calibrant material specified.\n'+ 180 'Please correct this and try again.') 181 return 178 182 G2frame.GetStatusBar().SetStatusText('Select > 4 points on 1st used ring; LB to pick (shift key to force pick), RB on point to delete else RB to finish',1) 179 183 G2frame.ifGetRing = True -
trunk/GSASIIpwdGUI.py
r3191 r3193 2344 2344 wx.CallAfter(UpdateSampleGrid,G2frame,data) 2345 2345 2346 def SearchAllComments(value,tc,*args,**kwargs): 2347 '''Called when the label for a FreePrm is changed: the comments for all PWDR 2348 histograms are searched for a "label=value" pair that matches the label (case 2349 is ignored) and the values are then set to this value, if it can be converted 2350 to a float. 2351 ''' 2352 id, cookie = G2frame.GPXtree.GetFirstChild(G2frame.root) 2353 while id: 2354 name = G2frame.GPXtree.GetItemText(id) 2355 if 'PWDR' in name: 2356 Comments = G2frame.GPXtree.GetItemPyData(G2gd.GetGPXtreeItemId(G2frame,id,'Comments')) 2357 Sample = G2frame.GPXtree.GetItemPyData(G2gd.GetGPXtreeItemId(G2frame,id, 'Sample Parameters')) 2358 for i,item in enumerate(Comments): 2359 itemSp = item.split('=') 2360 if value.lower() == itemSp[0].lower(): 2361 try: 2362 Sample[tc.key] = float(itemSp[1]) 2363 except: 2364 print('"{}" has an invalid value in Comments from {}' 2365 .format(item.strip(),name)) 2366 id, cookie = G2frame.GPXtree.GetNextChild(G2frame.root, cookie) 2367 wx.CallLater(100,UpdateSampleGrid,G2frame,data) 2368 2369 2346 2370 ######## DEBUG ####################################################### 2347 2371 #import GSASIIpwdGUI … … 2464 2488 parmSizer.Add(parmVal,0,WACV) 2465 2489 Info = {} 2466 2490 2467 2491 for key in ('FreePrm1','FreePrm2','FreePrm3'): 2468 2492 parmVal = G2G.ValidatedTxtCtrl(G2frame.dataWindow,Controls,key,typeHint=str, 2469 notBlank=False )2493 notBlank=False,OnLeave=SearchAllComments) 2470 2494 parmSizer.Add(parmVal,1,wx.EXPAND) 2471 2495 parmVal = G2G.ValidatedTxtCtrl(G2frame.dataWindow,data,key,typeHint=float) -
trunk/help/gsasII.html
r3135 r3193 4678 4678 <p class=MsoNormal style='margin-left:.5in'><span style='mso-fareast-font-family: 4679 4679 "Times New Roman"'>This window show the various sample dependent parameters for 4680 this powder pattern. The presence of a refine button indicates which can be 4681 refined while others are fixed. All values can be changed in this window. NB: 4682 for powder data be sure the correct instrument type is selected (<b 4680 this powder pattern. The presence of a refine button indicates that a 4681 parameter can be refined (all others are fixed.) All values shown in 4682 this window can be edited. 4683 4684 Note that the last three parameters (named FreePrm<I>X</I>, <I>X</I>=1,2,3) have 4685 labels that can be changed. If changed in one histogram, the same 4686 label is used for all histograms. When a label is changed, the 4687 Comments tree item for each PWDR histogram is searched for a matching 4688 "Label=value" pair (differences in letter case between the two label 4689 strings is ignored). When found, the value is converted to a float and 4690 saved as the appropriate Sample Parameter. 4691 4692 NB: for powder data be sure the correct instrument type is selected (<b 4683 4693 style='mso-bidi-font-weight:normal'>Debye-<span class=SpellE>Scherrer</span></b> 4684 4694 or <b style='mso-bidi-font-weight:normal'>Bragg-Brentano</b>).<span 4685 class=MsoHyperlink><span style='color:windowtext;text-decoration:none; 4686 text-underline:none'><o:p></o:p></span></span></span></p> 4695 class=MsoHyperlink></span></span></p> 4687 4696 4688 4697 <h5 style='margin-left:.5in'> … … 7116 7125 <hr size=2 width="100%" align=center> 7117 7126 7118 <!-- hhmts start -->Last modified: Sun Oct 15 18:58:51 CDT 2017 <!-- hhmts end -->7127 <!-- hhmts start -->Last modified: Thu Dec 14 23:57:16 CST 2017 <!-- hhmts end --> 7119 7128 7120 7129 </div>
Note: See TracChangeset
for help on using the changeset viewer.