Class MultiLayer (toplevel sample model)

In BornAgain, for the time being, a sample is always represented by an instance of class MultiLayer, even if it is a single-layer SAS sample.

Create an instance and add layers

The sample is created by the constructor call

sample = ba.MultiLayer()

Layers are then added using either of

sample.addLayerWithTopRoughness(layer, roughness)

For the arguments, see sections Layer and Roughness.

The layer added first is the top layer (typically vacuum). The layer added last is the bottom layer (typically substrate).

Set properties

Global properties of the sample are set through the following functions:


which takes an argument of type RoughnessModel;


where the argument is the vertical roughness correlation length in nm;


where the argument is the external magnetic field in A/m.