Top level sample model

A sample is always represented by an instance of class Sample.

Create an instance and add layers

The sample is created by the constructor call

sample = ba.Sample()

Layers can be added individually with

sample.addLayer(layer)

or within periodic layer stacks:

sample.addStack(stack)

For the arguments, see sections Layer and LayerStack.

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

The top and bottom layers are infinite media, while all intermediate layers between them have finite thickness.

LayerStack is required to be covered by the top and bottom media.