This example shows how to plot the scattering length density (SLD) profile and the X component of the magnetization profile for a multilayer sample with rough interfaces.
The sample consists of alternating Ti and Ni layers with rough interfaces. The Ni layers and the substrate carry magnetization in X direction.