Homogeneous Ti Ni sample with absorption

Result

Homogeneous Ti Ni sample with absorption result

Sample

Homogeneous Ti Ni sample with absorption sample

Python script

 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#!/usr/bin/env python3
# /// script
# requires-python = ">=3.10"
# dependencies = ["bornagain>=25,<26"]
# ///
"""
Specular reflectometry of a Ti/Ni multilayer defined via scattering
length densities, including absorption.

10 bilayers of Ti (3.5 nm) and Ni (7 nm) on a Si substrate.
SLD values include the imaginary component (absorption) for all layers.
Compare AlternatingLayers.py which uses lossless SLD materials.
"""
import bornagain as ba
ba.require_versions("bornagain>=25,<26")
from bornagain import deg, nm, angstrom


def get_sample():
    vacuum = ba.Vacuum()
    si_color = (0.28, 0.57, 0.82)
    si_mat = ba.SLDMaterial("Si_substrate", si_color, 2.0704e-6, 2.3726e-11)
    ni_color = (0.93, 0.48, 0.14)
    ni_mat = ba.SLDMaterial("Ni", ni_color, 9.4245e-6, 1.1423e-9)
    ti_color = (0.05, 0.62, 0.55)
    ti_mat = ba.SLDMaterial("Ti", ti_color, -1.9493e-6, 9.6013e-10)

    vacuum_layer = ba.Layer(vacuum)
    ti_layer = ba.Layer(ti_mat, 3.5*nm)
    ni_layer = ba.Layer(ni_mat, 7*nm)
    substrate = ba.Layer(si_mat)

    n_repetitions = 10
    stack = ba.LayerStack(n_repetitions)
    stack.addLayer(ti_layer)
    stack.addLayer(ni_layer)

    sample = ba.Sample()
    sample.addLayer(vacuum_layer)
    sample.addStack(stack)
    sample.addLayer(substrate)
    return sample


def get_simulation(sample):
    n = 500
    scan = ba.AlphaScan(n, 2*deg/n, 2*deg)
    scan.setWavelength(1.54*angstrom)
    return ba.SpecularSimulation(scan, sample)


if __name__ == '__main__':
    sample = get_sample()
    ba.showSample3D(sample, sample_size=80*nm, seed=0)
    simulation = get_simulation(sample)
    result = simulation.simulate()
    ba.plot_datafield(result)
    ba.plt.show()
auto/Examples/specular/basics/HomogeneousTiNiSampleWithAbsorption.py