Skip to main content
U.S. flag

An official website of the United States government

Official websites use .gov
A .gov website belongs to an official government organization in the United States.

Secure .gov websites use HTTPS
A lock ( ) or https:// means you’ve safely connected to the .gov website. Share sensitive information only on official, secure websites.

Bayesian inference in neutron and x-ray reflectometry analysis

Andrew R. McCluskey1,2

1. Diamond Light Source, Rutherford Appleton Laboratory, Harwell Science and Innovation Campus, Didcot, OX11 0DE, United Kingdom
2. Department of Chemistry, University of Bath, Claverton Down, Bath, BA2 7AY, United Kingdom

Modern neutron and x-ray reflectometry analyses focus heavily on the use of model-dependent approaches, where some analytical model is used to understand the given experimental data. These models typically utilise the Abelès [1] or Parratt [2] recursive methods for the calculation of a reflectometry profile from a series of layers, where the layers typically encompass some underlying chemical information (such as the reformulation of molecular volume to scattering length density in lipid systems [3]). The use of such model-dependent methods allows for the application of a large suite of data-analysis tools, including Bayesian inference which is regularly applied to astronomical model-dependent analysis problems [4].

The use of Bayesian inference in the analysis of neutron reflectometry was led by the early work of Sivia and co-workers [5-8], applying maximum entropy methods and (a reduced space) Bayesian model selection. However, recent advances in computational power have enabled the full capability of Bayesian data-analysis to be applied, allowing for the inclusion of Markov chain Monte Carlo posterior distribution sampling in popular reflectometry analysis packages [9-11] and the use of nested sampling for a complete Bayesian model selection [12,13]. This tutorial will introduce the use of Bayesian inference in the context of neutron reflectometry analysis, in a software agnostic fashion, covering prior probabilities definition, posterior sampling, and Bayesian evidence estimation. Then you will be given the opportunity to work through a structured problem that uses these methods yourself, in a common, open-source analysis package; such as refnx [9] or Refl1d[11].

1. F. Abelès, Ann. Phys., 12(3):504, 1948. doi: 10.1051/anphys/194812030504.
2. L. G. Parratt, Phys. Rev., 95(2):359, 1954. doi: 10.1103/PhysRev.95.359.
3. L. A. Clifton, et al., In: Kleinschmidt J. (eds) Lipids-Protein Interactions. Methods in Molecular Biology, vol 2003. Humana, New York, USA, 2019. doi: 10.1007/978-1-4939-9512-7_11.
4. B. J. Brewer, et al., Astron. J., 146(1):7, 2013. doi: 10.1088/0004-6256/146/1/7.
5. D. S. Sivia, et al., Physica B., 173(1-2):121, 1991. doi: 10.1016/0921-4526(91)90042-D.
6. D. S. Sivia, et al., Physica D., 66(1-2):234, 1993. doi: 10.1016/0167-2789(93)90241-R.
7. M. Geoghagen, et al., Phys. Rev. E, 53(1):825, 1996. doi: 10.1103/PhysRevE.53.825.
8. D. S. Sivia and J. R. P. Webster, Physica B., 248(1-4):327, 1998. doi: 10.1016/S0921-4526(98)00259-2.
9. A. R. J. Nelson and S. W. Prescott, J. Appl. Crystallogr., 52(1):193, 2019. doi: 10.1107/S1600576718017296.
10. A. V. Hughes, “RasCAL2019”,, 2019, accessed: 2020-04-01.
11. P. A. Kienzle, et al., “Refl1D”,, 2020, accessed: 2020-04-01.
12. A. V. Hughes, et al., Biophys. J., 116(6):1095, 2019. doi: 10.1016/j.bpj.2019.02.001.
13. A. R. McCluskey, et al., arXiv:1910.10581, 2020.

Created April 3, 2020, Updated April 13, 2020