# Changeset 1009

Ignore:
Timestamp:
Jul 24, 2013 4:39:06 PM (10 years ago)
Message:

auto peak search for TOF - no duplicates either
small amendment to peak fit tutorial

Location:
trunk
Files:
2 edited

Unmodified
Removed
• ## trunk/GSASIIpwd.py

 r998 return widths,fmin,fmax def getFWHM(TTh,Inst): def getFWHM(pos,Inst): 'needs a doc string' sig = lambda Th,U,V,W: 1.17741*math.sqrt(max(0.001,U*tand(Th)**2+V*tand(Th)+W))*math.pi/180. sigTOF = lambda dsp,S0,S1,Sq:  S0+S1*dsp**2+Sq*dsp gam = lambda Th,X,Y: (X/cosd(Th)+Y*tand(Th))*math.pi/180. s = sig(TTh/2.,Inst['U'][1],Inst['V'][1],Inst['W'][1])*100. g = gam(TTh/2.,Inst['X'][1],Inst['Y'][1])*100. gamTOF = lambda dsp,X,Y: X*dsp+Y*dsp**2 if 'C' in Inst['Type'][0]: s = sig(pos/2.,Inst['U'][1],Inst['V'][1],Inst['W'][1])*100. g = gam(pos/2.,Inst['X'][1],Inst['Y'][1])*100. else: dsp = pos/Inst['difC'][0] s = sigTOF(dsp,Inst['sig-0'][1],Inst['sig-1'][1],Inst['sig-q'][1]) g = gamTOF(dsp,Inst['X'][1],Inst['Y'][1]) return getgamFW(g,s)
• ## trunk/help/Fit Peaks.htm

 r898 Von DreeleVon Dreele30770317732012-05-05T16:28:00Z2013-04-30T18:16:00Z2013-07-24T21:07:00Z11263315011270715435Argonne National Laboratory1253517609128361810614.00 mso-ascii-theme-font:minor-latin;mso-hansi-theme-font:minor-latin;mso-bidi-font-family: Calibri;mso-bidi-theme-font:minor-latin'>Import/Powder Data/from GSAS file menu item to read the data file into the current GSAS-II project. This read option is set to read any of the powder data formats defined for GSAS (angles in centidegrees, TOF in µsec). Other submenu items will read the centidegrees, TOF in µsec). Other submenu items will read the Limits window is erased). At this point it is wise to zoom in on the data that will be used for indexing.

mso-bidi-theme-font:minor-latin'>Limits
window is erased). At this point it is wise to zoom in on the data that will be used for indexing.

There will be 22-23 peaks in this example. You should examine both the list and the plot to be sure the auto search did not pick a peak twice (there may be three of these!) or skip a peak or shoulder. You can add a peak to the list by pressing the left mouse button with the pointer on a data point at the peak top or shoulder; be sure the zoom/shift buttons are off. You may drag a peak position as needed. A position may be deleted with a right click with the mouse on the blue line. You can also delete a peak by selecting the row in the table; it will be highlighted in blue. Then press the Delete key; it will be removed from the table and the plot. The list will always show the peaks sorted by position. When done you should have 20 unique peak positions.

will be 20+ peaks in this example. You should examine both the list and the plot to be sure the auto search did not pick a peak twice (quite rarely) or skip a peak or shoulder. You can add a peak to the list by pressing the left mouse button with the pointer on a data point at the peak top or shoulder; be sure the zoom/shift buttons are off. You may drag a peak position as needed. A position may be deleted with a right click with the mouse on the blue line. You can also delete a peak by selecting the row in the table; it will be highlighted in blue. Then press the Delete key; it will be removed from the table and the plot. The list will always show the peaks sorted by position. When done you should have 20 unique peak positions.

Step 4: Refine Peak Positions

src="Fit%20Peaks_files/image012.png" v:shapes="Picture_x0020_11">

Notice that the peak position is slightly to the right of the peak top. This is a consequence of the peak asymmetry arising from axial divergence in the diffractometer. The Rwp is ~6% as shown on the console window. Again the File/Close project in the GSAS-II data tree window. You will be asked if you want it saved; if Yes then all the peak fitting/indexing & cell refinement results will be saved to the LaB6.gpx file. If To continue with the second part of this exercise, select the menu item File/Close project in the GSAS-II data tree window. You will be asked if you want it saved; if Yes then all the peak fitting/indexing & cell refinement results will be saved to the LaB6.gpx file. If \Exercises\kryptonite\11bmb_6231.fxye; it has a corresponding \Exercises\kryptonite\11bmb_6231.fxye; it has a corresponding Auto search to start and then fill in by hand: Add peaks by left-clicking on a data point near the top of the peak. Peak positions can be moved by dragging the peak line and peaks can be deleted by right-clicking on them. This only works when the zoom and reposition modes (below) are not selected. Also note some peaks have shoulders most notably at 5.07, 6.04, 7.81deg. I found 28 peaks (there was one very weak shoulder at ~7.3 deg. I skipped  it might be from a second phase? Well see later).

minor-latin'>Auto search to start and then fill in by hand: Add peaks by left-clicking on a data point near the top of the peak. Peak positions can be moved by dragging the peak line and peaks can be deleted by right-clicking on them. This only works when the zoom and reposition modes (below) are not selected. Also note some peaks have shoulders most notably at 5.07, 6.04, 7.81deg. I found 28 peaks (there was one very weak shoulder at ~7.3 deg. I skipped  it might be from a second phase? Well see later).

Step 4. Refine peaks

Following the steps used in the LaB6 example above, refine the peaks and the profile shape parameters in Instrument Parameters. You will be asked for a project file name at the first refinement (I used Following the steps used in the LaB6 example above, refine the peaks and the profile shape parameters in Instrument Parameters. You will be asked for a project file name at the first refinement (I used 

style='mso-bidi-font-weight:normal'>Save the project file as it is needed for the Save the project file as it is needed for the Auto search to start and then fill in by hand: Add peaks by left-clicking on a data point near the top of the peak. Peak positions can be moved by dragging the peak line and peaks can be deleted by right-clicking on them. This only works when the zoom and reposition modes (below) are not selected. Also note the shoulder at ~6.3 deg that should be added to the list. I skipped a couple of very weak peaks; the total list has 28 peaks.

minor-latin'>Auto search to start and then fill in by hand: Add peaks by left-clicking on a data point near the top of the peak. Peak positions can be moved by dragging the peak line and peaks can be deleted by right-clicking on them. This only works when the zoom and reposition modes (below) are not selected. Also note the shoulder at ~6.3 deg that should be added to the list. I skipped a couple of very weak peaks; the total list has 28 peaks.

Note: See TracChangeset for help on using the changeset viewer.