File: layout.md

package info (click to toggle)
bornagain 23.0-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 103,956 kB
  • sloc: cpp: 423,131; python: 40,997; javascript: 11,167; awk: 630; sh: 356; ruby: 173; xml: 130; makefile: 45; ansic: 24
file content (42 lines) | stat: -rw-r--r-- 1,118 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
+++
title = "Layout"
weight = 37
+++

## Class ParticleLayout

A [Layer](layer) may contain any number of instances of class `ParticleLayout`.
If a layer has more than one layout, then their scattering intensities add incoherently.

##### Create an instance and add particles

To create a particle layout and add kinds of particles, use
```python
layout = ba.ParticleLayout()
layout.addParticle(particle, abundance)
```

For the `particle` argument, see [Particle](../particle).

If the `abundance` argument is omitted, then the abundance will be taken from the
particle, which by default has an abundance of 1.

If there is one single kind of particles, then the `addParticle` call
can be replaced by a constructor call with `particle` argument:
```python
layout = ba.ParticleLayout(particle)
```


##### Set properties

To set an inter-particle structure, use
```python
layout.setInterference(interparticle)
```
For the argument, see [Particle assemblies](../interference).

To set the total particle surface density (in units of nm$^{-2}$), use
```python
layout.setTotalParticleSurfaceDensity(particle_density)
```