Yoneda BA

Result

Yoneda BA result

Sample

Yoneda BA 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
59
60
61
62
63
64
65
66
67
68
69
70
#!/usr/bin/env python3
# /// script
# requires-python = ">=3.10"
# dependencies = ["bornagain>=25,<26"]
# ///
"""
Off-specular simulation showing a prominent Yoneda peak.

Sample: vacuum V | mixed M | substrate S.

Layer M contains a polydisperse 2D random assembly of cylindrical
particles P in vacuum.

Critical angle between vacuum and layer M: 2 deg.

The refractive index of substrate S equals the effective medium
index of layer M (linear mixing rule) so that we get no reflection
from the M/S interface. This leaves the V/M Yoneda peak as the
dominant feature.
"""
import bornagain as ba
ba.require_versions("bornagain>=25,<26")
from bornagain import deg, nm

# Target critical angle V->M: alpha_c = 2 deg
# delta_eff = alpha_c**2 / 2 = (2*pi/180)**2 / 2 = 6.09e-4
# Ambient = vacuum (delta_A=0); linear mixing at f=0.5:
#   delta_eff = f*delta_P  =>  delta_P = 2*delta_eff
DELTA_P   = 1.218e-3          # 2*DELTA_EFF
DELTA_EFF = 0.5*DELTA_P       # = 6.09e-4
H         = 3*nm               # layer thickness = cylinder height


def get_sample():
    particle_mat  = ba.RefractiveMaterial("Particle",  (0.86, 0.24, 0.18),
                                          DELTA_P, 0)
    substrate_mat = ba.RefractiveMaterial("Substrate", (0.28, 0.57, 0.82),
                                          DELTA_EFF, 0)

    # R = 5±1 nm cylinders, H=2 nm; polydispersity smears F(q_z) oscillations
    vacuum_layer    = ba.Layer(ba.Vacuum())
    mixed_layer     = ba.Layer(ba.Vacuum(), H)
    ff = ba.Cylinder(5*nm, H)
    particle = ba.Particle(particle_mat, ff)
    mixed_layer.deposit2D(ba.Dense2D(0.006, particle))
    substrate_layer = ba.Layer(substrate_mat)

    sample = ba.Sample()
    sample.addLayer(vacuum_layer)
    sample.addLayer(mixed_layer)
    sample.addLayer(substrate_layer)
    return sample


def get_simulation(sample):
    nscan = 200
    scan = ba.AlphaScan(nscan, 1.6*deg, 3.4*deg)
    scan.setIntensity(1e8)
    scan.setWavelength(0.1*nm)
    detector = ba.OffspecDetector(nscan, 1.6*deg, 3.4*deg, -.2*deg, +.2*deg)
    return ba.OffspecSimulation(scan, sample, detector)


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