skip to primary navigationskip to content



a non-linear least squares cell refinement program with regression diagnostics

UnitCell is a program which runs on Macintosh computers and under Windows. It refines cell parameters from powder diffraction data. Unlike most existing cell refinement programs it does not require initial estimates for cell constants; it uses a non-linear least squares method, which allows the refinement to be carried out on the actual observed data (e.g. two- theta in the case of angle-dispersive monochromatic diffraction, energy in the case of energy-dispersive diffraction). Furthermore, the program incorporates regression diagnostics, particularly deletion diagnostics, to aid in the detection of outliers and influential data which could be deleterious to the regressed results. These diagnostic tools are particularly valuable in assessing the sensitivity of the calculated results to the observations of individual Bragg peaks.

The method and implementation are described in the following paper:

T J B Holland and S A T Redfern (1997) "Unit cell refinement from powder diffraction data: the use of regression diagnostics". Mineralogical Magazine 61: 65-77.


UnitCell provides a graphical interface by which various options and modes of operation may be easily selected, with data input via standard text files.

Earlier versions of the program used unweighted least squares, generating uncertainties from the residuals in the data. However, when the reflections had 2thetas which happened to match the calculated results too well, the resulting cell parameter uncertainties were unreasonably small. This can also happen when there are too few indexed reflections. So a minimum error on 2theta is now assumed. If the user judges that this is too small he/she can scale the errors directly (see info file). It is now the user's responsibility to manage the uncertainties.

The program now weights each hkl reflection, so that regressing with 2theta, energy, d-spacing or Q gives essentially the same result. However, a minimum default uncertainty of sigma(2theta) = 0.005 deg is now assumed as the weighting. This value is transformed into energy, dspacing or Q for regressions involving minimising those quantities.

The executables, sample input files, and an info file explaining the use of the program and the deletion diagnostics are available here:

download: mac OSX version

download: Windows version (64-bit version also available)

download: Linux version 

File:  UnitCell_Info.rtf

File:  UnitCell_Info.txt

RSS Feed Latest news

International team head to Papua New Guinea to measure volcanic carbon degassing

Sep 01, 2016

An international team of scientists is traveling to the islands of Papua New Guinea this September to study degassing from active volcanoes in remote jungles there. Some of these volcanoes are among the most active on Earth, ejecting a significant proportion of global volcanic gases into the atmosphere.

Mistaken Point - Canada's 10th geological World Heritage Site

Aug 02, 2016

The ancient rugged coastline of Mistaken Point on Newfoundland’s Avalon Peninsula face the winds and waves of the Atlantic Ocean. It can be a difficult place to work, but nevertheless it has been a mecca for geologists for over several decades now.

An underestimated Kevan

Jul 21, 2016

Douglas Palmer on the Sedgwick Museum’s giant Pliosaurus cf. kevani in the latest edition of Geoscientist

Oesia – a new tube worm from deep Cambrian times

Jul 21, 2016

Collections up close, Sedgwick Museum of Earth Sciences

View all news

Stories from the field...