Changeset 1340
- Timestamp:
- May 10, 2014 8:12:27 PM (9 years ago)
- Location:
- trunk
- Files:
-
- 75 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIexprGUI.py
r1325 r1340 98 98 :param list depVarDict: a dict of choices for the dependent variable to be 99 99 fitted to the expression and their values. Ignored if None (default). 100 :param list ExtraButton: a list with two terms that define [0]: the label 101 for an extra button and [1] the callback routine to be used when the 102 button is pressed. The button will only be enabled when the OK button can be 103 used (meaning the equation/expression is valid). The default is None, meaning this 104 will not be used. 105 :param list usedVars: defines a list of previously used variable names. These names 106 will not be reused as defaults for new free variables. 107 (The default is an empty list). 100 108 ''' 101 109 def __init__(self, parent, parmDict, exprObj=None, 102 110 header='Enter restraint expression here', 103 111 wintitle='Expression Editor', 104 fit=True,VarLabel=None,depVarDict=None): 112 fit=True,VarLabel=None,depVarDict=None, 113 ExtraButton=None,usedVars=[]): 105 114 self.fit = fit 106 115 self.depVarDict = depVarDict … … 136 145 self.dependentVar = None 137 146 'name for dependent variable selection, when depVarDict is specified' 138 147 self.usedVars = usedVars 148 'variable names that have been used and should not be reused by default' 149 139 150 # process dictionary of values and create an index 140 151 for key in parmDict: … … 202 213 self.mainsizer.Add((-1,5),0,wx.EXPAND,1) 203 214 215 bSizer = wx.BoxSizer(wx.HORIZONTAL) 204 216 btnsizer = wx.StdDialogButtonSizer() 217 if ExtraButton: 218 self.ExtraBtn = wx.Button(self, wx.ID_ANY, ExtraButton[0]) 219 self.ExtraBtn.Bind(wx.EVT_BUTTON,self.OnExtra) 220 self.ExtraCallBack = ExtraButton[1] 221 self.ExtraBtn.Disable() 222 bSizer.Add(self.ExtraBtn, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 2) 223 else: 224 self.ExtraBtn = None 225 bSizer.Add((1,1), 1, wx.ALIGN_CENTER|wx.ALL|wx.EXPAND, 0) 205 226 self.OKbtn = wx.Button(self, wx.ID_OK) 206 227 self.OKbtn.SetDefault() … … 210 231 btnsizer.AddButton(btn) 211 232 btnsizer.Realize() 212 self.mainsizer.Add(btnsizer, 0, wx.ALIGN_CENTER|wx.ALL|wx.EXPAND, 5) 233 bSizer.Add(btnsizer, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5) 234 self.mainsizer.Add(bSizer, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL|wx.EXPAND, 5) 213 235 self.SetSizer(self.mainsizer) 214 236 self.CenterOnParent() … … 237 259 #self.mainsizer.Fit(self) 238 260 261 def OnExtra(self,event): 262 exprObj = G2obj.ExpressionObj() 263 exprObj.LoadExpression( 264 self.expr, 265 self.exprVarLst, 266 self.varSelect, 267 self.varName, 268 self.varValue, 269 self.varRefflag, 270 ) 271 if self.depVarDict: 272 exprObj.SetDepVar(self.dependentVar) 273 self.ExtraCallBack(exprObj) 274 # put results back into displayed dialog 275 resDict = dict(exprObj.GetVariedVarVal()) 276 for v,var in self.varName.items(): 277 varname = "::" + var.lstrip(':').replace(' ','_').replace(':',';') 278 val = resDict.get(varname) 279 if val: 280 self.varValue[v] = val 281 wx.CallAfter(self.ShowVars()) 282 239 283 def Show(self,mode=True): 240 284 '''Call to use the dialog after it is created. … … 282 326 self.RestartTimer() 283 327 self.OKbtn.Disable() 328 if self.ExtraBtn: self.ExtraBtn.Disable() 284 329 event.Skip() 285 330 return … … 467 512 self.varSelect[v] = sel 468 513 if sel == 0: 469 self.varName[v] = str(v) 514 sv = G2obj.MakeUniqueLabel(v,self.usedVars) 515 self.varName[v] = sv 470 516 self.varValue[v] = self.varValue.get(v,0.0) 471 517 else: … … 518 564 ''' 519 565 self.OKbtn.Disable() 566 if self.ExtraBtn: self.ExtraBtn.Disable() 520 567 self.varSizer.Clear(True) 521 568 self.errbox = wxscroll.ScrolledPanel(self,style=wx.HSCROLL) … … 559 606 return 560 607 self.exprVarLst,pkgdict = ret 608 wx.CallAfter(self.Repaint,exprObj) 609 610 def Repaint(self,exprObj): 611 'Redisplay the variables and continue the validation' 561 612 self.ShowVars() # show widgets to set vars 562 613 msg = self.CheckVars() … … 593 644 self.setEvalResult("Expression evaluates to: "+str(s)+depVal) 594 645 self.OKbtn.Enable() 646 if self.ExtraBtn: self.ExtraBtn.Enable() 595 647 596 648 if __name__ == "__main__": -
trunk/GSASIIgrid.py
r1335 r1340 2529 2529 self.SequentialMenu.Append(menu=self.SequentialPfit, title='Parametric Fit') 2530 2530 self.SequentialPfit.Append( 2531 id=wxADDPARFIT, kind=wx.ITEM_NORMAL,text='Add function',2532 help='Add a new function to minimize')2531 id=wxADDPARFIT, kind=wx.ITEM_NORMAL,text='Add equation', 2532 help='Add a new equation to minimize') 2533 2533 self.SequentialPfit.Append( 2534 id=wxDELPARFIT, kind=wx.ITEM_NORMAL,text='Delete function',2535 help='Delete a function for parametric minimization')2534 id=wxDELPARFIT, kind=wx.ITEM_NORMAL,text='Delete equation', 2535 help='Delete an equation for parametric minimization') 2536 2536 self.SequentialPfit.Append( 2537 id=wxEDITPARFIT, kind=wx.ITEM_NORMAL,text='Edit function',2538 help='Edit an existing parametric minimization function')2537 id=wxEDITPARFIT, kind=wx.ITEM_NORMAL,text='Edit equation', 2538 help='Edit an existing parametric minimization equation') 2539 2539 self.SequentialPfit.Append( 2540 id=wxDOPARFIT, kind=wx.ITEM_NORMAL,text='Fit to function(s)',2540 id=wxDOPARFIT, kind=wx.ITEM_NORMAL,text='Fit to equation(s)', 2541 2541 help='Perform a parametric minimization') 2542 2542 self.PostfillDataMenu() … … 3868 3868 UpdateSeqResults(G2frame,data,G2frame.dataDisplay.GetSize()) # redisplay variables 3869 3869 3870 # PATCH: this routine can go away eventually 3870 3871 def CreatePSvarDict(seqnum,name): 3871 3872 '''Create a parameter dict (parmDict) for everything that might be used … … 4017 4018 G2frame.dataFrame.SequentialPfit.Enable(wxDOPARFIT,val) 4018 4019 4019 def DelParFitEq(event):4020 'Ask the user to select function to delete'4021 choices = Controls['SeqParFitEqs'].keys()4022 selected = ItemSelector(4023 choices,G2frame.dataFrame,4024 multiple=True,4025 title='Select functions to remove',4026 header='Delete function')4027 if selected is None: return4028 for item in selected:4029 del Controls['SeqParFitEqs'][choices[item]]4030 EnableParFitEqMenus()4031 if Controls['SeqParFitEqs']: DoParEqFit(event)4032 4033 def EditParFitEq(event):4034 'Edit an existing parametric equation'4035 choices = Controls['SeqParFitEqs'].keys()4036 if len(choices) == 1:4037 selected = 04038 else:4039 selected = ItemSelector(4040 choices,G2frame.dataFrame,4041 multiple=False,4042 title='Select a function to edit',4043 header='Edit function')4044 if selected is not None:4045 dlg = G2exG.ExpressionDialog(4046 G2frame.dataDisplay,indepVarDict,4047 Controls['SeqParFitEqs'][choices[selected]],4048 depVarDict=depVarDict,4049 header="Edit this minimization function's formula")4050 newobj = dlg.Show(True)4051 if newobj:4052 calcobj = G2obj.ExpressionCalcObj(newobj)4053 del Controls['SeqParFitEqs'][choices[selected]]4054 Controls['SeqParFitEqs'][calcobj.eObj.expression] = newobj4055 EnableParFitEqMenus()4056 if Controls['SeqParFitEqs']: DoParEqFit(event)4057 4058 def AddNewParFitEq(event):4059 'Create a new parametric equation to be fit to sequential results'4060 dlg = G2exG.ExpressionDialog(4061 G2frame.dataDisplay,indepVarDict,4062 depVarDict=depVarDict,4063 header='Enter a function to minimize in the parametric fit')4064 obj = dlg.Show(True)4065 dlg.Destroy()4066 if obj:4067 calcobj = G2obj.ExpressionCalcObj(obj)4068 Controls['SeqParFitEqs'][calcobj.eObj.expression] = obj4069 EnableParFitEqMenus()4070 if Controls['SeqParFitEqs']: DoParEqFit(event)4071 4072 4020 def ParEqEval(Values,calcObjList,varyList): 4073 4021 '''Evaluate the parametric expression(s) … … 4083 4031 return result 4084 4032 4085 def DoParEqFit(event ):4033 def DoParEqFit(event,eqObj=None): 4086 4034 'Parametric fit minimizer' 4087 4035 varyValueDict = {} # dict of variables and their initial values 4088 4036 calcObjList = [] # expression objects, ready to go for each data point 4089 for expr in Controls['SeqParFitEqs']: 4090 obj = Controls['SeqParFitEqs'][expr] 4037 if eqObj is not None: 4038 eqObjDict = {eqObj.expression:eqObj} 4039 else: 4040 eqObjDict = Controls['SeqParFitEqs'] 4041 for expr in eqObjDict.keys(): 4042 obj = eqObjDict[expr] 4091 4043 # assemble refined vars for this equation 4092 4044 varyValueDict.update({var:val for var,val in obj.GetVariedVarVal()}) … … 4112 4064 # varied parameters 4113 4065 varyList = varyValueDict.keys() 4114 varyValues = [varyValueDict[key] for key in varyList] 4115 result = so.leastsq(ParEqEval,varyValues,full_output=True, #ftol=Ftol, 4116 args=(calcObjList,varyList) 4117 ) 4066 values = varyValues = [varyValueDict[key] for key in varyList] 4067 if not varyList: 4068 print 'no variables to refine!' 4069 else: 4070 try: 4071 print 'Fit Results' 4072 result = so.leastsq(ParEqEval,varyValues,full_output=True, #ftol=Ftol, 4073 args=(calcObjList,varyList) 4074 ) 4075 values = result[0] 4076 covar = result[1] 4077 if covar is None: 4078 raise Exception 4079 for i,(var,val) in enumerate(zip(varyList,values)): 4080 print ' ',var,' =',G2mth.ValEsd(val,np.sqrt(covar[i,i])) 4081 except: 4082 print 'Fit failed' 4083 return 4118 4084 # create a plot for each parametric variable 4119 values = result[0] 4120 covar = result[1] 4121 print 'Fit Results' 4122 for i,(var,val) in enumerate(zip(varyList,values)): 4123 print ' ',var,' =',G2mth.ValEsd(val,np.sqrt(covar[i,i])) 4124 for fitnum,expr in enumerate(Controls['SeqParFitEqs']): 4125 obj = Controls['SeqParFitEqs'][expr] 4085 for fitnum,expr in enumerate(sorted(eqObjDict)): 4086 obj = eqObjDict[expr] 4126 4087 obj.UpdateVariedVars(varyList,values) 4127 4088 calcobj = G2obj.ExpressionCalcObj(obj) … … 4137 4098 ) 4138 4099 fitvals.append(calcobj.EvalExpression()) 4139 G2plt.PlotSelectedSequence(G2frame,[indx],GetColumnInfo,SelectXaxis, 4140 fitnum,fitvals) 4141 4100 G2plt.PlotSelectedSequence( 4101 G2frame,[indx],GetColumnInfo,SelectXaxis, 4102 fitnum,fitvals) 4103 4104 def SingleParEqFit(eqObj): 4105 DoParEqFit(None,eqObj) 4106 4107 def DelParFitEq(event): 4108 'Ask the user to select function to delete' 4109 choices = sorted(Controls['SeqParFitEqs'].keys()) 4110 txtlst = [Controls['SeqParFitEqs'][i].GetDepVar()+' = '+i for i in choices] 4111 selected = ItemSelector( 4112 txtlst,G2frame.dataFrame, 4113 multiple=True, 4114 title='Select a parametric equation to remove', 4115 header='Delete equation') 4116 if selected is None: return 4117 for item in selected: 4118 del Controls['SeqParFitEqs'][choices[item]] 4119 EnableParFitEqMenus() 4120 if Controls['SeqParFitEqs']: DoParEqFit(event) 4121 4122 def EditParFitEq(event): 4123 'Edit an existing parametric equation' 4124 choices = sorted(Controls['SeqParFitEqs'].keys()) 4125 txtlst = [Controls['SeqParFitEqs'][i].GetDepVar()+' = '+i for i in choices] 4126 if len(choices) == 1: 4127 selected = 0 4128 else: 4129 selected = ItemSelector( 4130 txtlst,G2frame.dataFrame, 4131 multiple=False, 4132 title='Select a parametric equation to edit', 4133 header='Edit equation') 4134 if selected is not None: 4135 dlg = G2exG.ExpressionDialog( 4136 G2frame.dataDisplay,indepVarDict, 4137 Controls['SeqParFitEqs'][choices[selected]], 4138 depVarDict=depVarDict, 4139 header="Edit the formula for this minimization function", 4140 ExtraButton=['Fit',SingleParEqFit]) 4141 newobj = dlg.Show(True) 4142 if newobj: 4143 calcobj = G2obj.ExpressionCalcObj(newobj) 4144 del Controls['SeqParFitEqs'][choices[selected]] 4145 Controls['SeqParFitEqs'][calcobj.eObj.expression] = newobj 4146 EnableParFitEqMenus() 4147 if Controls['SeqParFitEqs']: DoParEqFit(event) 4148 4149 def AddNewParFitEq(event): 4150 'Create a new parametric equation to be fit to sequential results' 4151 4152 # compile the variable names in previous freevars to avoid accidental name collisions 4153 usedvarlist = [] 4154 for eq,obj in Controls['SeqParFitEqs'].items(): 4155 for var in obj.freeVars: 4156 if obj.freeVars[var][0] not in usedvarlist: usedvarlist.append(obj.freeVars[var][0]) 4157 4158 dlg = G2exG.ExpressionDialog( 4159 G2frame.dataDisplay,indepVarDict, 4160 depVarDict=depVarDict, 4161 header='Define an equation to minimize in the parametric fit', 4162 ExtraButton=['Fit',SingleParEqFit], 4163 usedVars=usedvarlist) 4164 obj = dlg.Show(True) 4165 dlg.Destroy() 4166 if obj: 4167 calcobj = G2obj.ExpressionCalcObj(obj) 4168 Controls['SeqParFitEqs'][calcobj.eObj.expression] = obj 4169 EnableParFitEqMenus() 4170 if Controls['SeqParFitEqs']: DoParEqFit(event) 4171 4142 4172 def GridSetToolTip(row,col): 4143 4173 '''Routine to show standard uncertainties for each element in table … … 4371 4401 calcobj.UpdateDict(PSvarDict) 4372 4402 else: 4373 PSvarDict,unused,unused = CreatePSvarDict(0,histNames[0]) 4403 # PATCH: this routine can go away eventually once parmDict is always in 4404 # sequential refinement 4405 PSvarDict,unused,unused = CreatePSvarDict(seqnum,name) 4374 4406 calcobj.SetupCalc(PSvarDict) 4375 4407 valList.append(calcobj.EvalExpression()) … … 4390 4422 else: 4391 4423 print 'Sequential refinement needs to be rerun to obtain ESDs for PseudoVariables' 4424 # PATCH: this routine can go away eventually 4392 4425 PSvarDict,unused,unused = CreatePSvarDict(0,histNames[0]) 4393 4426 # Also dicts of dependent (depVarDict) & independent vars (indepVarDict) -
trunk/GSASIIobj.py
r1338 r1340 1247 1247 'Vol' : 'Unit cell volume', 1248 1248 # Atom vars (p::<var>:a) 1249 'dA([xyz]) ' : 'change to atomic coordinate, \\1',1249 'dA([xyz])$' : 'change to atomic coordinate, \\1', 1250 1250 'A([xyz])$' : '\\1 fractional atomic coordinate', 1251 1251 'AUiso':'Atomic isotropic displacement parameter', … … 1271 1271 'Polariz\.' : 'Polarization correction', 1272 1272 'SH/L' : 'FCJ peak asymmetry correction', 1273 '([UVW]) ' : 'Gaussian instrument broadening \\1',1274 '([XY]) ' : 'Cauchy instrument broadening \\1',1273 '([UVW])$' : 'Gaussian instrument broadening \\1', 1274 '([XY])$' : 'Cauchy instrument broadening \\1', 1275 1275 'Zero' : 'Debye-Scherrer zero correction', 1276 1276 'nDebye' : 'Debye model background corr. terms', … … 1565 1565 # shortcut routines 1566 1566 exp = np.exp 1567 sind = lambda x: np.sin(x*np.pi/180.)1568 tand = lambda x: np.tan(x*np.pi/180.)1569 cosd = lambda x: np.cos(x*np.pi/180.)1570 1567 sind = sin = s = lambda x: np.sin(x*np.pi/180.) 1571 1568 cosd = cos = c = lambda x: np.cos(x*np.pi/180.) … … 1585 1582 self.assgnVars = {} 1586 1583 '''A dict where keys are label names in the expression mapping to a GSAS-II 1587 variable. The value is a list with a G2 variable name and derivative step size.1584 variable. The value a G2 variable name. 1588 1585 Note that the G2 variable name may contain a wild-card and correspond to 1589 1586 multiple values. -
trunk/help/SequentialTutorial.htm
r1307 r1340 1131 1131 <w:wrap type="square" anchorx="margin" anchory="margin"/> 1132 1132 </v:shape><![endif]--><![if !vml]><img width=271 height=93 1133 src="SequentialTutorial_files/image002. jpg" align=right hspace=12 v:shapes="Picture_x0020_1"><![endif]>Use1134 the Import/Phase/from CIF file menu itemto read the phase information </p>1133 src="SequentialTutorial_files/image002.png" align=right hspace=12 v:shapes="Picture_x0020_1"><![endif]>Use 1134 the <B>Import/Phase/from CIF file menu item</B> to read the phase information </p> 1135 1135 1136 1136 <p class=MsoListParagraphCxSpMiddle><o:p> </o:p></p> … … 1140 1140 style='mso-list:Ignore'>3.<span style='font:7.0pt "Times New Roman"'> 1141 1141 </span></span></span><![endif]>In the file browser dialog window that is 1142 created, change the file type from CIF file to zip archive andselect <span1143 style='font-family:Courier'>SeqTut.zip</span> file (change the file directory1142 created, <B>change the file type from CIF file to zip archive</B> and <B>select <span 1143 style='font-family:Courier'>SeqTut.zip</span> file</B> (change the file directory 1144 1144 to <b style='mso-bidi-font-weight:normal'><span style='font-family:"Calibri","sans-serif"; 1145 1145 mso-ascii-theme-font:major-latin;mso-hansi-theme-font:major-latin'>Exercises/sequential</span></b>). 1146 1146 Another dialog window will be created showing all the files in the zip archive. 1147 1147 To simplify the view to only show the phase files, type <span class=SpellE>cif</span> 1148 (or CIF case is ignored) into the filter. Select the <span1148 (or CIF case is ignored) into the filter. <B>Select the <span 1149 1149 style='font-family:Courier'>CuCr2O4.cif</span> and the <span class=SpellE><span 1150 style='font-family:Courier'>CuO.cif</span></span> input files. Press OK. </p>1150 style='font-family:Courier'>CuO.cif</span></span> input files. Press OK.</B> </p> 1151 1151 1152 1152 <p class=MsoListParagraphCxSpMiddle><o:p> </o:p></p> … … 1157 1157 </span></span></span><![endif]>You will be asked sequentially for the name for 1158 1158 each phase. The defaults (CuCr2O4 and <span class=SpellE>CuO</span>) are fine, 1159 so OK can be pressed for each question.<span style='mso-spacerun:yes'>1159 so <B>OK can be pressed for each question</B>.<span style='mso-spacerun:yes'> 1160 1160 </span>(Note that if files CuCr2O4.cif or the <span class=SpellE>CuO.cif</span> 1161 1161 already exist, you will be asked to OK overwriting them.)</p> … … 1178 1178 <v:imagedata src="SequentialTutorial_files/image003.png" o:title=""/> 1179 1179 <w:wrap type="square" anchorx="margin" anchory="margin"/> 1180 </v:shape><![endif]--><![if !vml]><img width=284 height=1191181 src="SequentialTutorial_files/image004. jpg" align=right hspace=12 v:shapes="Picture_x0020_21"><![endif]><span1180 </v:shape><![endif]--><![if !vml]><img 1181 src="SequentialTutorial_files/image004.png" align=right hspace=12 v:shapes="Picture_x0020_21"><![endif]><span 1182 1182 style='mso-spacerun:yes'> </span>Read in the ~7 K dataset (OH_00.fxye) using 1183 Import/Powder Data/from GSAS powder data fileto open a file browser. Again1184 select zip archive and the downloaded<span style='font-family:Courier'>SeqTut.zip</span>1185 file. Select file <span style='font-family:Courier'>OH_00.fxye</span> (use of1186 the filter can again be helpful) and press OK. </p>1183 <B>Import/Powder Data/from GSAS powder data file</B> to open a file browser. Again 1184 <B>select zip archive and the <span style='font-family:Courier'>SeqTut.zip</span> 1185 file. Select file <span style='font-family:Courier'>OH_00.fxye</span></B> (use of 1186 the filter can again be helpful) and <B>press OK</B>. </p> 1187 1187 1188 1188 <p class=MsoListParagraphCxSpMiddle><!--[if gte vml 1]><o:wrapblock><v:shape … … 1212 1212 style='mso-ignore:vglayout' clear=ALL> 1213 1213 You will be shown the first few lines from the file. Confirm that the selected 1214 file is correct by pressing OK.</p>1214 file is correct by <B>pressing OK.</B> </p> 1215 1215 1216 1216 <p class=MsoListParagraphCxSpMiddle><span style='mso-fareast-language:EN-US; … … 1232 1232 style='mso-list:Ignore'>6.<span style='font:7.0pt "Times New Roman"'> 1233 1233 </span></span></span><![endif]>Map the phases to the data: After reading in the 1234 dataset, a window used to select phases is shown. Select both phases and press1235 OK.< span style='mso-spacerun:yes'> </span></p>1234 dataset, a window used to select phases is shown. <B>Select both phases and press 1235 OK.</B><span style='mso-spacerun:yes'> </span></p> 1236 1236 1237 1237 <p class=MsoListParagraphCxSpMiddle><span style='mso-fareast-language:EN-US; … … 1265 1265 initially.<span style='mso-spacerun:yes'> </span>To illustrate how constraints 1266 1266 are used, we will refine both phase fractions, but constrain their sum to be 1267 one. To set up the constraint, click on the Constraints itemin the data tree1268 and the Select tab/Histogram/Phase menu<span style='mso-spacerun:yes'>1269 </span>item , and then click on the Edit/Add constraint menu item.</p>1267 one. To set up the constraint, <B>click on the Constraints item</B> in the data tree 1268 and the <B>Select tab/Histogram/Phase menu<span style='mso-spacerun:yes'> 1269 </span>item</B>, and then <B>click on the Edit/Add constraint menu item.</B></p> 1270 1270 1271 1271 <p class=MsoListParagraphCxSpMiddle><span style='mso-fareast-language:EN-US; … … 1274 1274 mso-wrap-style:square'> 1275 1275 <v:imagedata src="SequentialTutorial_files/image013.png" o:title=""/> 1276 </v:shape><![endif]--><![if !vml]><img width=104 height=721277 src="SequentialTutorial_files/image014. jpg" v:shapes="Picture_x0020_5"><![endif]></span><span1276 </v:shape><![endif]--><![if !vml]><img 1277 src="SequentialTutorial_files/image014.png" v:shapes="Picture_x0020_5"><![endif]></span><span 1278 1278 style='mso-spacerun:yes'> </span></p> 1279 1279 1280 <p class=MsoListParagraphCxSpMiddle>In the next window, select the phase1281 fraction for the first phase <span style='font-family:Courier'>0:0:Scale</span> 1280 <p class=MsoListParagraphCxSpMiddle>In the next window, <B>select the phase 1281 fraction for the first phase <span style='font-family:Courier'>0:0:Scale</span></B> 1282 1282 (the second, <span style='font-family:Courier'>1:0:Scale,</span> would work 1283 1283 too) </p> … … 1292 1292 style='mso-spacerun:yes'> </span></p> 1293 1293 1294 <p class=MsoListParagraphCxSpMiddle>In the next window, select eitherthe other1294 <p class=MsoListParagraphCxSpMiddle>In the next window, either <B>select the other 1295 1295 phase fraction (<span style='font-family:Courier'>1:0<span class=GramE>:Scale</span>)</span><span 1296 1296 style='mso-ascii-font-family:Cambria;mso-ascii-theme-font:minor-latin; 1297 mso-hansi-font-family:Cambria;mso-hansi-theme-font:minor-latin'> or select all1297 mso-hansi-font-family:Cambria;mso-hansi-theme-font:minor-latin'></B> or select all 1298 1298 phases (</span><span style='font-family:Courier'>all:0:Scale</span><span 1299 1299 style='mso-ascii-font-family:Cambria;mso-ascii-theme-font:minor-latin; … … 1329 1329 <p class=MsoNormal><o:p> </o:p></p> 1330 1330 1331 <p class=MsoListParagraphCxSpFirst>Click on the first phase (CuCr2O4) click on 1332 the refine unit cell option (on the General tab). (You will likely need to 1333 click on the triangle to the left of the Phase entry to open the tree item.</p> 1334 1335 <p class=MsoListParagraphCxSpMiddle><span style='mso-fareast-language:EN-US; 1336 mso-no-proof:yes'><!--[if gte vml 1]><v:shape id="Picture_x0020_12" o:spid="_x0000_i1051" 1337 type="#_x0000_t75" style='width:405pt;height:62.25pt;visibility:visible; 1338 mso-wrap-style:square'> 1339 <v:imagedata src="SequentialTutorial_files/image021.png" o:title=""/> 1340 </v:shape><![endif]--><![if !vml]><img width=540 height=83 1341 src="SequentialTutorial_files/image022.jpg" v:shapes="Picture_x0020_12"><![endif]></span></p> 1342 1343 <p class=MsoListParagraphCxSpMiddle>We also want to refine the phase fraction 1344 for this phase, so move to the Data tab, click on show PWDR OH_00.fxye Bank 1 1345 and click on the Phase fraction box to cause that to be refined.<span 1331 <p class=MsoListParagraphCxSpFirst><B>Click on the first phase</B> (CuCr2O4) <B>click on 1332 the refine unit cell option</B> (on the General tab). (You will likely need to 1333 click on the triangle to the left of the Phase entry to open the tree item. 1334 We also want to refine the phase fraction 1335 for this phase, so <B>move to the Data tab, click on show PWDR OH_00.fxye Bank 1</B> 1336 and <B>click on the Phase fraction box</B> to cause that to be refined.<span 1346 1337 style='mso-spacerun:yes'> </span></p> 1347 1338 … … 1350 1341 style='width:260.25pt;height:99pt;visibility:visible;mso-wrap-style:square'> 1351 1342 <v:imagedata src="SequentialTutorial_files/image023.png" o:title=""/> 1352 </v:shape><![endif]--><![if !vml]><img width=347 height=1321353 src="SequentialTutorial_files/image024. jpg" v:shapes="_x0000_i1050"><![endif]></span></p>1343 </v:shape><![endif]--><![if !vml]><img 1344 src="SequentialTutorial_files/image024.png" v:shapes="_x0000_i1050"><![endif]></span></p> 1354 1345 1355 1346 <p class=MsoListParagraphCxSpMiddle>Repeat this with the second phase (<span 1356 class=SpellE>CuO</span>), by clicking on that phase in the data tree. Then 1357 click on the General tab and on the refine unit cell option. We also want to 1358 refine the phase fraction for this phase, so move to the Data tab, click on 1359 show PWDR OH_00.fxye Bank 1 and click on the Phase fraction box to cause that 1360 to be refined.<span style='mso-spacerun:yes'> </span>Also click on the single 1361 (isotropic) <span class=SpellE>microstrain</span> term for this second phase.</p> 1347 class=SpellE>CuO</span>), by <B>clicking on the second phase</B> in the data tree. Then 1348 <B>click on the General tab</B> and on <B>the refine unit cell</B> option. We also want to 1349 refine the phase fraction for this phase, so <B>move to the Data tab, click on 1350 show PWDR OH_00.fxye Bank 1</B> and <B>click on the Phase fraction box</B> to cause that 1351 to be refined.<span style='mso-spacerun:yes'> </span>Also <B>click on 1352 the single microstrain</B> 1353 (isotropic) term for this second phase.</p> 1362 1354 1363 1355 <p class=MsoListParagraphCxSpMiddle><o:p> </o:p></p> … … 1377 1369 </v:shape><![endif]--><![if !vml]><img width=346 height=123 1378 1370 src="SequentialTutorial_files/image026.png" align=right hspace=12 v:shapes="Picture_x0020_14"><![endif]>Also 1379 click on the Background entryfor the PWDR OH_00.fxye Bank 1 entry in the data1371 <B>click on the Background entry</B> for the PWDR OH_00.fxye Bank 1 entry in the data 1380 1372 tree (you will likely need to click on the triangle to the left of the entry to 1381 1373 open the tree item.) Confirm that Background function should already be set 1382 1374 as <span class=SpellE>chebyshev</span> and the Refine flag should be checked. 1383 Change the No. <span class=SpellE>coeff</span>. entry from 3 to 6to1375 <B>Change the No. <span class=SpellE>coeff</span>. entry from 3 to 6</B> to 1384 1376 introduce more background terms. </p> 1385 1377 … … 1394 1386 <p class=MsoListParagraphCxSpMiddle>Finally, note that the first broad peak in 1395 1387 these data is spurious. It is known to arise from the <span class=SpellE>kapton</span> 1396 window in the cryostat used for sample cooling andwas confirmed by collecting1388 window in the cryostat used for sample cooling; this was confirmed by collecting 1397 1389 data without a sample. We could model this peak, but it is easier to simply 1398 drop the data below the first peak at ~5 degrees. To do this, click on the1399 Limits entry for the PWDR OH_00.fxye Bank 1 entry in the data tree and in the <span1400 class=SpellE>Tmin</span>/changed box (to lower left) change the initial value1401 of 0.5 degrees to 3.0. <i style='mso-bidi-font-style:normal'><u>Important</u></i>:1390 drop the data below the first peak at ~5 degrees. To do this, <B>click on the 1391 Limits entry</B> for the PWDR OH_00.fxye Bank 1 entry in the data tree and in the <span 1392 class=SpellE>Tmin</span>/changed box (to lower left) <B>change the initial value 1393 of 0.5 degrees to 3.0.</B> <i style='mso-bidi-font-style:normal'><u>Important</u></i>: 1402 1394 click on some other box in the window after editing the contents so that the 1403 1395 change registers. </p> … … 1423 1415 src="SequentialTutorial_files/image028.png" align=right hspace=12 v:shapes="Picture_x0020_15"><![endif]>Optional: 1424 1416 confirm that the initial parameters have been selected correctly for refinement 1425 using the Calculate/View LS <span class=SpellE>parms</span> menu item. There1417 using <B>the Calculate/View LS <span class=SpellE>parms</span> menu item</B>. There 1426 1418 will be 15 refined parameters: <span style='font-family:Courier'>0::A</span>x 1427 1419 (x=0,1,2) and <span style='font-family:Courier'>1::A</span>x (x=0,1,2,4), the … … 1439 1431 <p class=MsoListParagraphCxSpMiddle style='text-indent:-.25in;mso-list:l6 level1 lfo4'><![if !supportLists]><span 1440 1432 style='mso-fareast-font-family:Cambria;mso-bidi-font-family:Cambria'><span 1441 style='mso-list:Ignore'>10.<span style='font:7.0pt "Times New Roman"'> </span></span></span><![endif]> Use1442 the Calculate/Refine menu item to initiate the refinement. Since the project has1433 style='mso-list:Ignore'>10.<span style='font:7.0pt "Times New Roman"'> </span></span></span><![endif]><B>Use 1434 the Calculate/Refine menu item</B> to initiate the refinement. Since the project has 1443 1435 not been saved, you will be asked to select a name (and optionally a directory) 1444 1436 for the GSAS-II project (.<span class=SpellE>gpx</span>) file.<span … … 1455 1447 are several additional variables that should now be added. One should always 1456 1448 refine a zero correction or sample displacement parameter. In this case, the 1457 best choice is t he Sample X <span class=SpellE>displ</span>. <span class=GramE>parameter</span>1449 best choice is to <B>add the Sample X <span class=SpellE>displ</span>. <span class=GramE>parameter</span></B> 1458 1450 on the Sample Parameters section of histogram PWDR OH_00.fxye Bank 1. (Note 1459 1451 that data range >>90 degrees is needed before the Sample Y <span … … 1477 1469 <w:wrap type="square" anchorx="margin" anchory="margin"/> 1478 1470 </v:shape><![endif]--><![if !vml]><img width=375 height=174 1479 src="SequentialTutorial_files/image030.png" align=right hspace=12 v:shapes="Picture_x0020_13"><![endif]> Clicking1480 on the PWDR OH_00.fxye Bank 1 entry shows the Rietveld plot and zooming in on1471 src="SequentialTutorial_files/image030.png" align=right hspace=12 v:shapes="Picture_x0020_13"><![endif]><B>Clicking 1472 on the PWDR OH_00.fxye Bank 1 entry</B> shows the Rietveld plot and zooming in on 1481 1473 different regions of the pattern provides insight on how the fit could be 1482 1474 improved. The background is not well fit in the low angle range and examination 1483 1475 shows a hump of low-angle scattering from ~4.5 to 6 degrees. This is more 1484 1476 easily fit by adding a background peak than extra terms to the background 1485 function. Select the Background itemin histogram PWDR OH_00.fxye Bank 1 and1486 change the Peaks in Background from 0 to 1.<span style='mso-spacerun:yes'>1487 </span> Change the peak positionto the approximate peak center (5.25 degrees)1488 and set the intensity and Gaussian width (sig) to be refined.<span1477 function. <B>Select the Background item</B> in histogram PWDR OH_00.fxye Bank 1 and 1478 <B>change the Peaks in Background from 0 to 1.</B><span style='mso-spacerun:yes'> 1479 </span><B>Change the peak position</B> to the approximate peak center (5.25 degrees) 1480 and <B>set the intensity and Gaussian width (sig) to be refined</B>.<span 1489 1481 style='mso-spacerun:yes'> </span><i style='mso-bidi-font-style:normal'><u>Important</u></i>: 1490 1482 note that one must click on another box to ensure that input is recorded. </p> … … 1513 1505 in other projects I might postpone this until later, we can also start on 1514 1506 improving the peak fit. We will do this by varying the sample broadening for 1515 the major phase (since the instrumental terms are very good.) Click on the1516 first phase (CuCr2O4) and Data tab,click on the <span class=SpellE>Cryst</span>.1517 <span class=GramE>Size and <span class=SpellE>microstrain</span> parameters to1507 the major phase (since the instrumental terms are very good.) <B>Click on the 1508 first phase (CuCr2O4)</B> and <B>Data tab</B>, <B>click on the <span class=SpellE>Cryst</span>. 1509 <span class=GramE>Size and <span class=SpellE>microstrain</span> parameters</B> to 1518 1510 add those parameters to the fit.</span><span style='mso-spacerun:yes'> </span></p> 1519 1511 … … 1529 1521 style='mso-fareast-font-family:Cambria;mso-bidi-font-family:Cambria'><span 1530 1522 style='mso-list:Ignore'>12.<span style='font:7.0pt "Times New Roman"'> </span></span></span><![endif]>We 1531 can now include the position flag for the background peakin the refinement. Do1523 can now <B>include the position flag for the background peak</B> in the refinement. Do 1532 1524 this using the Background item, as before. Be sure to click on some other box 1533 1525 after clicking on the refine flag, so that the setting is recorded. </p> … … 1542 1534 style='mso-spacerun:yes'> </span>Trial and error will show that the 010 1543 1535 direction works best. Click on the first phase (CuCr2O4) and Data tab and 1544 select uniaxial for the <span class=SpellE>Mustrain</span> model anduse 0 11545 0 for the Unique axis , <span class=GramE>HKL .</span> <span class=GramE>Select1546 refinement for both Equatorial and Axial <span class=SpellE>mustrain</span>.</span> 1536 <B>select uniaxial</B> for the <span class=SpellE>Mustrain</span> model and <B>use 0 1 1537 0 for the Unique axis</B>, <span class=GramE>HKL .</span> <span class=GramE><B>Select 1538 refinement for both Equatorial and Axial <span class=SpellE>mustrain</span>.</span></B> 1547 1539 </p> 1548 1540 … … 1562 1554 mso-wrap-style:square'> 1563 1555 <v:imagedata src="SequentialTutorial_files/image033.png" o:title=""/> 1564 </v:shape><![endif]--><![if !vml]><img width=453 height=3401565 src="SequentialTutorial_files/image034. jpg" v:shapes="Picture_x0020_15"><![endif]></span></p>1556 </v:shape><![endif]--><![if !vml]><img 1557 src="SequentialTutorial_files/image034.png" v:shapes="Picture_x0020_15"><![endif]></span></p> 1566 1558 1567 1559 <h2>Step 2: Prepare for sequential fit. </h2> … … 1600 1592 style='mso-fareast-font-family:Cambria;mso-bidi-font-family:Cambria'><span 1601 1593 style='mso-list:Ignore'>1.<span style='font:7.0pt "Times New Roman"'> 1602 </span></span></span><![endif]> Click on the first phase (CuCr2O4) and on the1603 General tab , click on the refine unit cell option to turn off refinement. </p>1594 </span></span></span><![endif]><B>Click on the first phase (CuCr2O4) and on the 1595 General tab</B>, click on the refine unit cell option to <B>turn off refinement</B>. </p> 1604 1596 1605 1597 <p class=MsoListParagraphCxSpMiddle><span style='mso-spacerun:yes'> </span><span … … 1616 1608 style='mso-fareast-font-family:Cambria;mso-bidi-font-family:Cambria'><span 1617 1609 style='mso-list:Ignore'>2.<span style='font:7.0pt "Times New Roman"'> 1618 </span></span></span><![endif]>On the Data tab, click on the D11, D22 and D331619 terms to refine the lattice strain terms. While here, to simplify convergence1610 </span></span></span><![endif]>On the Data tab, <B>click on the D11, D22 and D33 1611 terms</B> to refine the lattice strain terms. While here, to simplify convergence 1620 1612 for the sequential refinement, where lattice constants change significantly, 1621 turn off the refinement of the three peak width terms and the phase fraction. </p>1613 <B>turn off the refinement of the three peak width terms and the phase fraction</B>. </p> 1622 1614 1623 1615 <p class=MsoListParagraphCxSpMiddle><span style='mso-spacerun:yes'> </span><span … … 1634 1626 style='mso-fareast-font-family:Cambria;mso-bidi-font-family:Cambria'><span 1635 1627 style='mso-list:Ignore'>3.<span style='font:7.0pt "Times New Roman"'> 1636 </span></span></span><![endif]> Click on the second phase(<span class=SpellE>CuO</span>)1637 and on the General tab, click on the refine unit cell optionto turn off1628 </span></span></span><![endif]><B>Click on the second phase</B> (<span class=SpellE>CuO</span>) 1629 and on the <B>General tab</B>, click on the <B>refine unit cell option</B> to turn off 1638 1630 refinement. </p> 1639 1631 1640 1632 <p class=MsoListParagraphCxSpMiddle><o:p> </o:p></p> 1641 1633 1642 <p class=MsoListParagraphCxSpMiddle>On the Data tabfor <span class=SpellE>CuO</span>,1643 click on the D11, D22, and D33 termsto refine the lattice strain terms and1644 turn off refinement of the phase fraction.<span style='mso-spacerun:yes'>1634 <p class=MsoListParagraphCxSpMiddle>On the <B>Data tab</B> for <span class=SpellE>CuO</span>, 1635 <B>click on the D11, D22, and D33 terms</B> to refine the lattice strain terms and 1636 <B>turn off refinement of the phase fraction</B>.<span style='mso-spacerun:yes'> 1645 1637 </span>We could refine the D13 term (which corresponds to the <span 1646 1638 class=SpellE>CuO</span> β* angle), but we do not expect this to change … … 1664 1656 style='mso-fareast-font-family:Cambria;mso-bidi-font-family:Cambria'><span 1665 1657 style='mso-list:Ignore'>4.<span style='font:7.0pt "Times New Roman"'> 1666 </span></span></span><![endif]>Also at this stage, turn off the all the1667 background refinement terms by clicking on Background on the histogram tree1658 </span></span></span><![endif]>Also at this stage, <B>turn off the all the 1659 background refinement terms</B> by clicking on Background on the histogram tree 1668 1660 item and removing checks from all items (be sure to click elsewhere in the 1669 1661 window before going on to the next step.) </p> … … 1697 1689 </v:shape><![endif]--><![if !vml]><img width=237 height=312 1698 1690 src="SequentialTutorial_files/image044.png" align=right hspace=12 v:shapes="Picture_x0020_33"><![endif]>Likewise, 1699 for the histogram Sample Parameters turn off andthe Sample Displacement1700 parameter by clicking on the Sample Parameters item in the histogram entries.</p>1691 for the histogram Sample Parameters, <B>turn off the Sample Displacement 1692 parameter</B> by clicking on the Sample Parameters item in the histogram entries.</p> 1701 1693 1702 1694 <p class=MsoListParagraphCxSpMiddle><o:p> </o:p></p> … … 1742 1734 </v:shape><![endif]--><![if !vml]><img width=214 height=209 1743 1735 src="SequentialTutorial_files/image046.png" align=right hspace=12 v:shapes="Picture_x0020_17"><![endif]>The 1744 remaining datasets are read using Import/Powder Data/from GSAS powder data file1745 to open a file browser. Again select zip archive and the downloaded <span1746 style='font-family:Courier'>SeqTut.zip</span> file.Select all the .<span1747 class=SpellE>fxye</span> files except <span style='font-family:Courier'>OH_00.fxye</span>1736 remaining datasets are read <B>using Import/Powder Data/from GSAS powder data file</B> 1737 to open a file browser. Again <B>select zip archive and the downloaded <span 1738 style='font-family:Courier'>SeqTut.zip</span></B> file. <B>Select all the .<span 1739 class=SpellE>fxye</span> files</B> except <span style='font-family:Courier'>OH_00.fxye</span> 1748 1740 (use of the filter can again be helpful to show just the data file; press Set 1749 1741 All and then unselect the one unneeded file). </p> … … 1751 1743 <p class=MsoListParagraphCxSpMiddle><o:p> </o:p></p> 1752 1744 1753 <p class=MsoListParagraphCxSpMiddle>This time one must select the instrument1754 parameter file . </p>1745 <p class=MsoListParagraphCxSpMiddle>This time one must <B>select the instrument 1746 parameter file</B>. </p> 1755 1747 1756 1748 <p class=MsoListParagraphCxSpMiddle><span style='mso-fareast-language:EN-US; … … 1765 1757 <p class=MsoListParagraphCxSpMiddle><o:p> </o:p></p> 1766 1758 1767 <p class=MsoListParagraphCxSpMiddle> Set all data sets to use the two phases, as1759 <p class=MsoListParagraphCxSpMiddle><B>Set all data sets to use the two phases</B>, as 1768 1760 before in step 1 #6. </p> 1769 1761 … … 1829 1821 <v:imagedata src="SequentialTutorial_files/image051.png" o:title=""/> 1830 1822 <w:wrap type="square" anchorx="margin" anchory="margin"/> 1831 </v:shape><![endif]--><![if !vml]><img width=93 height=441832 src="SequentialTutorial_files/image052. jpg" align=right hspace=12 v:shapes="Picture_x0020_19"><![endif]>Copy1833 the histogram parameters from the first histogram to the new ones: Click on the1834 original PWDR OH_00.fxye Bank 1 entry . Use menu commandCommands/Copy <span1835 class=SpellE>params</span> . </p>1823 </v:shape><![endif]--><![if !vml]><img 1824 src="SequentialTutorial_files/image052.png" align=right hspace=12 v:shapes="Picture_x0020_19"><![endif]>Copy 1825 the histogram parameters from the first histogram to the new ones: <B>Click on the 1826 original PWDR OH_00.fxye Bank 1 entry</B>. Use menu command <B>Commands/Copy <span 1827 class=SpellE>params</span></B>. </p> 1836 1828 1837 1829 <p class=MsoListParagraphCxSpMiddle><o:p> </o:p></p> … … 1855 1847 The Instrument Parameters have not been changed in this exercise and are all 1856 1848 read from the same instrument parameter file, but there is no harm in copying 1857 them, so the default entries do not need to be changed. Press OK. Note that all1849 them, so the default entries do not need to be changed. <B>Press OK</B>. Note that all 1858 1850 parameters are copied except measurement information such as setting angles, 1859 1851 temperature, etc. </p> … … 1862 1854 1863 1855 <p class=MsoListParagraphCxSpMiddle>An additional dialog window is shown which 1864 asks which histograms should receive the parameters. Press Set Allto select1865 all remaining histograms and then press OK.</p>1856 asks which histograms should receive the parameters. <B>Press Set All</B> to select 1857 all remaining histograms and then <B>press OK.</B> </p> 1866 1858 1867 1859 <p class=MsoListParagraphCxSpMiddle><o:p> </o:p></p> … … 1889 1881 style='mso-fareast-font-family:Cambria;mso-bidi-font-family:Cambria'><span 1890 1882 style='mso-list:Ignore'>2.<span style='font:7.0pt "Times New Roman"'> 1891 </span></span></span><![endif]> Click on the first phase(CuCr2O4) and on the1892 Data tab. The press the Copy Button;</p>1883 </span></span></span><![endif]><B>Click on the first phase</B> (CuCr2O4) and on the 1884 <B>Data tab</B>. The press the <B>Copy Button</B>;</p> 1893 1885 1894 1886 <p class=MsoListParagraphCxSpMiddle><span style='mso-fareast-language:EN-US; … … 1905 1897 originating dataset in the list, and there is no harm in copying parameters to 1906 1898 all histograms (including the origin), this is a good chance to show how the 1907 toggle button is used. Select only the OH_00.fxyeentry. Then press the1908 Toggle All button to invert the selections. Then press OK.</p>1899 toggle button is used. <B>Select only the OH_00.fxye</B> entry. Then press the 1900 <B>Toggle All</B> button to invert the selections. Then <B>press OK</B>.</p> 1909 1901 1910 1902 <p class=MsoListParagraphCxSpMiddle><o:p> </o:p></p> … … 1935 1927 style='mso-fareast-font-family:Cambria;mso-bidi-font-family:Cambria'><span 1936 1928 style='mso-list:Ignore'>3.<span style='font:7.0pt "Times New Roman"'> 1937 </span></span></span><![endif]> Copy the Phase/Histogram parameters within the1938 second phase by clicking on it (<span class=SpellE>CuO</span>) in the data tree1939 (and possibly on the Data tab.) The press the Copy Button andselect the1940 histograms as done in the previous step</p>1929 </span></span></span><![endif]><B>Copy the Phase/Histogram parameters within the 1930 second phase</B> by clicking on it (<span class=SpellE>CuO</span>) in the data tree 1931 (and possibly on the Data tab.) The press the <B>Copy Button</B> and <B>select the 1932 histograms</B> as done in the previous step</p> 1941 1933 1942 1934 <p class=MsoListParagraphCxSpLast><o:p> </o:p></p> … … 1970 1962 </v:shape><![endif]--><![if !vml]><img width=217 height=209 1971 1963 src="SequentialTutorial_files/image064.png" align=right hspace=12 v:shapes="Picture_x0020_24"><![endif]>First, 1972 select the Controls item in the data tree and press the Select data button. </p>1964 <B>select the Controls item</B> in the data tree and press the <B>Select data button</B>. </p> 1973 1965 1974 1966 <p class=MsoListParagraphCxSpMiddle><span style='mso-fareast-language:EN-US; … … 1982 1974 <p class=MsoListParagraphCxSpMiddle>This opens a window where all histograms 1983 1975 can be selected (it would be equally valid to skip the first histogram, since 1984 that has already been fully fit). Press OKand note that the Controls window now1976 that has already been fully fit). <B>Press OK</B> and note that the Controls window now 1985 1977 lists the number of datasets in the sequential refinement and two new controls. 1986 1978 </p> … … 2005 1997 <w:wrap type="square" anchorx="margin" anchory="margin"/> 2006 1998 </v:shape><![endif]--><![if !vml]><img width=360 height=128 2007 src="SequentialTutorial_files/image068.png" align=right hspace=12 v:shapes="Picture_x0020_34"><![endif]> Check2008 the Copy results to next histogram checkbox . This is essential. If this is1999 src="SequentialTutorial_files/image068.png" align=right hspace=12 v:shapes="Picture_x0020_34"><![endif]><B>Check 2000 the Copy results to next histogram checkbox</B>. This is essential. If this is 2009 2001 not selected, then every refinement will start with the current parameters 2010 2002 (which are all identical, since they were set with the Copy operations.) The … … 2025 2017 style='mso-fareast-font-family:Cambria;mso-bidi-font-family:Cambria'><span 2026 2018 style='mso-list:Ignore'>3.<span style='font:7.0pt "Times New Roman"'> 2027 </span></span></span><![endif]> Change the number of cycles to 10.This is2019 </span></span></span><![endif]><B>Change the number of cycles to 10.</B> This is 2028 2020 important, so that refinements have enough cycles to fully adjust to the 2029 2021 changes in lattice parameters before being used as the starting point for the … … 2047 2039 <v:imagedata src="SequentialTutorial_files/image069.png" o:title=""/> 2048 2040 <w:wrap type="square" anchorx="margin" anchory="margin"/> 2049 </v:shape><![endif]--><![if !vml]><img width=106 height=692050 src="SequentialTutorial_files/image070. jpg" align=right hspace=12 v:shapes="Picture_x0020_28"><![endif]>Start2051 the sequential refinement with the Calculate/Sequential refine</p>2041 </v:shape><![endif]--><![if !vml]><img 2042 src="SequentialTutorial_files/image070.png" align=right hspace=12 v:shapes="Picture_x0020_28"><![endif]>Start 2043 the sequential refinement with the <B>Calculate/Sequential refine</B></p> 2052 2044 2053 2045 <p class=MsoListParagraphCxSpMiddle><o:p> </o:p></p> … … 2195 2187 </p> 2196 2188 2197 <p class=MsoListParagraphCxSpMiddle> After clicking on OK, the Sequential2189 <p class=MsoListParagraphCxSpMiddle><B>After clicking on OK</B>, the Sequential 2198 2190 Results item in the data tree is automatically selected, which displays a 2199 2191 summary of the refinement results as a large table. </p> … … 2238 2230 <p class=MsoListParagraphCxSpMiddle>Before going farther, it is useful to 2239 2231 review the trends in the lattice parameters as a sanity check. This can be done 2240 by double-clicking on a column of the table, such as the 0::b parameter, which2232 by <B>double-clicking on a column of the table</B>, such as the 0::b parameter, which 2241 2233 displays this plot:</p> 2242 2234 … … 2269 2261 </v:shape><![endif]--><![if !vml]><img width=213 height=207 2270 2262 src="SequentialTutorial_files/image079.png" align=right hspace=12 v:shapes="Picture_x0020_43"><![endif]>Pressing 2271 the K icon or pressing the s keybrings up a menu where the x-axis can be selected2263 the K icon or <B>pressing the s key</B> brings up a menu where the x-axis can be selected 2272 2264 as temperature. If the plot fails to update, click on another column and then 2273 2265 return to the original column. </p> … … 2280 2272 mso-wrap-style:square'> 2281 2273 <v:imagedata src="SequentialTutorial_files/image080.png" o:title=""/> 2282 </v:shape><![endif]--><![if !vml]><img width=389 height=296 2283 src="SequentialTutorial_files/image081.jpg" v:shapes="Picture_x0020_45"><![endif]><span 2284 style='mso-spacerun:yes'> </span></span></p> 2274 </v:shape><![endif]--></span></p> 2285 2275 2286 2276 <p class=MsoListParagraphCxSpLast><o:p> </o:p></p> … … 2296 2286 style='mso-fareast-font-family:Cambria;mso-bidi-font-family:Cambria'><span 2297 2287 style='mso-list:Ignore'>1.<span style='font:7.0pt "Times New Roman"'> 2298 </span></span></span><![endif]> Restore the background parametersas before for2299 any one histogram and then use the File/Copy flagsmenu item to copy these2288 </span></span></span><![endif]><B>Restore the refinement of background parameters</B> as before for 2289 any one histogram and then <B>use the File/Copy flags</B> menu item to copy these 2300 2290 refinement flags (only) to all other histograms (not in this case, since all 2301 2291 values are the same, the same result would be obtained from the File/Copy menu … … 2327 2317 <v:imagedata src="SequentialTutorial_files/image084.png" o:title=""/> 2328 2318 <w:wrap type="square" anchorx="margin" anchory="margin"/> 2329 </v:shape><![endif]--><![if !vml]><img width=75 height=472330 src="SequentialTutorial_files/image085. jpg" align=left hspace=12 v:shapes="Picture_x0020_48"><![endif]><span2319 </v:shape><![endif]--><![if !vml]><img 2320 src="SequentialTutorial_files/image085.png" align=left hspace=12 v:shapes="Picture_x0020_48"><![endif]><span 2331 2321 style='mso-fareast-language:EN-US;mso-no-proof:yes'><!--[if gte vml 1]><v:shape 2332 2322 id="Picture_x0020_49" o:spid="_x0000_i1034" type="#_x0000_t75" style='width:158.25pt; 2333 2323 height:152.25pt;visibility:visible;mso-wrap-style:square'> 2334 2324 <v:imagedata src="SequentialTutorial_files/image086.png" o:title=""/> 2335 </v:shape><![endif]--><![if !vml]><img width=211 height=2032336 src="SequentialTutorial_files/image087. jpg" v:shapes="Picture_x0020_49"><![endif]></span></p>2325 </v:shape><![endif]--><![if !vml]><img 2326 src="SequentialTutorial_files/image087.png" v:shapes="Picture_x0020_49"><![endif]></span></p> 2337 2327 2338 2328 <p class=MsoNormal><o:p> </o:p></p> … … 2341 2331 style='mso-fareast-font-family:Cambria;mso-bidi-font-family:Cambria'><span 2342 2332 style='mso-list:Ignore'>2.<span style='font:7.0pt "Times New Roman"'> 2343 </span></span></span><![endif]>Likewise, include the Sample X displacement2344 parameter and again use the Command/Copy flags menu item.</p>2333 </span></span></span><![endif]>Likewise, <B>include the Sample X displacement</B> 2334 parameter and again use the <B>Command/Copy flags menu item.</B> </p> 2345 2335 2346 2336 <p class=MsoListParagraphCxSpMiddle><o:p> </o:p></p> … … 2361 2351 style='mso-fareast-font-family:Cambria;mso-bidi-font-family:Cambria'><span 2362 2352 style='mso-list:Ignore'>3.<span style='font:7.0pt "Times New Roman"'> 2363 </span></span></span><![endif]>For Phase parameters add the three broadening2364 terms for the CuCr<sub>2</sub>O<sub>4</sub> phase and thepress the Copy2365 flags? button . (Important: not the Copy button!) For the<span class=SpellE>CuO</span>2353 </span></span></span><![endif]>For Phase parameters <B>add the three broadening 2354 terms</B> for the CuCr<sub>2</sub>O<sub>4</sub> phase and the <B>press the Copy 2355 flags? button</B>. (Important: not the Copy button!) For the <B><span class=SpellE>CuO</span> 2366 2356 phase, add the single sample broadening term and the remaining lattice 2367 parameter via the D13 term.<span style='mso-spacerun:yes'> </span>Again,use2368 the Copy flags? button . Note that an additional step is needed in order to2357 parameter</B> via the D13 term.<span style='mso-spacerun:yes'> </span>Again, <B>use 2358 the Copy flags? button</B>. Note that an additional step is needed in order to 2369 2359 vary Phase fractions, as will be discussed below. </p> 2370 2360 … … 2376 2366 mso-wrap-style:square'> 2377 2367 <v:imagedata src="SequentialTutorial_files/image090.png" o:title=""/> 2378 </v:shape><![endif]--><![if !vml]><img width=332 height=2412379 src="SequentialTutorial_files/image091. jpg" v:shapes="Picture_x0020_52"><![endif]></span></p>2368 </v:shape><![endif]--><![if !vml]><img 2369 src="SequentialTutorial_files/image091.png" v:shapes="Picture_x0020_52"><![endif]></span></p> 2380 2370 2381 2371 <p class=MsoListParagraphCxSpMiddle><o:p> </o:p></p> … … 2386 2376 mso-wrap-style:square'> 2387 2377 <v:imagedata src="SequentialTutorial_files/image092.png" o:title=""/> 2388 </v:shape><![endif]--><![if !vml]><img width=332 height=2492389 src="SequentialTutorial_files/image093. jpg" v:shapes="Picture_x0020_53"><![endif]></span></p>2378 </v:shape><![endif]--><![if !vml]><img 2379 src="SequentialTutorial_files/image093.png" v:shapes="Picture_x0020_53"><![endif]></span></p> 2390 2380 2391 2381 <p class=MsoListParagraphCxSpMiddle><o:p> </o:p></p> … … 2395 2385 style='mso-list:Ignore'>4.<span style='font:7.0pt "Times New Roman"'> 2396 2386 </span></span></span><![endif]>Start the sequential refinement again with the 2397 Calculate/Sequential refine menu item. The fits are significantly improved at2387 <B>Calculate/Sequential refine menu item</B>. The fits are significantly improved at 2398 2388 higher temperatures, with <span class=SpellE>R<sub>wp</sub></span> values 2399 2389 between 13.8 and 17.</p> … … 2512 2502 <p class=MsoListParagraphCxSpMiddle><o:p> </o:p></p> 2513 2503 2514 <p class=MsoListParagraphCxSpMiddle>To set up the new constraint, click on the2515 Constraints item in the data tree and theSelect tab/Histogram/Phase2516 menu<span style='mso-spacerun:yes'> </span>item , and thenclick on the2517 Edit/Add constraint menu item. From the menu, we want one of the twox<span2504 <p class=MsoListParagraphCxSpMiddle>To set up the new constraint, <B>click on the 2505 Constraints item</B> in the data tree and the <B>Select tab/Histogram/Phase 2506 menu<span style='mso-spacerun:yes'> </span>item</B>, and then <B>click on the 2507 Edit/Add constraint</B> menu item. From the menu, we want one of the two <B>x<span 2518 2508 style='font-family:Courier'>:*<span class=GramE>:Scale</span></span> wild card 2519 phase fractions . </p>2509 phase fractions</B>. </p> 2520 2510 2521 2511 <p class=MsoListParagraphCxSpMiddle><span style='mso-spacerun:yes'> </span><span … … 2529 2519 2530 2520 <p class=MsoListParagraphCxSpMiddle>There will only be one possible matching 2531 variable in the next window, so select that and press OK.</p>2521 variable in the next window, so <B>select that and press OK</B>.</p> 2532 2522 2533 2523 <p class=MsoListParagraphCxSpMiddle><span style='mso-fareast-language:EN-US; … … 2557 2547 2558 2548 <p class=MsoListParagraphCxSpMiddle>These two constraints will interfere when 2559 refining the first histograms, so press the delete button next to the firstto2549 refining the first histograms, so <B>press the delete button next to the first</B> to 2560 2550 remove it.</p> 2561 2551 … … 2575 2565 style='mso-list:Ignore'>6.<span style='font:7.0pt "Times New Roman"'> 2576 2566 </span></span></span><![endif]>Start the sequential refinement again with the 2577 Calculate/Sequential refine menu item.Three new columns appear at the end of2567 <B>Calculate/Sequential refine menu item.</B> Three new columns appear at the end of 2578 2568 the table, <span class=GramE>for <span style='font-family:Courier'>::</span></span><span 2579 2569 style='font-family:Courier'>constr0</span> (generated by the constraint) and … … 2598 2588 <p class=MsoListParagraphCxSpMiddle><o:p> </o:p></p> 2599 2589 2600 <p class=MsoListParagraphCxSpMiddle> Click on the CuCr2O4 phaseto and then the2601 atoms tab. Double-click on the refine labelat the top of the atoms table, a2602 refinement controls dialog opens, select X to refine coordinates (only O has2603 coordinates not fixed by symmetry) and U to refine the atomic displacement (<span2604 class=SpellE>Uiso</span>) values.<span style='mso-spacerun:yes'> </span> Press2605 OK. </p>2590 <p class=MsoListParagraphCxSpMiddle><B>Click on the CuCr2O4 phase</B> to and then the 2591 atoms tab. <B>Double-click on the refine label</B> at the top of the atoms table, a 2592 refinement controls dialog opens, <B>select X to refine coordinates (only O has 2593 coordinates not fixed by symmetry) and U</B> to refine the atomic displacement (<span 2594 class=SpellE>Uiso</span>) values.<span style='mso-spacerun:yes'> </span><B>Press 2595 OK.</B> </p> 2606 2596 2607 2597 <p class=MsoListParagraphCxSpMiddle><span style='mso-fareast-language:EN-US; … … 2633 2623 style='mso-list:Ignore'>7.<span style='font:7.0pt "Times New Roman"'> 2634 2624 </span></span></span><![endif]>Start the sequential refinement again with the 2635 Calculate/Sequential refine menu item. The fits are significantly improved at2625 <B>Calculate/Sequential refine menu item</B>. The fits are significantly improved at 2636 2626 higher temperatures, with <span class=SpellE>R<sub>wp</sub></span> values 2637 2627 between 13.8 and 16.4.</p> 2638 2628 2629 <p>This completes the sequential refinement tutorial, although many 2630 more things could be attempted to further improve the refinement 2631 quality. Note that the results of this refinement are used for 2632 additional analysis in the <a href="ParametricFitting.htm">Parametric 2633 Fitting and Pseudo Variables for Sequential Fits</a> tutorial. 2634 2639 2635 </div> 2640 2636 -
trunk/help/gsasII.html
r1336 r1340 2345 2345 style='font-weight:normal'>Sequential refinement</span></a><o:p></o:p></strong></p> 2346 2346 2347 <p class=MsoNormal><strong><a href="ParametricFitting.htm"><span 2348 style='font-weight:normal'>Parametric Fitting and Pseudo Variables</span></a><o:p></o:p></strong></p> 2349 2347 2350 <p class=MsoNormal><strong><o:p> </o:p></strong></p> 2348 2351
Note: See TracChangeset
for help on using the changeset viewer.