Tutorial notebooks#

The tutorials are 7 executed notebooks that fit a laboratory pattern and synthetic ones in Python. Each runs in under a minute, and the data ships inside the package. Read a notebook here with its outputs, or download it and run it yourself. Its first code cell installs rietx.

The notebooks show rietx’s moves one step a cell, for readers who already know the Rietveld method. A first fit in Python covers the same ground as a script, on a synchrotron pattern with an impurity phase.

Notebook

What it teaches

Download

Quickstart: look at a pattern, then fit it with Le Bail

Look at a pattern, check a model against it, fit the cell and peak shapes with Le Bail, and read the summary in order

01_quickstart.ipynb

A simple Rietveld refinement

A staged Rietveld refinement, the parameter table, bond lengths, the refined structure drawn, and a project

02_simple_rietveld.ipynb

Steering a refinement

Tying three atoms’ Biso, two parameters the data cannot separate, going back in the history and holding one, and the verdict for a structure

02b_steering_a_refinement.ipynb

Peaks, indexing and a Le Bail check

Picking peaks, indexing with a narrowed search, when the indexer names a cell, and checking a candidate cell with Le Bail

03_peaks_indexing_lebail.ipynb

Peak shape and microstructure

Calibrating an instrument on a standard, then measuring crystallite size and strain against a known truth

04_peak_shape_and_microstructure.ipynb

Sequential fits

Fitting a heating ramp pattern by pattern, a parameter’s trajectory, and what the series reports when one frame fails

05_sequential_fits.ipynb

A Rietveld refinement on your own data

A template for your own pattern and CIFs: change the marked cells and run it top to bottom

06_your_own_data.ipynb

Notebooks 01 and 02 fit fluorapatite from the GSAS-II LabData tutorial, a laboratory Cu Kα pattern. Notebooks 03 to 05 build their patterns in the notebook, so each fit can be checked against the values it was built from. Notebook 06 is a template rather than a tutorial, committed without outputs. It runs on the fluorapatite files as shipped, and you replace them with your own.