# Tutorial Peakwidths

#### Peak Widths in a Diffraction Pattern – Y_{2}O_{3}

Files needed: y2o3.cif, y2o3_fwhm_01.xye

Learning Outcomes: This tutorial will introduce you to the factors which influence peak shapes in a Rietveld refinement. You’ll learn how to determine the instrumental function of a diffractometer from experimental data using simple peak fitting. You’ll learn the equations behind peak shape fitting in Rietveld software. You’ll learn how to describe experimental peak shapes using fundamental parameters.

Information: Data were “collected” on a diffractomer with Cu Ka1 radiation on a sample of Y_{2}O_{3}. The monochromator angle was 27.26, the tube filament was 12 mm long, the sample was 15 mm long, 5 degree primary and secondary Soller slits were used. The 332 nm crystallite size gave a Lorentzian and the 0.05 % strain a Gaussian broadening contribution.

Expected Knowledge: elementary use of jedit, how to fit functions in excel.

If you haven’t already done so work through the peak fitting tutorial.

##### Plot the fwhm vs 2-theta for the data

It’s often extremely useful to plot fwhm vs 2-theta for an experimental powder pattern. This lets you check that the machine is working well (for a crystalline sample a good lab instrument in high resolution mode should give peak widths of 0.07 degrees or lower at low 2-theta).

1. Load the data set into topas academic. Use file/Load Scan File and select the .xye file. Use the automatic peak search routine to insert peaks.

2. Go through the jedit menu for “Peak Fitting” and fit individual peaks to the pattern.

3. This method uses a single peak shape function for the whole pattern. For this exercise we want to let each peak have a different fwhm. This can be done by deleting the “Simple Axial” and “TCHz” lines from your file then editting the peak lines so they look like:

```
xdd y2o3_fwhm_01.xye
x_calculation_step = Yobs_dx_at(Xo); convolution_step 4
LP_Factor(!th2_monochromator, 27.26)
CuKa1(0.0001)
bkg @ 0 0 0 0 0 0
```

`prm !pklor 0.0001 min 0 max 1`

```
xo_Is xo @ 16.6505671` I @ 0.07184653` peak_type pv pv_lor =pklor; pv_fwhm @ 0.137451413` min 0.001 max 1
xo_Is xo @ 20.4499512` I @ 3.92213099` peak_type pv pv_lor =pklor; pv_fwhm @ 0.0988863498` min 0.001 max 1
xo_Is xo @ 29.1113378` I @ 70.041241` peak_type pv pv_lor =pklor; pv_fwhm @ 0.085140998` min 0.001 max 1
```

This can be done very quickly using column editting in jedit. Remember to delete any “{” s from you .inp file. This forces all peaks to be Gaussian (the lorentzian component of each peak is essentially 0). You should get wRp=30.3%. If you get stuck try looking at this file.

4. Use jedit to highlight first the 2-theta column and then the fwhm column and paste them into excel.

5. In excel plot fwhm vs 2-theta. You will find it useful to have 2 columns for 2-theta, one in degrees and one in radians. Plot fwhm vs 2-theta for each. If you get stuck try taking the 2-theta and fwhm data from here.

##### Peak shape functions in Excel

In this section of the tutorial we’ll use excel to plot how peak fwhm varies with diffraction angle. We’ll also do some simple least squares fitting in excel to come up with functions that we can use to describe how fwhm varies with 2-theta.

1. In excel plot fwhm against 2-theta in radians [N.B. it’s easiest to convert to radians as this is what topas uses; in excel create a column using the equation C2=Radians(B2)]. You should see that the fwhm is a smooth function of theta.

2. Try fitting a simple second order polynomial function to express fwhm = a + b*(2 Th)+c(2 Th)^2.

3. Many of the common peak shape formulae use expressions similar to “fwhm = u Tan(Th)^2 + v Tan(Th) + w” for Gaussian peaks. In excel generate a column which calculates fwhm using this function.

4. In excel create columns for (fwhm_obs – fwhm_calc) and (fwhm_obs – fwhm_calc)^2.

5. Use the excel “solver” function to minimise the sum of the (fwhm_obs – fwhm_calc)^2 column by varying u, v and w.

6. Plot fwhm_obs and fwhm_calc against (2 Th) in radians. You should find that values of u/v/w of 0.014/0.043/ 0.084 give a good fit to the data.

**Peak Shape Functions in Topas**

The next step of the tutorial is to try out these peak shape functions in topas.

1. First go through the “Simple Rietveld Refinement” menus and perform a standard Rietveld refinement on the data. You can select “Durham d8” for the diffractomter and y2o3.cif as the structural model. Refine isotropic temperature factors on the Y/O atoms. You should get wRp = 15.6%.

2. This standard refinement uses one of the built in analytical peak shapes in Topas. We want to investigate how our simpler functions behave. Delete the line in the input file which starts “TCHZ” (or better still comment it out as it may be useful later). Try using the peak shape function that depends on Tan(Th). You’ll need lines that look like:

```
prm u 0.014
prm v 0.043
prm w 0.084
peak_type pv pv_lor 0.001 pv_fwhm = u * Tan(Th)^2 + v * Tan(Th) + w;
```

You should be able to get wrp~32.110% and find refined u/v/w values similar to those obtained in excel.

3. Try introducing a simple polynomial peak shape function as determined in excel. The lines you need will be something like:

```
prm !u 0.0953
prm !v -0.1881
prm !w 0.1917
peak_type pv pv_lor 0.001 pv_fwhm = u * ((2 Th)^2) + v * (2 Th) + w;
```

You should be able to perform a reasonable Rietveld refinement and get Rwp~32.774%. If you refine values of u/v/w Rwp will fall slightly.

4. Try allowing the peaks to be pseudo-voigts rather than just gaussian. i.e. modify the peak_type line to read:

`peak_type pv pv_lor @ 0.001 pv_fwhm = u * ((2 Th)^2) + v * (2 Th) + w;`

You should get a lower Rwp of 20.1%.

5. Try adding a simple function to describe peak assymetry.

Simple_Axial_Model(@, 6)

You should now get an R-factor of 14.65% and a very good fit to the data.

**Fundamental Parameters Peak Fitting**

It’s also possible to use the fundamental parameters approach for peak shape fitting in which you compute the effect of each of the various components (monochromator, slits, Soller slits, tube, sample, etc) on the peak shape.

1. Add the following lines immediately after the line which describes the wavelength:

```
Radius(217)
Divergence(1)
axial_conv
filament_length 12
sample_length 15
receiving_slit_length 12
primary_soller_angle 5.1
secondary_soller_angle 5
Slit_Width(0.1)
```

2. After the fractional coordinates delete any peak shape lines you have present and use the following lines to describe peak shape broadening due to sample size and strain:

```
CS_L(size_lor, 100)
Strain_G(strain_g, 0.01)
```

You should be able to get an Rwp of 13.85%. N.B. you are now only refining 2 parameters to describe a very complex peak shape. This can help reduce correlations/instability in refinements.

##### Extra Work

Play with other peak shape functions.

Use your input file to see what would happen to an “experimental” data set if you changed the instrumental set up (e.g. Soller slits, detector slit, etc, etc).