Thick absorptive sample with roughness

Result

Thick absorptive sample with roughness result

Sample

Thick absorptive sample with roughness 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
#!/usr/bin/env python3
# /// script
# requires-python = ">=3.10"
# dependencies = ["bornagain>=25,<26"]
# ///
"""
GISAS of a thick, highly absorptive Au layer on Si, at extra-long wavelength.

Au (SLD: 3.484e-5, 1.791e-5) on a 10 nm vacuum gap on Si (SLD: 3.842e-7,
6.282e-7) with ErfTransient roughness. Beam wavelength 12 nm tests
the numerics under strong absorption.
"""
import bornagain as ba
ba.require_versions("bornagain>=25,<26")
from bornagain import deg, nm


def get_sample():
    au_color = (0.93, 0.72, 0.25)
    au_mat = ba.SLDMaterial("Au", au_color, 3.48388057043e-05, 1.79057609656e-05)
    si_color = (0.30, 0.62, 0.86)
    si_mat = ba.SLDMaterial("Si", si_color, 3.84197565094e-07, 6.28211531498e-07)

    autocorr = ba.SelfAffineFractalModel(5*nm, 0.5, 10*nm)
    transient = ba.ErfTransient()
    roughness = ba.Roughness(autocorr, transient)

    vacuum_layer = ba.Layer(ba.Vacuum())
    au_layer = ba.Layer(au_mat, 200*nm)
    vacuum_layer_2 = ba.Layer(ba.Vacuum(), 10*nm)
    substrate_layer = ba.Layer(si_mat, roughness)

    sample = ba.Sample()
    sample.addLayer(vacuum_layer)
    sample.addLayer(au_layer)
    sample.addLayer(vacuum_layer_2)
    sample.addLayer(substrate_layer)
    return sample


def get_simulation(sample):
    beam = ba.Beam(1e8, 12*nm, 0.2*deg)
    n = 100
    detector = ba.SphericalDetector(n, -2*deg, 2*deg, n, 0, 2*deg)
    simulation = ba.ScatteringSimulation(beam, sample, detector)
    simulation.options().setIncludeSpecular(True)
    return simulation


if __name__ == '__main__':
    sample = get_sample()
    ba.showSample3D(sample, sample_size=120*nm, seed=0)
    simulation = get_simulation(sample)
    result = simulation.simulate()
    ba.plot_datafield(result, unit_aspect=1)
    ba.plt.show()
auto/Examples/gisas/sample/ThickAbsorptiveSampleWithRoughness.py