A MultiLayer is composed of one or several instances
of class Layer
.
Each instance is created using the constructor call
layer_i = ba.Layer(material, thickness=0)
Typically, the variable name will contain an index i
.
By convention, the numbering starts with the top layer, typically layer_1
.
For the first argument, see Material.
The optional second argument is the layer thickness in nm. If it is omitted, then the default value of 0 indicates an infinite thickness; this is to be used for the bottom or top layer, or for the sole component of a single-layer sample.
To add a ParticleLayout, use
layer_i.addLayout(layout)
If there are several layouts, then their scattering intensities will be added incoherently.
To divide the layer into n
slices for the reflectivity computation, use
layer_i.setNumberOfSlices(n)