Peak Finding
A diffractometer hands you thousands of points and every page that does anything with a powder pattern wants a handful of numbers instead. Peak finding is that step: fit the background, subtract it, decide which bumps are peaks, and measure each one. This page does it without fitting a peak shape, and it hands the answer straight to the pages that index the positions and take the widths apart.
- You supply
- A raw scan — two columns, a position in degrees 2θ and a count, one point per line. No peak list, no widths and no wavelength except for the d column. If you have no scan to hand, the page simulates one from a structure it ships, so you can see what the search does to a pattern whose answer is already known.
- Reading it
- A peak finder can be wrong in two ways and neither of them shows in its output: it can invent a peak out of noise, and it can report two reflections as one peak. Those are different words on purpose — a reflection is a point of the reciprocal lattice, a peak is something a detector recorded, and several reflections at one d make one peak. A found peak here has to be the tallest point within one peak width and clear five times the local noise — local, because counting noise grows as the square root of the counts, so one number for a whole scan is too small on the baseline and it is the baseline that manufactures peaks. Against merging there is no defence: reflections closer than about one width come back as a single peak between them.
Worked examples: albite – 200 reflections, and the scan cannot resolve them all · rutile at 5 nm – the peaks merge, and nothing can undo that · a 0.1° step – the width that comes back is the step
See also: Bragg Calculator · HKL Calculator · Line Broadening · Intensity Corrections · Powder Indexing
Input
This scan is simulated
Nothing was pasted in, so this is a scan this site generated rather than measured: rutile at Cu Kα, through the same forward model the powder simulator draws with, on a broad amorphous background with counting noise on top. The background and the noise are there on purpose: a finder shown clean peaks on a flat line demonstrates nothing, and the background is the step this page spends most of its care on. Paste your own scan over it.
What came back
19 peaks, at a full width of 0.081°. That width is a measurement in its own right: it is what the instrument contributes plus whatever the sample adds, and the line broadening page is where the two come apart.
How it did
This scan was generated by this site, so the answer was known before the search ran. The forward model put 20 reflections into it, of which 19 are strong enough to clear the reporting threshold. The search returned 19 peaks, and 19 of those reflections lie within one peak width of one of them — worst position out by 0.0112°, worst width out by 0.007°. 0 peaks correspond to no reflection at all. A match counts within one peak width (0.081°), because that is the resolution the scan physically has.
The peaks
| # | d / Å | height | rel. / % | FWHM / ° | area | |
|---|---|---|---|---|---|---|
| 1 | 27.457 | 3.2485 | 29321 | 100 | 0.0806 | 3720 |
| 2 | 36.106 | 2.4876 | 13393 | 45.7 | 0.0813 | 1711 |
| 3 | 39.221 | 2.297 | 2080 | 7.1 | 0.0763 | 247 |
| 4 | 41.272 | 2.1874 | 5477 | 18.7 | 0.0818 | 704 |
| 5 | 44.077 | 2.0545 | 2020 | 6.9 | 0.0816 | 259 |
| 6 | 54.363 | 1.6876 | 17201 | 58.7 | 0.0803 | 2172 |
| 7 | 56.67 | 1.6243 | 4985 | 17 | 0.0831 | 658 |
| 8 | 62.808 | 1.4795 | 2404 | 8.2 | 0.0812 | 308 |
| 9 | 64.099 | 1.4528 | 2454 | 8.4 | 0.0814 | 315 |
| 10 | 65.574 | 1.4236 | 181 | 0.6 | 0.087 | 27 |
| 11 | 69.061 | 1.36 | 6323 | 21.6 | 0.0803 | 794 |
| 12 | 69.861 | 1.3464 | 3172 | 10.8 | 0.0774 | 383 |
| 13 | 72.482 | 1.304 | 322 | 1.1 | 0.0782 | 40 |
| 14 | 76.604 | 1.2438 | 706 | 2.4 | 0.0731 | 83 |
| 15 | 79.9 | 1.2006 | 381 | 1.3 | 0.0786 | 49 |
| 16 | 82.411 | 1.1702 | 1352 | 4.6 | 0.081 | 174 |
| 17 | 84.322 | 1.1485 | 992 | 3.4 | 0.0743 | 116 |
| 18 | 87.56 | 1.1142 | 336 | 1.1 | 0.0835 | 45 |
| 19 | 89.634 | 1.0937 | 2273 | 7.8 | 0.0825 | 300 |
Heights and areas are in the units of the second column of your scan, above the fitted background. The area is the area between the two half-height crossings, doubled, which is not the integrated intensity: the tails outside those crossings carry about a fifth of a Gaussian peak and about half of a Lorentzian one, and which of those this is cannot be known without fitting a shape. Use it for ratios between peaks of similar shape, where the missing tail cancels, and not as an absolute.
Where these go next
Both links carry the numbers above, so nothing has to be retyped.
The width was measured, not typed
Nobody typed that width in. The search starts at 1°, measures the widths it finds, takes the median and runs again: 1 → 0.318 → 0.18 → 0.081. The median rather than the mean, because a merged pair of lines is a large outlier and must not drag the estimate. The starting value is above any laboratory peak width and not far above: a start below the truth sticks, because a width below the truth finds the shoulders of real peaks and shoulders are narrow, which confirms the wrong answer — and a start several times too wide fails in the other direction, sometimes without saying so.
What a peak list is evidence of
A peak finder can be wrong in two ways and neither of them shows in its output: it can invent a peak out of noise, and it can report two reflections as one peak. This page is built against both, and the numbers are measured rather than claimed — run on scans this site generated from structures it ships, so every line is known before the search sees it, rutile gave 18 peaks with none invented and none of its 12 strong lines missed, and the worst position was out by 0.0014°. Against invention there are two tests and a peak has to pass both: it must be the tallest point within one peak width, and it must clear 5 times the local noise. Local matters — counting noise goes as the square root of the counts, so one number for a whole scan is too small on the baseline, and it is the baseline that manufactures peaks. Against merging there is no defence at all: two reflections closer than about one width come back as one peak between them, and the only sign is a width larger than its neighbours’.
Three things this page does not do, each for a reason rather than for want of code. It does not fit peak shapes — there is no least squares here and no eta. A fitted shape gives a better width on an isolated peak and a confidently wrong one on an overlapped pair, and nothing here could tell you which it had just done. It does not separate overlapping lines. And it stores nothing: your scan arrives in the request and leaves with the answer, so there is no file, no upload directory and no retention question to have an opinion about.
Where this comes from
- SNIP, a statistics-sensitive background treatment for the quantitative analysis of PIXE spectra in geoscience applications
C. G. Ryan, E. Clayton, W. L. Griffin, S. H. Sie and D. R. Cousens, Nucl. Instrum. Methods Phys. Res. B 1988, 34, 396–402 · doi:10.1016/0168-583X(88)90063-8
The background this page fits, in the paper that introduced it. It is a PIXE paper and the method is used well outside that field: the clipping is blind to what the peaks are, so it works on anything whose peaks are narrower than its window. The log-log-square-root transform is what lets one window serve a strong peak and a bare baseline at once. - Automatic collection of powder data from photographs
E. J. Sonneveld and J. W. Visser, J. Appl. Cryst. 1975, 8, 1–7 · doi:10.1107/S0021889875009417
The problem this page solves, stated for powder data before anybody had a diffractometer that produced a file. Both of the failure modes named at the top of this page are in it: a background that is not flat, and lines too close to be separated at the resolution the measurement has.