Simulation types: Small-angle scattering

While BornAgain is designed for GISAS experiments (using the Distorted Wave Born Approximation), it naturally also contains the regular (plane wave) Born Approximation. Accordingly, BornAgain can also simulate standard small-angle scattering (SAS).

However, there exist several other specialized SAS softwares. Therefore we do not advertise BornAgain for analysing SAS experiments, and in general we do not provide user support for this application domain. We rather recommend SASView, which is institutionally supported by the European Spallation Source, and was designated as standard SAS software in the European SINE2020 project.

Yet BornAgain can be an appropriate choice in cases where the sample structure or the experimental conditions are not covered by other software. For example, other softwares provide no, or limited, support for polarized SANS. Here, we show how such experiments can be simulated with BornAgain.

Basic example

To simulate conventional small-angle scattering with BornAgain, we turn source and detector by 90 degrees with respect to grazing-incidence geometry.

The following basic example simulates scattering from a dilute random assembly of monodisperse, oriented dodecahedra.

Intensity image

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/usr/bin/env python3
"""
Basic example for regular small-angle scattering (SAS).
Sample is a dilute assembly of ordered dodecahedra.
"""
import bornagain as ba
from bornagain import ba_plot as bp, deg, nm
import matplotlib.pyplot as plt


def get_sample():
    vacuum = ba.RefractiveMaterial("Vacuum", 0, 0)
    material_particle = ba.RefractiveMaterial("Particle", 6e-4, 2e-8)

    # Finite sample layer, contains particles:
    ff = ba.Dodecahedron(12*nm)
    particle = ba.Particle(material_particle, ff)
    layout = ba.ParticleLayout()
    layout.addParticle(particle)
    solution_layer = ba.Layer(vacuum, 1000*nm)
    solution_layer.addLayout(layout)

    # Flat sample layer sandwiched between semi-infinite vacuum layers:
    sample = ba.Sample()
    sample.addLayer(ba.Layer(vacuum))
    sample.addLayer(solution_layer)
    sample.addLayer(ba.Layer(vacuum))
    return sample


def get_simulation(sample):
    # Beam from above (perpendicular to sample):
    beam = ba.Beam(1e9, 0.4*nm, 0.001*deg)

    # Detector opposite to source:
    n = 200  # number of pixels per direction
    detector = ba.SphericalDetector(n, -5*deg, 5*deg, n, -5*deg, 5*deg)

    return ba.ScatteringSimulation(beam, sample, detector)


if __name__ == '__main__':
    sample = get_sample()
    simulation = get_simulation(sample)
    result = simulation.simulate()
    bp.plot_simulation_result(result)
    plt.show()
auto/Examples/scatter2d/DodecahedraSAS.py