Scattering simulation

To set up and run a scattering simulation, use

import bornagain as ba
beam = ...
sample = ...
detector = ba.SphericalDetector(...)
simulation = ba.ScatteringSimulation(beam, sample, detector)
# ... set options
result = simulation.simulate()

For the constructor arguments, see sections beam, sample, and detector.

For optional settings, see simulation options.

For the return type of function simulate(), see Datafield.

SAS vs GISAS

At this level, the same syntax applies to SAS and GISAS (small-angle scattering under normal or grazing incidence).

The difference comes from the beam and sample model:

For SAS, use an incident beam with a grazing angle of $90^\circ$. For GISAS, the incident beam has a grazing angle of at most a few degrees.

The distorted-wave Born approximation (DWBA) is automatically applied if a sample has more than one layer. A GISAS model with no reflecting layer interface is instead described by the regular Born approximation.

Absorbing media retain their complex wavevectors even without a reflecting interface. The incident amplitude is normalized at the lower interface of the top layer, or at the upper interface of the bottom layer for a beam from below. The reciprocal outgoing wave uses the corresponding plane on the detector side. These planes are independent of internal slicing. Paths through absorbing media between these planes and the physical source or detector are not included; model finite planar layers explicitly.

Examples