Description of the data reduction process for XRR on a solid surface

This notebook explains the different steps performed to extract the X-ray reflectivity in JupyLabBook >= v2.10.5 with the library XRR_solid.py.

Conditions

The conditions for the example treated here are:

Extraction of the intensity of the reflected beam

We describe here how the raw intensity of the reflected beam is extracted.

User-defined summation ROI

The user defines the summation ROI, which will be summed to extract the intensity of the reflected beam. Careful, the larger the ROI, the more background you add to the signal. Also, the height has to be an odd number, to have the beam centered.

Control on one data point

We check that the ROI is right for one scan of the XRR curve.
We use the library DetectorSum.py to extract the 2D images from the nexus file. All the images within a same scan are summed (i.e. summation over all the angles in the scan).

Control on all the scans

We check on every scan of the XRR that the reflected beam falls in the summation ROI.

Extract the raw intensity of the reflected beam

For each scan of the XRR we then extract the raw intensity of the reflected beam by summing over the summation ROI.
We normalize each point by the integration time.

We plot the extracted raw intensities, which looks weird because the attenuators were adjusted from one scan to another to avoid beam damage on the detector. This will be adjusted with the normalization by the incident beam.

Background subtraction

The background is defined by taking a ROI of the same size as the summation ROI, eather immediately above and below it, or on its left and right.
The user chooses which background is taken:

Control on one scan

We check the background ROIs in linear and log scales.

Subtract background for all the points & define errors

We extract the background for each scan and subtract it from the intensity of the reflected beam.

We also define the error for each point as the square root of the intensity. We use a worst-case scenario for the error definition: the sum of the error on the reflected beam and of the average error of the background ROIs.

We plot the background intensity, which looks weird for the same reasons as for the reflected beams. We see that the subtraction is important for large values of theta.

Normalization by the corrected voltage of the ionization chamber

We extract the voltage measured by the ionization chamber and its gain.
An increase of 1 in the gain corresponds to a factor 10 in the measured voltage, with a saturation at 10 V.
We assume that the voltage is proportional to the intensity of the incident beam, provided that the gain is high enough. Note that a gain higher than 7 may induce non-linearities, as it is the case in this example.

The intensity of the reflected beam is simply divided by the corresponding voltage of the ionization chamber V, corrected by its gain, and so are the errors and the background.

We plot the normalized intensity as a function of 2*theta, now this looks like a XRR curve. The last missing thing is the normalization by the direct beam.

Normalization by the direct beam

Every steps made above should be performed as well on the direct beam.

We can have two types of direct scans:

Finding the position of the direct beam

The direct beam is easily found by taking the position of maximum on the whole detector.

Extract the intensity of the direct beam

Background subtraction

The background is defined the same way as for the reflected beam.

Normalization by the corrected voltage of the ionization chamber

Normalization by the direct beam : XRR curve

Finally, we normalize the intensity of the reflected beam with the direct beam and obtain the XRR curve.

We plot the results for $q_z= 4\pi/\lambda\sin(\theta)$ as well, where $\lambda$ is the wavelength provided by the user in JupyLabBook, and for $Iq_z^4$ to normalize by the Fresnel reflectivity.

Summary of the useful variables