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.
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
The distorted-wave Born approximation (DWBA) is automatically applied if a sample has more than one layer (see gisas-no-dwba-terms for a GISAS model with no reflecting layer interface, hence described by the regular Born approximation).