---
name: rietveld-qpa-gsas-ii
description: "Estimate mass fractions of known crystalline phases from a powder diffraction pattern and their structural models. Index entry for the external GSAS-II project with links to its reviewed refinement and mass-fraction guides."
---

# Quantitative phase analysis with GSAS-II

> **Index entry.** An external project maintained by the Advanced Photon Source GSAS-II team, indexed by fhat from public sources. Authors have not reviewed this entry. Follow the official guides below. Reviewed at commit 24d8cd2. Authors can request corrections or removal at contact@fhat.dev.

## What it does

- GSAS-II performs Rietveld refinement of laboratory and synchrotron X-ray powder diffraction data. [GSAS-II overview](https://github.com/AdvancedPhotonSource/GSAS-II/blob/24d8cd299ac8bcee6d6125473688db6ceceaa2fe/README.md#summary)
- The scripting interface reports mass fractions by phase for a powder histogram. Its mass-fraction routine also reports standard uncertainties from the last refinement when fractions were refined. [Mass-fraction routine](https://github.com/AdvancedPhotonSource/GSAS-II/blob/24d8cd299ac8bcee6d6125473688db6ceceaa2fe/GSASII/GSASIIscriptable.py#L4637-L4667)

## When to use

- Use whole-pattern refinement to estimate the proportions of crystalline components when suitable structural models are available for the identified phases. [Bish and Howard](https://doi.org/10.1107/S0021889887009415)
- Use the laboratory X-ray example to review how to load the powder histogram, instrument parameters, and a phase model before setting up refinement. [Laboratory powder refinement example](https://github.com/AdvancedPhotonSource/GSAS-II/blob/24d8cd299ac8bcee6d6125473688db6ceceaa2fe/demos/LabData_tutorial.py)

## When not to use

- Obtain structural models before using this Rietveld workflow to quantify phases from the measured pattern. Its phase-specific calculated profiles rely on crystalline structural models. [Bish and Howard](https://doi.org/10.1107/S0021889887009415)

## Key cautions

- Interpret ordinary Rietveld mass fractions relative to the modeled crystalline phases. Bish and Howard describe using an internal standard to estimate the total amorphous content. [Bish and Howard](https://doi.org/10.1107/S0021889887009415)
- Investigate refinement constraint errors before quoting standard uncertainties. The mass-fraction routine explicitly warns that such errors can invalidate those uncertainties. [Constraint check](https://github.com/AdvancedPhotonSource/GSAS-II/blob/24d8cd299ac8bcee6d6125473688db6ceceaa2fe/GSASII/GSASIIscriptable.py#L4647-L4650)

## Official guides

- [GSAS-II README](https://github.com/AdvancedPhotonSource/GSAS-II/blob/24d8cd299ac8bcee6d6125473688db6ceceaa2fe/README.md) introduces the software and points to its official documentation.
- [Scripting interface](https://github.com/AdvancedPhotonSource/GSAS-II/blob/24d8cd299ac8bcee6d6125473688db6ceceaa2fe/docs/source/GSASIIscriptable.rst) covers powder histograms, phase models, and refinements.
- [Laboratory powder refinement example](https://github.com/AdvancedPhotonSource/GSAS-II/blob/24d8cd299ac8bcee6d6125473688db6ceceaa2fe/demos/LabData_tutorial.py) illustrates the setup of a laboratory X-ray refinement.

## Sources

- Bish and Howard (1988), quantitative phase analysis by Rietveld refinement. [Paper](https://doi.org/10.1107/S0021889887009415)
- Toby and Von Dreele (2013), GSAS-II. [Paper](https://doi.org/10.1107/S0021889813003531)
- [Reviewed GSAS-II commit](https://github.com/AdvancedPhotonSource/GSAS-II/tree/24d8cd299ac8bcee6d6125473688db6ceceaa2fe) and [upstream license](https://github.com/AdvancedPhotonSource/GSAS-II/blob/24d8cd299ac8bcee6d6125473688db6ceceaa2fe/LICENSE).
