When fitting PNR data, the objective is to find a physically reasonable model that well-represents the structural and magnetic depth profiles of the thin film or multilayer being probed. In order to do this, Refl1D represents the sample as a series of slabs with fittable parameters such as thickness, interface roughness, or nuclear and magnetic scattering length density. In the simplest cases, each layer of the film may be represented as a single layer with constant SLDs as shown in the example below.
In contrast to this basic case, it is true the case that features exist in the depth profile which are not account for so simply. Magnetically dead layers may develop, drift may occurs during film depositions, or interfacial intermixing may give rise to an alloyed layer at the interface. In all of these examples, it may be necessary to represent a layer which was intended to be nominally uniform as more than one slab layer in Refl1D. It is also possible for the physics of a thin film structure to require more complex shapes, and in these advanced cases Refl1D supports features such as functional forms for SLD profiles or the fitting of the depth profile through a series of control points connected by spline functions. Thus, a sample with a magnetization which varies exponentially throughout the depth, so that M(Z) = A×eB×Z may be readily represented, with both A and B as fittable parameters.
We provide examples of these more advanced cases in the example library.
The Refl1D software program fits data by using a variety of algorithms for optimization of reduced χ2, possessing a particularly powerful suite of fitting engines. Due to the large number of variables generally used to fit a PNR dataset, one must be particularly careful in determining whether a fit optimizer has in fact arrived at the globally best (lower χ2) solution, or merely become stuck in a local minima. Although this page is intended to provide an extremely basic practical introduction to PNR fitting, we do recommend interested readers consult the complete documentation for more difficult fitting problems. That being said, there are three fitting engines most commonly employed at the NCNR: