File: stack.md

package info (click to toggle)
bornagain 23.0-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 103,948 kB
  • sloc: cpp: 423,131; python: 40,997; javascript: 11,167; awk: 630; sh: 318; ruby: 173; xml: 130; makefile: 51; ansic: 24
file content (35 lines) | stat: -rw-r--r-- 674 bytes parent folder | download
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
+++
title = "LayerStack"
weight = 36
+++

## Class LayerStack

A [Sample](/ref/sample/multilayer) or outer `LayerStack` may contain one or several instances
of class `LayerStack`.


Each instance is created using the constructor call
```python
stack = ba.LayerStack(n_periods)
```
or
```python
stack = ba.LayerStack() # by default n_periods = 1
```

The stack is created empty. To populate it with [layers](/ref/sample/multilayer/layer) or other stacks, call
```python
stack.addLayer(layer)
stack.addStack(sub_stack)
```

The numper of repetitions can be changed with
```python
stack.setNumberOfPeriods(n_periods)
```
or returned with
```python
stack.numberOfPeriods()
```