File size: 1,190 Bytes
aed74e2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
from __future__ import annotations

import sys
from pathlib import Path

try:
    from neon import Neon
except ImportError:
    sys.path.insert(0, str(Path(__file__).resolve().parent.parent))
    from neon import Neon


def main() -> None:
    model = Neon.from_pretrained()
    cases = [
        {"thickness": 0.12, "epsilon_real": 2.05, "wavelength": 0.84},
        {"thickness": 0.28, "epsilon_real": 2.56, "wavelength": 0.80},
        {"thickness": 0.46, "epsilon_real": 4.00, "wavelength": 0.84},
    ]

    for index, case in enumerate(cases, start=1):
        result = model.predict(**case)
        print(
            f"Case {index}: thickness={case['thickness']:.2f} um, "
            f"epsilon_real={case['epsilon_real']:.2f}, wavelength={case['wavelength']:.2f} um"
        )
        print(
            f"  transmission={result['transmission']:.6f}, "
            f"reflection={result['reflection']:.6f}, intensity={result['intensity']:.6f}"
        )

    # For verification, rerun the matching slab configuration with the direct Neon solver
    # and compare the resulting summary.csv transmission, reflection, and peak intensity values.


if __name__ == "__main__":
    main()