Page tree


1. GenX - neutron and x-ray reflectometry and grazing-incidence small-angle scattering

GenX is a versatile program using the differential evolution algorithm for fitting, primarily, X-ray and neutron reflectivity data, lately also surface x-ray diffraction data [1].  The differential evolution algorithm is a robust optimization method which avoids local minima but at same is a highly effective. GenX is written in python and uses the wxpython package for the Graphical User Interface (GUI) Screenshot. A model to fit is defined either through a GUI plug-in or via a python script. The possibility to script everything makes it easy to develop completely new fitting model. Clearly, GenX is extremely modular, making it possible to extend the program with models and plug-ins for most fitting problems. At the present GenX is shipped with models for x-ray and neutron specular reflectivity, off-specular x-ray reflectivity and surface x-ray diffraction. A detailed description, of a older version, has been published in [2]. The program can be downloaded by clicking on the link on the left hand side.


[1] GenX- Home

[2] Bjorck, M. & Andersson, G.; GenX: an extensible X-ray reflectivity refinement program utilizing differential evolution, (2007). J. Appl. Cryst. 40, 1174-1178.

2. BornAgain - neutron and x-ray reflectometry and grazing-incidence small-angle scattering

BornAgain - open-source research software to simulate and fit neutron and x-ray reflectometry and grazing-incidence small-angle scattering. Its name, BornAgain, alludes to the central role of the distorted-wave Born approximation in the physical description of the scattering process. The software provides a generic framework for modeling multilayer samples with smooth or rough interfaces and with various types of embedded nanoparticles.

BornAgain is supported under Windows, Mac OS X and Linux operating systems. For Windows and MacOS we provide binary installer packages, both for Python2 and Python3. For Unix-like operating systems (including Linux and Mac OS X) we support installation from source.


[1] BornAgain - Home

[2] BornAgain: software for simulating and fitting grazing-incidence small-angle scattering, J. Appl. Cryst. (2020). 53, 262-276,

Real time view

Real space viewer

3. REFLEX - a program for X-rays and Neutron reflectivity data analysis

A program entitled REFLEX, which is a user-friendly freeware program working under Windows and Linux platforms. The program should be of great interest to the scientific community dealing with the calculation of absolute neutron and X-ray reflectivity curves. In the case of X-rays, s and p polarized waves are included, with the objective of providing reliable calculation of X-ray reflectivity curves in the soft region of the X-ray spectrum. For hard X-rays, the default calculation is made in s polarization. In addition, REFLEX can take into account any type of fluid in contact with the top surface of the film. This option is likely to be of particular interest to researchers whose work involves complex environments such as fluids under pressure. Fitting routines are implemented to provide the electron-density profile or scattering-length-density profile of the studied material. [1.]

Reflex is a standalone software dedicated to the simulation and analysis of X-rays and neutron reflectiity from multilayers (implemented under Matlab but it does not need Matlab to work). The frequent use of X-rays measurements by our group has motivated the development of such a tool. Reflex is not distributed with a profit-making objective but in order to share our experience in X-rays data analysis.


[1] Vignaud, G. & Gibaud, A.; REFLEX: a program for the analysis of specular X-ray and neutron reflectivity data, (2019). J. Appl. Cryst. 52, 201-213.

 [2] REFLEX - Home

4. refnx - neutron and X-ray reflectometry analysis in Python

refnx is 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 a Jupyter notebook. 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 molecule etc.). 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 in Jupyter notebooks, and subsequent distribution of those notebooks as supporting information, permits straightforward reproduction of analyses.


[1] Nelson, A. R. J. & Prescott, S. W., refnx: neutron and X-ray reflectometry analysis in Python, (2019). J. Appl. Cryst. 52, 193-200.

5. GIDVis - a modular MATLAB program to analyze grazing incidence diffraction images

GIDVis is a software package based on MATLAB specialized for, but not limited to, the visualization and analysis of grazing-incidence thin-film X-ray diffraction data obtained during sample rotation around the surface normal. GIDVis allows the user to perform detector calibration, data stitching, intensity corrections, standard data evaluation (e.g. cuts and integrations along specific reciprocal-space directions), crystal phase analysis etc. To take full advantage of the measured data in the case of sample rotation, pole figures can easily be calculated from the experimental data for any value of the scattering angle covered. [1]

GIDVis is based on MATLAB and released under the terms of the GNU General Public Licence, either version 3 of the licence or any later version. It can be obtained at [2] free of charge. Two download options are provided. (i) For users without MATLAB, executable files for Windows and Linux are provided. To run, they require the MATLAB runtime, which can be downloaded from The Mathworks Inc. [3] free of charge. (ii) The GIDVis source code is also provided in our online repository, allowing users to adapt the program to their needs (requires MATLAB).


[1] Schrode, B., Pachmajer, S., Dohr, M., Rothel, C., Domke, J., Fritz, T., Resel, R. & Werzer, O., GIDVis: a comprehensive software tool for geometry-independent grazing-incidence X-ray diffraction data analysis and pole-figure calculations, (2019). J. Appl. Cryst. 52, 683-689.

[2] GIDVis - Home


6. GIXSGUI a MATLAB toolbox for grazing-incidence X-ray scattering data visualization and reduction, and indexing of buried three-dimensional periodic nanostructured films

GIXSGUI is a MATLAB toolbox that offers both a graphical user interface and script-based access to visualize and process grazing-incidence X-ray scattering data from nanostructures on surfaces and in thin films. It provides routine surface scattering data reduction methods such as geometric correction, one-dimensional intensity linecut, two-dimensional intensity reshaping etc. Three-dimensional indexing is also implemented to determine the space group and lattice parameters of buried organized nanoscopic structures in supported thin films.


[1] Z. Jiang, GIXSGUI: a MATLAB toolbox for grazing-incidence X-ray scattering data visualization and reduction, and indexing of buried three-dimensional periodic nanostructured films, J. Appl. Cryst. (2015). 48, 917-926,

[2] GIXSGUI - Home


 (a) GIXSGUI windows                                                           (b) How to start

Azimutal cut in GIXSGUI:

7. XRD2DScan software

A software tool for polycrystalline materials characterization using two-dimensional x-ray diffraction

XRD2DScan is a Windows software tool for displaying and analyzing two-dimensional (2D) X-ray diffraction patterns or frames collected using a diffractometer equipped with a 2D or area detector (Image plate, CCD, Multy-wire). Two-dimensional diffraction patterns contains a wealth of information regarding the mineralogical composition and microstructure of polycrystalline materials. It can be used for quick mineral phase identification and microstructure (preferential orientation, pole figures, grain size and stress) analyses.


[1] -

Main interface displaying a 2D pattern of a LaB6 powder sample and the calculated powder diffractogram. It also displays the mineral identification tool.

Pole figure tool

  • No labels