Skip to content

From measurement to analysis

EasyDiffraction compares a crystallographic model with diffraction measurements. Understanding where that comparison begins helps you choose suitable inputs and recognise what a fit can establish.

Acquisition, reduction and analysis

  1. Acquisition
  2. Reduction
  3. Analysis

Acquisition

Record the detector response while the sample scatters the incident beam. This example uses a two-dimensional detector.

Beam, sample and detector: the three cones are the (100) and (001) magnetic and the (221) nuclear reflections of Co₂SiO₄ at λ = 1.87 Å
A beam from the source passes a slit to a powder sample, which scatters it into Debye–Scherrer cones at the measured 2θ of three Co₂SiO₄ reflections; each cone leaves a ring on a flat area detectorA beam from the source passes a slit to a powder sample, which scatters it into Debye–Scherrer cones at the measured 2θ of three Co₂SiO₄ reflections; each cone leaves a ring on a flat area detector
Raw detector image, computed from the D20 pattern measured at 2.3 K
Rings on a flat area detector computed from the Co₂SiO₄ powder pattern measured on D20 at 2.3 K, with the (001) and (100) magnetic and the (221) nuclear rings labelledRings on a flat area detector computed from the Co₂SiO₄ powder pattern measured on D20 at 2.3 K, with the (001) and (100) magnetic and the (221) nuclear rings labelled

Reduction

Apply the relevant corrections and turn detector measurements into observations with uncertainties. For powder diffraction, these are often a one-dimensional intensity profile.

Reduced diffraction pattern of Co₂SiO₄ at 2.3 K
The measured neutron powder pattern of Co₂SiO₄ at 2.3 K from D20, intensity against 2θ, as EasyDiffraction draws itThe measured neutron powder pattern of Co₂SiO₄ at 2.3 K from D20, intensity against 2θ, as EasyDiffraction draws it

Analysis

Compare a calculated pattern with the observations, fit the model and inspect the result. EasyDiffraction focuses on this stage.

Measured, calculated and residual patterns of Co₂SiO₄ at 2.3 K
The Co₂SiO₄ pattern at 2.3 K fitted in EasyDiffraction: measured and calculated intensities with the background, Bragg ticks of the nuclear and the magnetic phase, and the residual belowThe Co₂SiO₄ pattern at 2.3 K fitted in EasyDiffraction: measured and calculated intensities with the background, Bragg ticks of the nuclear and the magnetic phase, and the residual below
Magnetic structure model of Co₂SiO₄
The Co₂SiO₄ unit cell in the EasyDiffraction structure view: cobalt, silicon and oxygen atoms with bonds, arrows for the magnetic moments on the cobalt atoms, and the atom legendThe Co₂SiO₄ unit cell in the EasyDiffraction structure view: cobalt, silicon and oxygen atoms with bonds, arrows for the magnetic moments on the cobalt atoms, and the atom legend
Illustration credits

Every figure on this page shows EasyDiffraction's Co₂SiO₄ example: neutron powder data at 2.3 K from D20 at the ILL. The instrument is drawn from that geometry; the raw detector image is computed from the measured pattern; the reduced pattern, the fitted pattern and the structure model are rendered by EasyDiffraction itself.

Keep the reduction history and experimental context with the project: they affect how uncertainties and agreement factors should be interpreted.

A model of the sample and the experiment

The calculated intensity depends on more than atom positions. EasyDiffraction separates the model into two connected parts:

Part Describes Examples
Structure The crystalline sample Unit cell, symmetry, atom sites, occupancies, displacement parameters
Experiment How it is observed Wavelength or time-of-flight calibration, peak profile, background, scale and excluded regions

A disagreement between measured and calculated patterns can therefore have several causes. A peak-position error may come from the cell or calibration; a broad mismatch underneath peaks may come from the background; an intensity mismatch can involve the structure as well as experiment settings.

Calculation and fitting

  1. Structure + experiment
  2. Calculated pattern
  3. Compare with observations

A calculation predicts the diffraction pattern from the current structure and experiment. It does not need measured intensities. Use it to inspect peak positions and the influence of the model before fitting.

A fit needs observations to compare against. A least-squares fit reduces the weighted difference between observations and calculations: it changes the parameters marked as free, while fixed parameters still contribute to the calculated pattern. The starting model, free-parameter set, constraints, excluded regions and minimizer conditions all influence the result.

Start from a physically meaningful model. Inspect the initial pattern, allow parameters to vary deliberately, and review the result after each meaningful change. Adding more free parameters may reduce a residual without making the model more informative.

What a fit needs from you

EasyDiffraction fits a model you provide. Its values may be off, but its symmetry and composition must be right: the space group, the atoms in the cell and, for a magnetic structure, the magnetic space group or propagation vector. Its starting values, such as the cell, the atom positions and the scale, must be reasonable, so that the calculated pattern already resembles the measured one. A fit then moves those values towards the observations.

EasyDiffraction has no tools to find a model from the data: no structure solution and no propagation-vector search. Take the starting model from a database entry, a related compound or a structure-solution program, and load it as a CIF.

Least squares and Bayesian analysis

Both compare a model with observations, but summarise parameter uncertainty differently.

Approach What it reports
Least squares A best-fit parameter set and, when the covariance can be estimated, standard uncertainties and correlations
Bayesian sampling A posterior distribution combining a likelihood with prior information, from which credible intervals and correlations can be summarised

The fitting instructions in this documentation use least squares. Its objective and covariance conventions explain the reported uncertainties. Bayesian sampling is a separate workflow; the older library's sampler choices should not be assumed to be available in this application.

Interpreting the result

Convergence describes how the optimisation ended. It does not by itself establish that the sample model is correct or that all uncertainty sources have been captured.

Inspect the observed and calculated pattern, the residual, parameter uncertainties and correlations, and the physical plausibility of the result. Fit quality explains these checks in more detail.

The same ideas in every interface

The app makes these relationships visible. Python lets you express them in a script or notebook. The Command line runs the analysis already declared by a saved project. All use the same project model.