xdart · Phase Analysis · physics and fitting guide

How a crystal structure becomes a pattern, and how Phase Analysis fits it

A crystal's lattice fixes where its peaks fall and its atoms fix how strong they are. Phase Analysis computes each phase's whole pattern from its structure and fits all of them to the data at once: the lattice, how much each phase scatters, how broad its peaks are and how its crystallites are oriented. This guide starts with that physics, then shows how each number Phase Analysis reports follows from it.

Up to 8 phasesCIF files, lattice parameters or the phase library, with built-in calibrants listed apart as reference lines
11 profilespseudo-Voigt, Gaussian, Lorentzian, Voigt, Pearson VII and six more
3 width modelsCaglioti (the instrument), Scherrer (size and strain), or one fixed width
Batches and notebooksSequential batches seed each fit from the last; supported file-backed fits export to Jupyter and marimo
The physics

From structure to pattern

11.522.533.544.555.5600.51q (Å⁻¹)Intensity, scaled to 1(110)(211)(100)(321)(200)(310)(220)(111)
Each reflection hkl sits at q = 2π/dhkl, set by the unit cell alone; for a cubic cell d = a/√(h² + k² + l²). Its intensity follows the structure factor, Fhkl = Σ fj exp[2πi(hxj + kyj + lzj)] over the atoms in the cell, through |F|², times the reflection's multiplicity and the Lorentz-polarization factor. In CsCl, caesium sits at the cube's corner and chlorine at its centre, so reflections with h + k + l even add the two atoms' scattering and odd ones subtract it, and the pattern alternates strong and weak. Phase Analysis computes these positions and intensities from the CIF with pymatgen, at the wavelength the data were recorded with (the Lorentz-polarization factor depends on it, the positions in q do not); this pattern is computed for 1 Å and drawn with one fixed width.

Peak widths: the instrument, size and strain

0.511.522.533.544.555.56051015q (Å⁻¹)width σ (10⁻³ Å⁻¹)Caglioti: the instrumentScherrer: crystallite size and microstrain
Caglioti, U = 4·10⁻⁶, V = 0 Å⁻¹, W = 2.5·10⁻⁵ Å⁻² Scherrer, D = 30 nm, ε = 0.15 %
Every peak is broadened by the instrument and by the sample, and Phase Analysis models how the width changes with q. Caglioti's smooth form, σ² = U q² + V q + W, describes an instrument's resolution; fitting a standard gives its U, V and W. Scherrer describes the sample: crystallites of size D broaden every peak by the same 2πK/D in q (K = 0.94), and microstrain ε adds 2εq, the two combined in quadrature, so Phase Analysis fits D (in Å) and ε directly. Fixed width gives each phase one width. For the pseudo-Voigt, Gaussian, Lorentzian and Pearson VII profiles σ is half the width at half maximum (FWHM = 2σ); the other profiles define σ in their own way (for the Voigt it is the Gaussian part's standard deviation, beside a Lorentzian γ), so read Scherrer's D and ε with one of those four. Both curves are xdart's own width functions.

Texture: when crystallites line up

0102030405060708090024angle between the reflection's normal and the texture axis (°)intensity factorr = 0.6: plate-liker = 1: random powderr = 1.6: needle-like
A powder pattern assumes crystallites point every way. In a film or a pressed powder they often do not: plates lie flat and needles align, which strengthens some reflections and weakens others. March-Dollase describes this with one ratio r. Each reflection's intensity is multiplied by (r² cos²α + sin²α / r)−3/2, where α is the angle between its plane normal and the texture axis h₀ k₀ l₀ (set in Advanced). r = 1 is a random powder. r < 1 strengthens the reflections along the axis, as plate-like crystallites do, and r > 1 those across it, as needles do. Free (per-peak) heights instead let every reflection's intensity move on its own: they fit anything, but trade off with the phase's scale.

Mixtures: one scale per phase

11.522.533.544.555.56q (Å⁻¹)Intensitytheir sum, what is fittedeach phase's pattern × its scale
CsCl, scale 1NaCl, scale 0.6 their sum, what is fitted (drawn above)
A sample with several phases scatters as the sum of their patterns, and Phase Analysis fits one scale per phase together with its lattice, widths and background. Each phase's computed intensities are normalized to its strongest admitted reflection across the full finite trace, even when the solve uses a narrower dragged range. A phase's scale multiplies those relative intensities; the profile and texture determine the resulting peak areas. The fraction Phase Analysis reports is each scale over the sum of scales: CsCl at scale 1 and NaCl at 0.6 give 0.625 and 0.375. That compares how strongly each phase diffracts. It is not a weight fraction, which would also need each phase's scattering power per unit mass and the sample's absorption; Phase Analysis does not apply that conversion. A lattice phase has no structural intensities, so fractions are withheld when one is fitted.

From fit to physics

Fitted valueWhat it measuresRead it as
a, b, cthe unit cellstrain or thermal expansion against a reference; in a solid solution, composition through Vegard's law
Fractioneach phase's scale over the sum of scalescompare only with comparable profiles, reflection windows and texture constraints. Free per-peak heights can trade against scale; a growing share alone does not establish phase growth
q_shiftone shift of every reflectiona sample-height or calibration offset; pinned at its bound, the bound is too tight or the calibration is off
D and εScherrer's crystallite size and microstrainsmall D: nanocrystals; large ε: defects or local strain fields
U, V, WCaglioti's width curvethe instrument's resolution, when fitted on a standard
March-Dollase rpreferred orientation along the texture axisnear 1: little texture; far from 1: strong texture
substrate amplitudethe measured substrate pattern's scalehow much substrate scattering the sample shows
amorphous peaka broad hump's centre and widthnon-crystalline material, such as a glass near 1.55 Å⁻¹
How Phase Analysis fits

What a fit computes

Structurethe CIF's cell, space groupand atoms Reflectionsq = 2π/d from the cell; I from|F|², multiplicity and Lorentz-pol. Scale, textureone scale per phase, timesMarch-Dollase or free heights Peak shapea profile whose width σ(q) isCaglioti, Scherrer or fixed Backgroundfitted, substrate and amorphous,added under the phases Refined together against the data in the fit range: each lattice within Lattice ±%, one q-shift, the scales, the widths, the texture and the background.
The model is built in this order for every phase, and the phases' patterns are added. A lattice phase (cell and space group only) gives positions without intensities, so it always fits free heights; a built-in calibrant, listed under Reference lines (not fitted), is drawn as reference lines and never fitted.

The phase list

Background: what is not crystalline

Constraints and the solver

Batches, settings and notebooks