Getting started#

This tutorial explains how to use EasyReflectometryApp. Version: 1.7.0

Home page#

EasyReflectometryApp opens on the Home page.

Home page

  • A: Starts your project.

  • B: Pop-up window with source information.

  • C: Link to developer documentation.

Below them, Tutorials lists the tutorials that can be followed step by step in the app. The list is folded away when the app starts; click its title to open it. Clicking a tutorial loads its example project, or starts a new project for those that need none (asking first if that would discard unsaved work), and opens a panel on the left of the pages. Getting started, the first in the list, is a tour of the pages; its steps are at the end of this page. For each step the panel gives the instructions, frames the control to use, and ticks the step off once it is done. Show me performs the step, Skip step moves on without it, and Stop closes the panel and leaves the project as it is. A tutorial finished without skipping a step is marked with a tick in the list. The model setup, loading data, simple fitting, several contrasts, magnetic layers and polarised data tutorials show their steps on their pages as well.

Initialise project#

Pressing A takes you to the Project page.

Project overview

  • 1: Creates a new project: a folder containing experiments and a JSON settings file.

    • A new project needs a name, a description and a save location.

  • 2: Opens an existing project from its JSON file.

  • 3: Continues to the next page, which here is Sample.

    • This button appears throughout the app and always takes you to the next page.

If you do not create or select a project, the app starts a default project. The rest of this tutorial uses that default project.

Creating a new project#

Create a new project opens a dialog for the project’s name, description and location. OK creates the project; Cancel closes the dialog without creating anything.

If the session already contains your own sample, data or fit settings, either built before any project existed or belonging to the open project, the app first asks what the new project should start with:

  • Keep sample and data: the new project starts with what is on screen.

  • Start from scratch: the new project starts with the default sample and no data.

  • Cancel: no new project is created.

The dialog also tells you whether the current work has been saved. Starting from scratch discards any work that was never saved to a project. Nothing is reset until you confirm the new project’s details with OK, so cancelling at that point keeps everything as it was.

Note

Later versions cannot open projects saved by EasyReflectometry 1.5 or earlier. Re-create them, or open them with EasyReflectometry 1.5.

Save and settings#

Once a project is started, two more buttons appear, with the settings button in the opposite corner.

Save Settings

  • A: Save project.

  • B: Reset to start.

  • C: Settings, explained in the settings section.

Automatic saving#

Once you have created a project, the app also saves it automatically if it has unsaved changes at any of these moments:

  • when you leave a page;

  • after a successful fit, and after a Bayesian sampling run;

  • just before a fit starts, before the calculation engine is switched, and before the sample is replaced by one loaded from an ORSO file.

The app never saves automatically while a fit is running.

Before each automatic save, the app copies the project file it is about to replace to project.json.bak in the project folder, so you can undo one unwanted automatic save by hand. Saving with the save button (A) does not create a backup.

The Saved item in the status bar shows the time of the last save, followed by (auto) if that save was automatic. In that case its tooltip shows the path of the backup. If an automatic save fails, a dialog tells you once, and the status bar shows Autosave failed until a save succeeds. Your work is still in memory, so use the save button to try again.

To turn off automatic saving, untick Save automatically in the Saving group of the Advanced controls on the Project page. This is an application preference: it is remembered between sessions and applies to every project.

Sample structure view#

The Sample page has a Structure tab next to Reflectivity. It shows a diagram of the current model’s layer stack, with one coloured box per layer, the ambient medium at the top and the substrate at the bottom. Layers of the same material share a colour (see the legend), box heights follow layer thickness, and multilayers with many repetitions are drawn once with a “× N” badge.

Hover over a box to see its material, SLD, thickness and roughness, and click it to select that layer in the sidebar editor. The view updates as soon as the model changes, including after a fit.

The view is a diagram and not drawn to scale. Box heights are limited so that very thin layers stay visible and very thick ones do not push the others out of view.

A tour of the app, step by step#

Note

This tutorial, “Getting started”, can be followed step by step in the app: Home › Tutorials. The steps below are the ones the app shows.

Step 1: Welcome

EasyReflectometryApp fits models of layered samples to reflectivity data. The pages in the bar at the top follow the work: Project, Sample, Experiment, Analysis and Summary. This panel guides you through them. Controls currently described are framed in red, and Show me does a step for you. Read more opens the documentation, the double arrow folds the panel away, and Stop closes it.

Step 2: Projects

Create a new project asks for a name, a description and a folder. The project is then saved there, and saves itself as you work. Open an existing project opens one saved before. Until you create one, as now, the app works in a default project that is not saved.

Step 3: Examples

Each example is a complete project, with a model and measured data, ready to fit. Most of the other tutorials load one of these projects.

Step 4: Continue to the Sample page

Press Continue at the bottom of the sidebar. Every page has one, and it takes you to the next page.

Step 5: The sample

The Sample page describes the sample as a model. A new project has a default sample, Model: air, a 100 Å layer of D₂O and a silicon substrate. The chart shows the reflectivity of that model. The sidebar’s groups open and close with a click on their title: open Models selector to see the model.

Step 6: The structure

Open the Structure tab above the chart. It draws the model’s layers as a stack, from the air at the top to the substrate at the bottom.

Step 7: Continue to the Experiment page

Press Continue.

Step 8: The data

The Experiment page holds the measured data. It is loaded here, from .ort, .dat or .txt files. The Loading experimental data tutorial shows it.

Step 9: Continue to the Analysis page

Press Continue.

Step 10: The parameters

The Analysis page fits the model to the data. The table lists the parameters of the model and of the instrument; ticking Fit frees the selected parameter for the fit. Start fitting below needs data, so the Simple fitting tutorial uses an example.

Step 11: Continue to the Summary page

Press Continue.

Step 12: The report

The Summary page reports the project: the model, the data and the fit. The sidebar exports it, as HTML or PDF, and its plots.

Step 13: Around the pages

The cog opens the application preferences. Next to it are the online help and the bug report. On the left of the bar, the first button saves the project and the second starts again from nothing. The status bar at the bottom shows the project, the number of models and experiments, the calculation engine, the minimiser and the parameters.

Step 14: Where next

Open the Home page. Its Tutorials list, opened with a click on its title, goes on from here: Building a model, then Loading experimental data and Simple fitting.