BornAgain GUI Overview

Welcome view

When you start BornAgain GUI, you will be presented with the Welcome View, where you can

  • Create new projects
  • Open recent projects
  • Visit BornAgain web page

Instrument view

The Instrument View is used to create new scattering instruments and adjust their settings. To add a new instrument click Add button in the top left corner.

This tutorial covers only the GISAS instrument. Other instrument types will be presented in later tutorials.

The instrument view consists of the instrument selector located on the left and the instrument settings window located on the right.

Beam Parameters

  • Intensity, photons (or neutrons)
  • X-ray/neutron Wavelength, nm
  • Inclination angle, degree
  • Azimuthal angle, degree

Beam divergency can be set up via Distribution parameter. Click the magnifying glass to start the Extended distribution viewer.

Detector parameters

This tutorial will cover only the rectangular detector, since it is the most popular detector type for GISAS instruments. More information about BornAgain detector types one can find on BornAgain web page.

Rectangular detector is defined by following parameters:

  • Nbins - number of detector pixels (horizontal for X axis and vertical for Y axis)
  • Width - width of the detector, mm
  • Height - height of the detector, mm
  • Alignment - the way how the detector aligned with respect to the direct beam, sample, etc.
  • Resolution function - detector resolution. For the moment only 2D Gaussian is supported. Simulated result will be convolved with the given function to account for detector resolution.

Positions:

  • u0 (dbeam) - direct beam X coordinate, mm
  • v0 (dbeam) - direct beam Y coordinate, mm
  • Distance - distance from sample to detector, mm

Further instrument settings

Section Polarisation analysis accounts for simulation of polarized neutrons. Will be presented in later tutorial.

Section Environment contains settings for background which should be considered during simulation. For the moment only Constant background of the given amplitude (set with BackgroundValue field) and Poisson noise are supported.

In the case of constant background, the intensity is calculated as $$I = I_{sim} + A$$ where $A$ is the amplitude value given in the BackgroundValue field.

In the case of Poisson background, the intensity $I_k$ at each detector point $k$ is obtained from the Poisson distribution with the probability $$P(I_k | \mu) = \frac{e^{-\mu}\cdot\mu^{I_k}}{I_k!}$$ where $\mu = I_{sim,\,k}$ is the simulated intensity at the detector point $k$ without background.

Exercise 1: Set up GALAXI instrument

GALAXI is the high brilliance laboratory small angle X-ray scattering instrument operated by JCNS, Forschungszentrum Jülich.

GALAXI beam parameters

  • Intensity $I = 10^6$ photons
  • X-ray Wavelength $\lambda = 1.34 \overset{\circ}{\text A}$
  • Inclination angle $\alpha_i = 0.2^{\circ}$
  • Azimuthal angle $\phi_i = 0.0^{\circ}$
  • For this exercise: no beam divergency

GALAXI detector parameters

  • Detector size $981\times 1043$ pixels ($x\times y$)
  • Pixel size $172\mu m$
  • Direct beam center $(x, y) = (600, 350)$ pixels
  • Distance from sample to detector $3532$ mm
  • Detector is aligned perpendicular to the direct beam.
  • For this exercise: no resolution function, no background

Optional: beam divergency

Add angular beam divergency $\Delta\alpha_i=0.3$ mrad and $\Delta\phi_i=0.3$ mrad. Choose Gaussian distribution. Pay attention, that StdDev$=\sigma$ and $$\text{FWHM}=2\sqrt{2\log 2}\sigma\approx 2.355\sigma$$ Play with the Distribution widget, vary the distribution parameters and observe changes.

Note: the larger Number of samples you choose, the slower will be your simulation. Do you understand why?

Optional: detector resolution

Add detector resolution function with FWHM equal to the detector pixel size for both, $X$ and $Y$ directions.

If got stucked, see solution

Sample View

The Sample View allows you to design the sample via a drag-and-drop interface. It consists of five main parts

  • The item toolbox (1) contains a variety of items for building a sample
  • The sample canvas (2) is used to assemble the sample
  • The sample tree view (3) represents the hierarchy of the objects composing the sample
  • The property editor (4) can be used to edit the parameters of the currently selected item
  • The script view (5) shows the automatically generated Python script

Material editor

Material editor accounts for properties of the materials, such as refractive indices (alternatively SLD) or magnetization. To start the wigdet, click the Material Editor button on the top panel.

Exercise 2: Si Nano dots on Si substrate

Create a sample made of rectangular Si nanoparticles on Si substrate. For this exercise we ingore the interference function.

If got stucked, see solution

Simulation view

The Simulation View contains three important elements

  • The Data selection box for selecting the instrument and the sample to simulate.
  • The Simulation Parameters box for changing the main simulation parameters
  • The Run Simulation and Export to Python Script buttons

Job view

Exercise 3: Run simulation

  1. Simulate the sample designed in the previous exercise. BornAgain should automatically switch to Job view after the simulation has finished. Change plot units to $q$. Change the $Q_z$ range to start from 0. Save the plot to .png file.

  2. Take a Fourier transform of the image. See the result.

  3. Make a horizontal slice at $Q_z=0.4$. Save it to text file.

  4. Make a vertical slice at $Q_y=0$. Save it to text file.

  5. Switch to Real time activity. Vary width of the particles. How it influences the simulated GISAXS pattern?. Vary height of the particles. How did the simulated pattern change?

If got stucked, see solution


In [ ]: