ANSTO's research capabilities, led by the OPAL nuclear research reactor and associated instruments provide access to users investigating areas as diverse as materials, life sciences, climate change and mining/engineering.
MOTOFIT: Simultaneous fitting of multiple contrast neutron and X-ray reflectivity data
Andrew Nelson (ANSTO)
Motofit is a set of functions that aid the least squares fitting of specular X-ray and neutron reflectivity data. The program interface has been designed for the novice user, although the functionality will meet most of an advanced users needs.
The inbuilt (user expandable) scattering length density database allows quick initialisation of models, without having to remember specific values.
![]() |
Figure 1. The Motofit interface: the control panel is shown at the bottom, with the graphical output above it.
The system is modeled with a set of slabs, or boxes, from which the reflectivity is calculated using Parratts [1] recursion formula. Simple interfacial roughness effects are accounted for with the treatment of Nevot and Croce [2].
Simultaneous fitting of multiple contrast neutron and reflectometry data is the most important feature of Motofit. The user can load in multiple contrast neutron and X-ray reflectivity data, define which model parameters are equivalent for each contrast (e.g. thickness), then fit all the data simultaneously. Figure 2 shows an example of the output produced.
The user has a choice of the Levenberg-Marquardt or simulated annealing in the refinement process. Levenberg Marquardt quickly finds c2 minima, but simulated annealing is more able to find global minima.
![]() |
Figure 2. Example of simultaneous fitting. Measurements on a plasma polymer sample in D2O, cm4 (red) and H2O (blue).
The user can easily modify the appearance of the graph to suit their requirements.
The user can implement complicated inter-parameter constraints, using a simple syntax. For example you can fix a parameter in a set range, or make fix it to the value of another parameter.
It is possible to fit multilayers with this program, Figure 3 shows the reflectivity from 25 repeats of a Ni (117?) /Ti (80?) multilayer on float glass.
![]() |
Figure 3. Neutron data from a Ni/Ti multilayer
Other important features include the ability to:
- Fit as log R vs Q, RQ4 vs Q or R vs Q.
- Fit to normalised Fresnel Reflectivities.
- Export Publication quality graphs, with no further manipulation required.
- Estimate layer thicknesses from Fourier transform of datasets.
- Estimate layer thicknesses from fringe spacing.
- Supports future development of user defined scattering length density profiles.
- Fits as many layers as you like (or can fit on the screen).
There are two versions of the software. The first allows the user to account for subphase (solvent) penetration in a layer. This is very useful when has multiple contrasts and one wishes to deconvolute the amount of solvent penetration from the SLD of the layer. The second version allows the user to enter the imaginary part of the SLD. In reflectometry this accounts for absorption effects and is essential for analysing X-ray data.
The program works within the analysis package IGOR Pro (Wavemetrics, OR). Although IGOR is a commercial program, Motofit also works within the demo version available from the Wavemetrics website.
Motofit is freely distributed under the GPL license and is available to download from http://motofit.sourceforge.net/. Users of the program are encouraged to give feedback that will help with development, or submit improved code.
[1] Parratt, L. G. Phys. Rev. 1954, 95, 359-369.
[2] Nevot, L.; Croce, P. Revue de physique appliquee 1980, 15, 761-769.



