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,
use depositParticle or suspendParticle:
layer.depositParticle(density, particle)
layer.suspendParticle(density, particle)
With depositParticle, the bottom of the particle is placed at the layer’s
bottom interface. This is appropriate for particles sitting on a substrate.
This method is only valid for finite-thickness layers.
With suspendParticle, the top of the particle is placed at the layer’s
top interface. This is appropriate for particles hanging from below an interface,
such as particles embedded in a substrate just below its top surface.
For variants and details, see Particle assembly > Disorder.
To add a 2D particle structure (particles on a surface) to a layer:
layer.deposit2D(structure)
layer.addDeposit2D(coverage, structure)
layer.suspend2D(structure)
layer.addSuspend2D(coverage, structure)
With deposit2D and addDeposit2D, the bottom of particles is placed at the
layer’s bottom interface. This is appropriate for particles sitting on a
substrate. These methods are only valid for finite-thickness layers.
With suspend2D and addSuspend2D, the top of particles is placed at the
layer’s top interface. This is appropriate for particles hanging from below an
interface, such as holes or inclusions embedded in a substrate just below its
top surface.
For argument structure, see Particle assembly.
For an example using suspend2D, see HolesLattice.
For soft particles (like FuzzySphere and GaussSphere) that have diffuse
boundaries, use ParticleAlignment_Centered to place the particle center at
the interface:
layer.deposit2D(ba.Dilute2D(density, soft_particle, ba.ParticleAlignment_Centered))
For an example, see SoftSpheres.
For an incoherent mixture of different structures, call addDeposit2D or
addSuspend2D several times, with a coverage argument between 0 and 1.
If coverage is 1, the simpler forms deposit2D or suspend2D can be used.
To add a 3D particle structure (particles filling a volume) to a layer:
layer.fill3D(structure)
layer.add3D(coverage, structure)
For argument structure, see Particle assembly.
For an incoherent mixture of different structures, call add3D several times,
with a coverage argument between 0 and 1. If coverage is 1, the simpler form
fill3D can be used.
To divide the layer into n slices for the reflectivity computation, use
layer.setNumberOfSlices(n)
The following example demonstrates suspend2D: a hexagonal lattice of
hemispherical vacuum holes in a substrate. The holes are half-spheres of vacuum
material, suspended from the substrate’s top interface so they extend downward
into the substrate.
|
|
The following example demonstrates centered alignment: soft spheres placed at a
substrate interface. Since FuzzySphere has a diffuse boundary, we use
ParticleAlignment_Centered to place the particle center at the interface.
|
|
Functions depositParticle, suspendParticle, deposit2D, suspend2D,
fill3D, and fill3DRandom were introduced in BornAgain 24, replacing function
addLayout. The entire concept of a particle Layout has become unnecessary
and was removed in BornAgain 24.
In BornAgain 25, ParticleAlignment was introduced to control particle
positioning relative to the reference plane. Use ParticleAlignment_Centered
for soft particles.