Debian Codegraph @

hugo/content/ref/sim/class/specular/ex/index.md

raw
1 +++
2 title = "Example"
3 weight = 10
4 +++
5
6 ## Basic specular reflectometry example
7
8 As introductory example, we simulate specular reflectometry
9 by a sample that consists of 10 Ti/Ni double layers on a Si substrate.
10
11 ##### Full script
12
13 The same script has been used in the tutorial to explain [usage](/py/run)
14 and [syntax](/py/syntax) of BornAgain Python code.
15
16 Root class reference: [SpecularSimulation](/ref/sim/class/specular).
17
18 {{< figscg src="/img/auto/specular/AlternatingLayers1.png" width="500" class="center">}}
19
20 {{< show-ex file="specular/AlternatingLayers1.py">}}
21
22
23 ##### Shorthand with standard sample
24
25 Since we will use the same sample in several other examples,
26 we provide the shorthand `std_samples.alternating_layers()`
27 so that the above script can be shortened as
28
29 {{< show-ex file="specular/AlternatingLayers2.py">}}