A Sample and LayerStack contain one or several instances
of class Layer
.
A Layer
instance is created by one of the constructor calls
ba.Layer(material)
ba.Layer(material, roughness)
ba.Layer(material, thickness)
ba.Layer(material, thickness, roughness)
For the first argument, see Material.
The optional thickness
argument is the layer thickness in nm.
If it is omitted, then a the thickness is set to infinite,
and the layer can be used as top or bottom of a multi-layer sample,
or as the sole component of a single-layer sample.
For the optional roughness
argument, see Roughness.
To add a dilute random assembly of uncorrelated particles to a layer:
layer.depositParticle(density, particle)
For variants and details, see Particle assembly > Disorder.
To any kind of structured particle assembly to a layer:
layer.addStruct(structure)
layer.addStruct(weight, structure)
For argument structure
, see Particle assembly.
For an incoherent mixture of different structures,
call addStruct
several times, with a weight
argument between 0 and 1.
If this argument is omitted, the weight is 1.
To divide the layer into n
slices for the reflectivity computation, use
layer.setNumberOfSlices(n)
Functions depositParticle
and addStruct
were introduced in BornAgain 24,
replacing function addLayout
.
The entire concept of a particle Layout
has become unnecessary and was removed in BornAgain 24.