Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Solutions · 4. Peak broadening: the Scherrer equation and the Williamson–Hall plot

School of Engineering, Nazarbayev University

Worked solutions to the three exercises of Lecture 4. Each solution is computed here and checked with assert statements against an exact identity or an independent calculation. The first code cell sets up the notebook and runs Demonstration 1 of the lecture without showing its output, because some of the solutions use its variables.

Exercise 1

Problem. Verify across five reflections of strained Si (D=60 nmD = 60\ \mathrm{nm}, ε=0.0018\varepsilon = 0.0018) that naive single-peak Scherrer size satisfies 1Dapp(θ)=1D+4εsin⁡θ0.1 Kλ [nm−1]\frac{1}{D_{\mathrm{app}}(\theta)} = \frac{1}{D} + \frac{4\varepsilon\sin\theta}{0.1\,K\lambda}\ [\mathrm{nm^{-1}}] to rounding error.


Exercise 1: Exact Reciprocal-Size Bias Law for Naive Single-Peak Scherrer
=========================================================================
Si (1, 1, 1)  | D_app =  33.99 nm | 1/D_app = 0.029424 nm^-1 vs formula = 0.029424 nm^-1
Si (2, 2, 0)  | D_app =  26.67 nm | 1/D_app = 0.037499 nm^-1 vs formula = 0.037499 nm^-1
Si (3, 1, 1)  | D_app =  24.33 nm | 1/D_app = 0.041094 nm^-1 vs formula = 0.041094 nm^-1
Si (4, 0, 0)  | D_app =  21.68 nm | 1/D_app = 0.046128 nm^-1 vs formula = 0.046128 nm^-1
Si (3, 3, 1)  | D_app =  20.50 nm | 1/D_app = 0.048771 nm^-1 vs formula = 0.048771 nm^-1

Explanation. Dividing βcos⁡θ=KλD+4εsin⁡θ\beta\cos\theta = \frac{K\lambda}{D} + 4\varepsilon\sin\theta by 0.1 Kλ0.1\,K\lambda shows immediately that 1/Dapp(θ)1/D_{\mathrm{app}}(\theta) is the Williamson–Hall ordinate rescaled into nm−1\mathrm{nm^{-1}}.


Exercise 2

Problem. Quantify the exact error factor when β=0.45∘\beta = 0.45^\circ is passed into scherrer_crystallite_size_nm without converting degrees to radians, and compare the erroneous size to copper’s lattice constant aCu=0.36149 nma_{\mathrm{Cu}} = 0.36149\ \mathrm{nm}.


Exercise 2: Diagnostic Audit — Passing FWHM in Degrees Instead of Radians
=========================================================================
Correct radian Scherrer D = 18.994 nm
Unconverted degree-bug  D = 0.3315 nm (< 1 Cu unit cell a = 0.3615 nm)
Exact error ratio         = 57.295780 == 180 / pi

Explanation. Omitting np.radians(..) divides DD by 180/π=57.2958180/\pi = 57.2958, which turns 19.0 nm19.0\ \mathrm{nm} into 0.33 nm0.33\ \mathrm{nm}, less than one unit cell of copper. A size below the lattice constant is a sign of this unit error.


Exercise 3

Problem. Implement gaussian_size_strain_fit(beta_fwhm_rad, two_theta_deg, wavelength_A, shape_factor=0.9) for quadrature-broadened Gaussian peaks β2=βD2+βε2\beta^2 = \beta_D^2 + \beta_\varepsilon^2 and compare against Lorentzian williamson_hall_fit.


Exercise 3: Implement It Yourself — Quadratic Gaussian Size-Strain Deconvolution
================================================================================
Quadratic Gaussian Fit: D = 40.0000 nm, eps = 0.002000 (EXACT)
Linear Lorentzian Fit : D = 62.31 nm,  eps = 0.001557 (model-mismatch bias)

Summary. Because βD2+βε2<βD+βε\sqrt{\beta_D^2 + \beta_\varepsilon^2} < \beta_D + \beta_\varepsilon, applying linear Lorentzian Williamson–Hall to purely Gaussian peaks overestimates DD (62.3 nm62.3\ \mathrm{nm} against 40.0 nm40.0\ \mathrm{nm}), motivating quadratic Gaussian or Halder–Wagner plots for pseudo-Voigt profiles.