PowderLine#
PowderLine turns a complete powder diffraction refinement into structured data: a recipe that people, scripts and machines can write, check, run and chain.
Rietveld refinement is powerful, but reliable results take expertise in a particular program. Running it at scale has usually meant custom code for each project. PowderLine gives every refinement the same kind of validated, machine-writable description: a recipe, written for one engine in that engine’s own terms. The same analysis can then be run from a GUI, a notebook, a beamline pipeline, an autonomous experiment or an LLM agent, and it gives the same result.
PowderLine handles constant-wavelength X-ray powder data on a 2θ axis. Scope and limitations lists what it does not do.
The idea in one picture#
flowchart LR
IN["Your data and model<br/>from files, databases<br/>or a live stream"] --> R
R["<b>Recipe</b><br/>structured · versioned<br/>+ your metadata"] --> V{{Validate}}
V -- "errors, each with its fix" --> R
V --> RUN{{"Run in<br/>GSAS-II · TOPAS<br/>easydiffraction"}}
RUN --> RES["<b>Results</b><br/>tables · uniform Rwp<br/>provenance"]
RES --> OUT["Plots, databases,<br/>the next decision"]
RES -- "output recipe" --> R
The recipe holds the data, the structural model, the instrument, the refine flags and any metadata you attach. It is a dictionary in Python and JSON when stored or sent.
Validation checks the recipe against a versioned schema and against the crystallography before anything runs. It needs no engine installed.
The engines do the refinement. PowderLine drives them; it does not replace them.
The results are the same structured tables for every engine, with provenance linking them to the recipe and your metadata. They include an output recipe, ready to be the next step’s input.
→ How PowderLine works explains each step. The preprint gives the full motivation.
Where to start#
Run a complete refinement in a few minutes, then write a recipe for your own data.
Calibrate once, analyze every sample, chain a series, and run unattended.
Calibrate the instrument → · Run a series → · Run at a beamline →
Call PowderLine from Python, validate recipes without an engine, handle failures, and carry metadata through.
What PowderLine does with each engine, every behavior it found, and how the engines compare on the same data.
How the code is organized, how to test it, and how to add an engine.
What PowderLine is (and isn’t)#
PowderLine is |
PowderLine is not |
|---|---|
One validated, machine-writable description of a refinement |
A new refinement algorithm: the engines do the math |
A strict checker of form and symmetry |
A judge of your refinement choices: see Good refinement practice |
One interface and one result format for three engines |
A translator: a GSAS-II recipe stays a GSAS-II recipe |
A component you plug into larger workflows |
A CIF reader or recipe builder: your tools write the recipe |