refnx: neutron and X-ray reflectometry analysis in Python

Journal of Applied Crystallography - Tập 52 Số 1 - Trang 193-200 - 2019
Andrew Nelson1, Stuart W. Prescott2
1ANSTO, Locked Bag 2001 Kirrawee DC NSW, 2232, Australia
2School of Chemical Engineering, University of New South Wales, Sydney, NSW 2052, Australia

Tóm tắt

refnxis a model-based neutron and X-ray reflectometry data analysis package written in Python. It is cross platform and has been tested on Linux, macOS and Windows. Its graphical user interface is browser based, through aJupyternotebook. Model construction is modular, being composed from a series of components that each describe a subset of the interface, parameterized in terms of physically relevant parameters (volume fraction of a polymer, lipid area per moleculeetc.). The model and data are used to create an objective, which is used to calculate the residuals, log-likelihood and log-prior probabilities of the system. Objectives are combined to perform co-refinement of multiple data sets and mixed-area models. Prior knowledge of parameter values is encoded as probability distribution functions or bounds on all parameters in the system. Additional prior probability terms can be defined for sets of components, over and above those available from the parameters alone. Algebraic parameter constraints are available. The software offers a choice of fitting approaches, including least-squares (global and gradient-based optimizers) and a Bayesian approach using a Markov-chain Monte Carlo algorithm to investigate the posterior distribution of the model parameters. The Bayesian approach is useful for examining parameter covariances, model selection and variability in the resulting scattering length density profiles. The package is designed to facilitate reproducible research; its use inJupyternotebooks, and subsequent distribution of those notebooks as supporting information, permits straightforward reproduction of analyses.

Từ khóa


Tài liệu tham khảo

Björck, 2007, J. Appl. Cryst., 40, 1174, 10.1107/S0021889807045086

Campbell, 2018, J. Colloid Interface Sci., 531, 98, 10.1016/j.jcis.2018.07.022

Chirigati, 2013, IEEE Data Eng. Bull., 36(4), 54

Continuum Analytics. (2017). Conda - Package, Dependency and Environment Management for any Language, https://conda.io/docs/.

Daillant, J. & Gibaud, A. (2009). Editors. X-ray and Neutron Reflectivity: Principles and Applications, Lecture Notes in Physics, Vol. 770. Heidelberg: Springer Verlag.

Foreman-Mackey, D. (2016). J. Open Source Software, 1(2), 24.

Foreman-Mackey, 2013, Publ. Astron. Soc. Pac., 125, 306, 10.1086/670067

Gerelli, 2016, J. Appl. Cryst., 49, 330, 10.1107/S1600576716000108

Heavens, O. (1955). Optical Properties of Thin Films. London: Butterworth.

Heinrich, 2009, Langmuir, 25, 4219, 10.1021/la8033275

Helliwell, 2017, IUCrJ, 4, 714, 10.1107/S2052252517013690

Hogg, D. W., Bovy, J. & Lang, D. (2010). ArXiv e-prints. arXiv: 1008.4686.

Hughes, 2016, Acta Cryst. D, 72, 1227, 10.1107/S2059798316016235

Jones, E., Oliphant, T., Peterson, P. et al. (2001). SciPy: Open Source Scientific Tools for Python, http://www.scipy.org/.

Kienzle, P. A., Krycka, J., Patel, N. & Sahin, I. (2011). Refl1d - Depth Profile Modelling, http://reflectometry.org/danse/docs/refl1d/.

Kluyver, T., Ragan-Kelley, B., Pérez, F., Granger, B., Bussonnier, M., Frederic, J., Kelley, K., Hamrick, J., Grout, J., Corlay, S., Ivanov, P., Avila, D., Abdalla, S. & Willing, C. (2016). Positioning and Power in Academic Publishing: Players, Agents and Agendas, edited by F. Loizides & B. Schmidt, pp. 87-90. Amsterdam: IOS Press.

Majkrzak, 1999, Acta Phys. Pol. A, 96, 81, 10.12693/APhysPolA.96.81

Millman, K. J. & Pérez, F. (2014). Implementing Reproducible Research, edited by V. Stodden, F. Leisch & R. D. Peng, ch. 6. London: Chapman & Hall.

Möller, 2017, Data Sci. Eng., 2, 232, 10.1007/s41019-017-0050-4

Nelson, 2006, J. Appl. Cryst., 39, 273, 10.1107/S0021889806005073

Nelson, 2014, J. Appl. Cryst., 47, 1162, 10.1107/S1600576714009595

Nelson, A. & Prescott, S. W. (2018a). Online Reflectivity Fitting with refnx, https://mybinder.org/v2/gh/refnx/refnx-binder.git/master.

Nelson, A. & Prescott, S. W. (2018b). refnx - Neutron and X-ray Reflectometry Analysis in Python, https://www.github.com/refnx/refnx.

Névot, 1980, Rev. Phys. Appl., 15, 761, 10.1051/rphysap:01980001503076100

Pauw, 2013, J. Phys. Cond. Matter, 25, 383201, 10.1088/0953-8984/25/38/383201

Project Jupyter Contributors. (2015). ipywidgets, https://github.com/jupyter-widgets/ipywidgets.

Sivia, D. & Skilling, J. (2006). Data Analysis: A Bayesian Tutorial. Oxford Science Publications.

Stark, 2018, Nature, 557, 613, 10.1038/d41586-018-05256-0

Trewhella, 2017, Acta Cryst. D, 73, 710, 10.1107/S2059798317011597

Vousden, 2016, Mon. Not. R. Astron. Soc., 455, 1919, 10.1093/mnras/stv2422

Well, 2005, Physica B, 357, 204, 10.1016/j.physb.2004.11.058

Wood, 2017, Metals, 7, 304, 10.3390/met7080304