Loading experimental data#
Load data#
EasyReflectometryApp loads experimental data from .ort (ORSO), .dat and .txt files.
A text file needs at least three columns, q, R and the uncertainty of R, and may have a
fourth, the q-resolution of each point. An ORSO file can hold several datasets, for example
one per contrast.
Open the Experiment page: press Continue on the Sample page, or select the page
once a project or an example is loaded. In the Experimental data group, press
Load experiment(s) from file(s) and pick one or more files.
Here polymer_film_platypus.ort from
examples/datasets/measured
is loaded:

Each dataset is listed in the Data Explorer, with the model it is fitted with in the
Model column. The loaded data is drawn in the main window. To read the coordinates of a
measured point, move the cursor near it. The tooltip snaps to the nearest visible point,
so you do not have to hit the marker exactly; the speech-bubble button above the chart
turns it off. The Plot control group of the Advanced controls changes the axes (a
linear R(q) axis, a logarithmic q axis, R(q)×q⁴) and the markers, see
simple fitting.
Instrumental parameters#
Once data is loaded, the Instrumental parameters group shows the scale, background and
resolution that apply to it:
Scaling: scale factor applied to the calculated reflectivity.
Background: level at which the data meets the experimental background.
Resolution: instrumental resolution, as a percentage of q (FWHM). It shows
Splinefor data with a measured resolution, see below.
These belong to the model the selected experiment is fitted with. With several contrasts,
each experiment has its own model, so selecting another experiment in the Data Explorer
shows that experiment’s values. Here the H2O contrast of
Film in three water contrasts is selected:

The same scale and background are listed in the parameter table of the Analysis page,
where they can be fitted.
Resolution of the data#
If a file has a fourth column (sQz, the q-resolution of each point), the app keeps that
resolution. The fit, the calculated curve and residuals on the Analysis page, the Bayesian
sampling and its band, and the report all smear each dataset with its measured resolution.
This applies to every dataset, including several datasets sharing one model (other angles
or contrasts) and each channel of a polarised experiment.
The Resolution field belongs to the model. Its value comes from the first dataset
loaded onto the model, and it shows Spline, which cannot be edited, when that dataset has
a measured resolution. The Sample page uses the model’s resolution for simulations.
Datasets without a resolution column are smeared with the model’s percentage, 5 % unless
you change it.
Several files of one contrast#
A contrast is often measured as several curves, one per incident angle or wavelength band. Load the first file, keep its experiment selected, and press Add file(s) to the selected experiment to merge the other files into it. The points are sorted by q and each has its own resolution, so overlapping q ranges measured with different widths fit correctly.
If you add a file without a resolution column to measured data, its points get a percentage resolution (5 % when the model holds a measured resolution), and the app tells you:

The button is disabled until an experiment is loaded, and for polarised experiments, because their channels are separate datasets.
Polarised data#
To load a measurement with several spin channels, use the third button, Load polarized experiment (file per channel). It takes one file per channel and asks how to assign them. See polarised data.
Loading a measurement, step by step#
Note
This tutorial, “Loading experimental data”, can be followed step by step in the app: Home › Tutorials. The steps below are the ones the app shows.
Step 1: The measurement
A new, empty project is open. You will load polymer_film_platypus.ort into it: a polymer film
on silicon measured against D₂O on Platypus. The file has four columns: q, R, the
uncertainty of R and the q-resolution of each point.
Step 2: Open the Experiment page
Select the Experiment page in the bar at the top.
Step 3: Load the file
Press Load experiment(s) from file(s) and pick polymer_film_platypus.ort. The file
dialog opens in the folder containing the required file.
Step 4: The Data Explorer
The dataset is listed under the title from the file, Example data file from refnx
docs. The Model column names the model it is fitted with: Model, the only model of a
new project.
Step 5: The chart
The measured points are drawn with their uncertainties. Move the cursor near a point to read its coordinates: the tooltip snaps to the nearest visible point. The speech-bubble button above the chart turns it off.
Step 6: The instrumental parameters
These belong to the model the dataset is fitted with. Background starts at the lowest
measured reflectivity, 9.27e-8. Resolution shows Spline: the file has a resolution
column, so each point is smeared with its own measured resolution.
Step 7: More files of the same contrast
Another angle or wavelength band of the same contrast is merged into the selected experiment with Add file(s) to the selected experiment. The points are sorted by q, and each has its own resolution.
Step 8: Plot R(q)×q⁴
Open the Plot control group and tick Plot R(q)×q⁴. Multiplying by q⁴ takes out the
steep fall of the reflectivity, so the fringes stand out over the whole q range. Where the
curve climbs at high q, the data has reached the background.
Step 9: Back to R(q)
The setting applies to the charts of every page. Untick Plot R(q)×q⁴ to go back to R(q).
Step 10: Open the Analysis page
The scale and background are listed in the parameter table of the Analysis page, where
they can be fitted. Select the Analysis page to finish.