# Presentation: 490081

## NCNR Summer School '06

***Reflectometry ***
***Reduction and Analysis***

- Paul Kienzle
- paul.kienzle@nist.gov

## Experimental Setup

***Experimental Setup***

**Notes:**
Looking down the beam pipe to reflectometer.
Monochromator selects a small range of wavelengths.
Collimation provided by Slits 1 and 2; restricts range of incident angles.
Slits 3 and 4 primarily to reduce background, though can also be used e.g., scanning the beam profile.
Sample is mounted vertically on AND/R and NG-1; horizontally on NG-7.
Sample is completely gimbled; can be moved up and down, side to side, front to back, and rotated in all directions.
Detector is on a rotating arm; for horizontal geometry reflectometers, the sample table raises and lowers.
Instrument and sample must be precisely aligned to perform the measurement.
Polarizers and flippers select spin up or spin down neutrons.  Note: post sample flipper and polarizer are reversed in this diagram.

## Data Reduction

- Slit 1

- Slit 2

- White Beam

***Data Reduction***

- Monochromator

- θ

**Notes:**
Measure the rocking curve by rotating the sample or detector.  The rocking curve should be centered on θ2 /2.  The width of the rocking curve should match the resolution of the measurement due to the geometry (slit openings, sample size and distances between them).  Additional broadening is due to the defects in the sample.  The wavelength distribution contributes to overall Q resolution, but it will not be visible on the rocking curve.
Measure the specular scan by keeping the detector arm θ2 at precisely twice the sample angle.  This is the specular condition.  Intensity falls off rapidly away from the specular condition, as measured by the rocking curve, which is why it is called the specular ridge.
Measure background by shifting the sample or the detector off the specular condition.
Instrumental background: electronic noise, background radiation and air scatter from the main beam.   Air scatter in particular will be higher nearer the main beam, so a positive offset and negative offset will give different backgrounds.  The two are generally averaged.  Negative offsets should not be measured near zero because this will pick up the main beam signal transmitted through the sample.
Sample background: incoherent scattering within the sample can produce a high background signal.
Background should be relatively smooth, though you may see some structure from the nearby specular ridge.
Reflectivity is the ratio of incident to reflected neutrons. We can either measure the intensity of the main beam directly for given slit settings and compute (specular - average background)/intensity, or monitor the intensity of neutrons after slit 2 and compute (specular – average background)/monitor*monitor-dectector ratio.  When measuring the direct beam an attenuator will be needed to keep the count rates safe for the detector.
Slit scan is measured versus slit opening, not Q.  Reduction software uses the slit openings in the specular/background measurements to determine the normalization intensity.
With fixed slits but changing angles the size of the beam spot will increase on the sample. At low angles some beam misses the sample entirely.  We must estimate the portion of the beam that is not reflected and scale the specular or slit scan over the edge.   A poor estimate can lead to errors when determining the critical value (low Q errors) and errors when determining the interfacial roughness (high Q errors).
Measurements of the magnetic field distribution inside the sample are done by selecting particular polarization states before and after the sample.
Reduction software estimates polarizer and flipper efficiencies from the intensity scan and corrects for them.
Uncertainties are propagated through every correction.

## What is it good for?

- Subsurface structure up to 1μm
- Polymers, biofilms, magnetic surfaces, ...
- Determines average density at depth z

**Notes:**
The displayed profile was measured indirectly by X-ray reflectivity.  Note that it is showing structures on the order of 20 Ǻ
The measured signal shows a refraction pattern which cannot in general be inverted. Instead we compute the reflectivity expected for a model profile until you find a sensible fit to the data.
We can measure the profile directly in special circumstances;  by varying the scattering length of one part of the profile while holding the remainder fixed, we can reconstruct the phase, and from that the complex amplitude of the reflected signal.  This can be inverted directly yielding a profile.

## Optical Matrix Formalism

**Notes:**
Reflectivity is computed using the optical matrix formalism with Fresnel coefficients.  Matrices representing each layer are multiplied to give reflectivity.  This is then transformed into a magnitude in the laboratory reference frame.
The parameter ρ is the scattering length density (SLD) and μ is the absorption of a material. The parameter λ is the neutron wavelength. 
Arbitrary profiles can be approximated by finely sliced layers.   In practice we don't need to slice too finely because our instruments are limited in the range of Q values that can be measured, and the best we can resolve is about 2π/Q in depth. Using finer slicing generates a smoother profile but costs more to compute (cost is on the order of the number of slabs times the number of measured Q values) and doesn’t change the computed reflectivity at low Q.
The calculation is similar for polarized neutrons, but using a 4x4 rather than 2x2 matrix.  Polarized neutrons have additional parameters, P for internal field and α for field direction.  Separate profiles are needed for each parameter, though the resulting profiles must share the same layer thicknesses.
Freeform models can be represented as cubic B-splines; these preserve continuity but otherwise allow arbitrary profiles.
Box models have flat layers with smooth transitions between layer densities.  Often a Gaussian diffusion/roughness model is used since there is a fast analytic approximation which is valid for thin interfaces.
Functional models have a profile parameterized by a theory function. This function can be modelled with thin slabs which can then be used to compute the reflectivity.
There are a variety of global optimization methods (e.g., genetic algorithms or simulated annealing) to fit reflectivity.  With restarts, local models (e.g., Levenberg-Marquardt, Nelder-Mead simplex) can act like global methods.
There’s not enough information in data to concluded that a particular layer has a particular form because only a limited range of Q has been measured.  Be careful in drawing strong conclusions from the fit.

## Fitted Data

**Notes:**
An example of a model and data.
This particular fit is excellent but it is difficult to find by trial and error.  The following slides show many local minima in the search space.
To get good results from the fitting program you need to start from reasonable parameters.
Note the fringes in the data whose size and position is dependent on the thicknesses in the model.

## χ2 Landscape (ρ2 vs d2)

***χ******2****** Landscape (******ρ******2****** vs d******2******)***

**Notes:**
Fit landscape has many local minima.  
Shows the tradeoff between the depth of a layer and its scattering length density (SLD).  Any given depth has an ideal SLD, but its value depends on the depth.
In this case the global minimum is near 500 Ǻ, but the fit looks to be improving as chisq increases.  In fact what is happening at larger depths is that the curve is approximating the average of the fringes so the fit is very bad.  Near the minimum, when the depth is off by a little the ‘phase’ of the fringes shifts and this causes chisq to look bad even though the model is quite good.  For this reason blind least squares fitting on direct models does not work well in reflectometry.  
This is a ‘garden path’ fit space: going in the direction of improved chi-squared leads you away from the global minimum.
Need to be careful about claims in the uncertainty of the model parameters near the minimum since they are based only on the shape of the local minimum.  There is no guarantee that the fit has selected the correct minimum without an exhaustive search of the space.

## χ2 Landscape (d2 vs d3)

**Notes:**
More complex minimization landscape.
The two depths play off each other in complex ways.  Note the diagonal valley containing the global minimum at 500,150.  The sum of the depths along this diagonal is 650 Ǻ. Again there is periodicity in the spacing of the minima as the fringes in the reflectivity curve move in and out of phase with the data.

## Heuristics

**Notes:**
Some information can be read directly off the graph.  The spacing of the fringes suggests structures on the order of 170 Ǻ and 710  Ǻ.  The ~650 Ǻ observed on the d2-d3 graph does not include the little peaks of about 30 Ǻ each which were fixed while d2 and d3 were altered.
Note that the information at larger length scales is more visible at lower Q and disappears at high Q in this example.  Conversely, the short length scale information is more prominent at higher Q.
Note the lack of a sharp critical edge.  This is X-ray data, and absorption dulls the critical edge.  To fit this data properly an absorption profile was used in addition to the SLD profile.  A low resolution experiment will also dull the critical edge, but in a different way.
By overlaying a plot of Q^-4 against the data you can get some idea of the interface roughness; a Heaviside function shows approximately Q^-4 behaviour for large Q.  As the roughness increases fewer neutrons are reflected and the intensity falls faster than Q^-4.

## Prior Knowledge

**Notes:**
Plot of identical data to two different reflectivity curves.
Note that this is a plot of Fresnel reflectivity (R/Ro, with Ro the computed from a single interface).
The first fit comes from a free-form model generated by parametric B-splines.  The second fit comes from a volume fraction model of polymers tethered to a liquid surface.
Even though the first fit has a lower normalized chi-squared value, there is no physical explanation for that density profile.  The second fit comes from a theoretical model of the volume fraction as a function of depth.
The moral is just because you can fit your model to the data it does not mean that it is correct.
There are maximum entropy fitting programs in development which allow you to encode your assumptions about the shape of the profile, but otherwise choose the flattest.  Meanwhile we proceed by entering reasonable initial values for the fit parameters and constraining them to physically sensible ranges.

## Simultaneous Fitting

***Simultaneous Fitting***

**Notes:**
The above is again volume fraction data, with three measurements in different contrasts.  Contrasts can be constructed by e.g. adjusting the deuteration of the solvent or the material of interest, or by varying a magnetic field within a sample with a single magnetic layer and measuring polarized neutron data.
Note that one profile is reversed; in this data the neutron beam enters through the edge of the substrate and reflects of the bottom surface of the structure of interest.  The beam may be somewhat attenuated but this can be corrected during reduction or modelled in the theory curve.
Constrain possible profiles by fitting datasets with shared parameters.
Constraints can come from many sources such as contrasting X-ray vs. neutron data.

## Our Problem

- Many local minima
- 'Garden Path' fit space
- Expensive objective function
- Continuous but no analytic derivative
- Significant number of parameters
- ... but many priors
- E.g., known material, known sputtering time, information from other measurements, theoretical models, bounds constraints
- There ***is*** hope for ye who enter.