import re
from pathlib import Path
import numpy as np
import escape as esc
esc.require("0.9.8")
Loading material database from C:\dev\escape-core\.venv-gpu\Lib\site-packages\escape\scattering\..\data\mdb\materials.db
Semiconductor reference curves¶
Curves requested from Sergey Stepanov's X-ray Server for structures used in semiconductor processing. Jobs were submitted one at a time, with a 60 s pause after each. Wavelength 1.540562 Å, σ polarization.
- Si0.80Ge0.20, 300 Å, pseudomorphic on Si (004). A fully strained SiGe channel.
- In0.53Ga0.47As, 500 Å, on InP (004). The lattice-matched alloy used for telecom lasers.
- Eight periods of Al0.30Ga0.70As (80 Å) / GaAs (60 Å) on GaAs (004). A quantum-well stack.
- GaN (0002). The symmetric reflection used on GaN device wafers.
- 250 Å silica on Si. A thermal-oxide film, uncorrelated roughness.
Symmetric diffraction uses esc.spechrxrd with "2x2", which is the matrix the server selected away from grazing incidence. The oxide section fits the diffuse rocking curve with esc.offspecrefl.
WL = 1.540562
SRC = esc.xrays(WL, units="angstrom")
K0 = 2.0 * np.pi / SRC.wavelength
ROOT = Path(".")
def load_curve(path):
angle, intensity = np.loadtxt(path, unpack=True)
return np.asarray(angle, float), np.asarray(intensity, float)
def case_paths(case_id):
folder = ROOT / "data" / case_id
dats = sorted(folder.glob("*.dat"))
tbls = sorted(path for path in folder.glob("*.tbl") if path.stat().st_size > 200)
if not dats or not tbls:
return None
return dats[-1], tbls[-1]
def parse_tbl(path):
text = Path(path).read_text(encoding="utf-8", errors="replace")
daa = None
match = re.search(
r"<d\(a\)/a>.*\|\s*([+-]?\d+(?:\.\d+)?(?:[Ee][+-]?\d+)?)",
text,
)
if match:
daa = float(match.group(1))
return {"text": text, "daa": daa}
def residual(server, model):
server = np.asarray(server, float)
model = np.asarray(model, float)
mask = (server > 0) & (model > 0) & np.isfinite(model)
ratio = server[mask] / model[mask]
scale = float(np.median(ratio))
dex = np.abs(np.log10(server[mask]) - np.log10(scale * model[mask]))
print(
f"points={mask.sum()} median(server/ESCAPE)={scale:.4g} "
f"median |log10|={np.median(dex):.3f} dex max={np.max(dex):.3f} dex"
)
def show_curve(kernel, angle, intensity, title, xlabel):
data = esc.data(angle, intensity, np.zeros_like(intensity), copy=True, name=title)
model = esc.model(kernel, data, residuals_scale="log", weight_type="none")
return model.show().config(
ylog=True, xlabel=xlabel, ylabel="Intensity", title=title
)
def hrxrd(sample, h, k, l, name):
theta = esc.var("theta")
p0 = K0 * esc.sin(theta * np.pi / 180.0)
kernel = esc.spechrxrd(p0, sample, h, k, l, 1.0, "2x2", source=SRC, name=name)
return kernel
def epitaxial_daa(a_sub, a_bulk, nu):
c12_c11 = nu / (1.0 - nu)
eps_par = (a_sub - a_bulk) / a_bulk
eps_perp = -2.0 * c12_c11 * eps_par
return (a_bulk * (1.0 + eps_perp) - a_sub) / a_sub
def alloy_layer(host, guest, x_guest, a_host, a_guest, nu_host, nu_guest, dens_host, dens_guest, a_sub, nu_sub):
host_cell = esc.unitcell(a_host, a_host, a_host, 90, 90, 90)
guest_cell = esc.unitcell(a_guest, a_guest, a_guest, 90, 90, 90)
substrate_cell = esc.unitcell(a_sub, a_sub, a_sub, 90, 90, 90)
alloy_cell = esc.alloy_unitcell(x_guest, host_cell, guest_cell)
nu = (1.0 - x_guest) * nu_host + x_guest * nu_guest
epi = esc.epitaxial_unitcell(alloy_cell, substrate_cell, 0.0, nu / (1.0 - nu))
density = (1.0 - x_guest) * dens_host + x_guest * dens_guest
material = esc.binary_alloy_crystal(host, guest, x_guest, density, epi)
a_bulk = (1.0 - x_guest) * a_host + x_guest * a_guest
return material, epitaxial_daa(a_sub, a_bulk, nu)
Si0.80Ge0.20 on Si (004)¶
A 300 Å pseudomorphic SiGe layer, the stack measured to check channel strain in CMOS. The server strain is the automatic cubic value da/a = 0.014814.
dat_path, tbl_path = case_paths("sige20_si004")
info = parse_tbl(tbl_path)
angle, intensity = load_curve(dat_path)
sige, daa = alloy_layer(
"Silicon", "Germanium", 0.20,
5.4309, 5.6578, 0.28, 0.273, 2.3293, 5.3244,
5.4309, 0.28,
)
print(f"server da/a={info['daa']:.6e} ESCAPE da/a={daa:.6e}")
silicon = esc.crystal("Silicon", density="mdb")
layer = esc.layer(sige, 300.0, 0.0)
sample = esc.multilayer(frgr=esc.air(), bkgr=esc.substrate(silicon, 0.0))
sample.add(layer)
kernel = hrxrd(sample, 0, 0, 4, "SiGe (004)")
model = np.asarray(kernel(angle), dtype=float)
residual(intensity, model)
sige_view = show_curve(kernel, angle, intensity, "SiGe on Si (004)", "incidence [deg]")
sige_view
server da/a=1.481400e-02 ESCAPE da/a=1.480987e-02 points=121 median(server/ESCAPE)=0.8627 median |log10|=0.004 dex max=0.667 dex
In0.53Ga0.47As on InP (004)¶
A 500 Å layer of the alloy used for 1.55 µm lasers. It is nearly lattice-matched to InP; the server strain is da/a = -2.55e-4.
dat_path, tbl_path = case_paths("ingaas53_inp004")
info = parse_tbl(tbl_path)
angle, intensity = load_curve(dat_path)
ingaas, daa = alloy_layer(
"GaAs", "InAs", 0.53,
5.6532, 6.0584, 0.3117, 0.352, 5.3176, 5.667,
5.8687, 0.36,
)
print(f"server da/a={info['daa']:.6e} ESCAPE da/a={daa:.6e}")
inp = esc.crystal("InP", density="mdb")
layer = esc.layer(ingaas, 500.0, 0.0)
sample = esc.multilayer(frgr=esc.air(), bkgr=esc.substrate(inp, 0.0))
sample.add(layer)
kernel = hrxrd(sample, 0, 0, 4, "InGaAs (004)")
model = np.asarray(kernel(angle), dtype=float)
residual(intensity, model)
ingaas_view = show_curve(kernel, angle, intensity, "InGaAs on InP (004)", "incidence [deg]")
ingaas_view
server da/a=-2.553000e-04 ESCAPE da/a=-2.533920e-04 points=101 median(server/ESCAPE)=0.826 median |log10|=0.026 dex max=0.076 dex
Al0.30Ga0.70As / GaAs quantum wells¶
Eight periods of 80 Å AlGaAs and 60 Å GaAs on GaAs, the kind of stack used in laser and HEMT active regions. The server strain of the alloy is da/a = 8.76e-4, and both interfaces have 2 Å roughness.
dat_path, tbl_path = case_paths("algaas_gaas_mqw")
info = parse_tbl(tbl_path)
angle, intensity = load_curve(dat_path)
algaas, daa = alloy_layer(
"GaAs", "AlAs", 0.30,
5.6532, 5.6618, 0.3117, 0.324, 5.3176, 3.7293,
5.6532, 0.3117,
)
print(f"server alloy da/a=8.76e-4 ESCAPE da/a={daa:.6e}")
gaas_cell = esc.unitcell(5.6532, 5.6532, 5.6532, 90, 90, 90)
gaas = esc.crystal("GaAs", density="mdb", ucell=gaas_cell)
algaas_layer = esc.layer(algaas, 80.0, 2.0)
gaas_layer = esc.layer(gaas, 60.0, 2.0)
sample = esc.multilayer(frgr=esc.air(), bkgr=esc.substrate(gaas, 0.0))
stack = esc.layer_stack(repeat=8)
stack.add(algaas_layer)
stack.add(gaas_layer)
sample.add(stack)
kernel = hrxrd(sample, 0, 0, 4, "AlGaAs MQW")
model = np.asarray(kernel(angle), dtype=float)
residual(intensity, model)
mqw_view = show_curve(kernel, angle, intensity, "AlGaAs/GaAs MQW (004)", "incidence [deg]")
mqw_view
server alloy da/a=8.76e-4 ESCAPE da/a=8.768729e-04 points=121 median(server/ESCAPE)=0.8708 median |log10|=0.014 dex max=0.053 dex
GaN (0002)¶
Symmetric reflection from a GaN wafer. The server Bragg angle is 17.281°. GaN is hexagonal and the (0002) structure factor is not centrosymmetric.
dat_path, tbl_path = case_paths("gan_0002")
angle, intensity = load_curve(dat_path)
gan = esc.crystal("GaN", density="mdb")
sample = esc.multilayer(frgr=esc.air(), bkgr=esc.substrate(gan, 0.0))
kernel = hrxrd(sample, 0, 0, 2, "GaN (0002)")
model = np.asarray(kernel(angle), dtype=float)
residual(intensity, model)
gan_view = show_curve(kernel, angle, intensity, "GaN (0002)", "incidence [deg]")
gan_view
points=81 median(server/ESCAPE)=0.9331 median |log10|=0.002 dex max=0.027 dex
Silica on silicon.¶
A 250 Å thermal-oxide film on silicon. The curve was calculated by the X-ray Server and saved as data/silica_on_si/tds27193.dat. The roughness is uncorrelated. The oxide roughness is 4 Å, the buried silicon roughness is 3 Å, the lateral correlation length is 400 Å and the Hurst exponent is 0.8.
The scan is a rocking curve: θ from 0.08° to 0.92° at fixed 2θ = 1°. Silica is entered from the server susceptibility, χ₀ = (−1.4×10⁻⁵, 1.8×10⁻⁷), because that name is not in the material database. The conversion to a scattering-length density at this wavelength is ρ = −π χ / λ².
The roughness amplitudes, the lateral correlation length, the Hurst exponent and the oxide thickness stay at the values used to calculate the curve. The optimizer adjusts I0, which starts at 0.8.
thickness = esc.par("Oxide thickness", 250.0, units="Å", fixed=True)
oxide_sigma = esc.par("Oxide roughness", 4.0, units="Å", fixed=True, userlim=[1.0, 10.0])
substrate_sigma = esc.par("Substrate roughness", 3.0, units="Å", fixed=True, userlim=[0.5, 8.0])
lateral = esc.par("Lateral correlation", 400.0, units="Å", fixed=True, userlim=[100.0, 2000.0])
hurst = esc.par("Hurst", 0.8, fixed=True, userlim=[0.2, 1.0])
chi = -1.4e-5 + 1j * 1.8e-7
sld = -np.pi * chi / WL ** 2
silica = esc.generic_amorphous(float(sld.real), float(sld.imag), name="Silica")
silicon = esc.crystal("Silicon", density="mdb", density_fixed=True, name="Silicon")
oxide_rough = esc.roughness(oxide_sigma, lateral=lateral, hurst=hurst, name="Oxide roughness")
buried_rough = esc.roughness(substrate_sigma, lateral=lateral, hurst=hurst, name="Si roughness")
film = esc.layer(silica, thickness, oxide_rough, name="Silica")
sample = esc.multilayer(
name="Silica/Si",
frgr=esc.air("Air"),
bkgr=esc.substrate(silicon, buried_rough, name="Si"),
)
sample.add(film)
sample.show(source=SRC)
theta = esc.var("theta")
degree = np.pi / 180.0
alpha_i = theta * degree
alpha_f = (1.0 - theta) * degree
wave = 2.0 * np.pi / SRC.wavelength
diffuse = esc.offspecrefl(
wave * (esc.cos(alpha_f) - esc.cos(alpha_i)),
wave * esc.sin(alpha_i),
wave * esc.sin(alpha_f),
sample,
source=SRC,
formalism="full",
name="Silica/Si",
)
I0 = esc.par("I0", 0.8, userlim=[0.5, 1.5])
I = I0 * diffuse
Io again puts 10⁴ counts on the brightest point of the server curve.
angle, measured = np.loadtxt("data/silica_on_si/tds27193.dat", unpack=True)
measured = np.asarray(measured, float)
Io = 1.0e4 / np.max(measured)
errors = np.sqrt(measured / Io)
data = esc.data(angle, measured, errors, copy=True, name="Silica/Si")
model = esc.model(I, data, residuals_scale="none", weight_type="data", name="Silica/Si")
opt_silica = esc.levmar(
model,
xtol=1.0e-6,
ftol=1.0e-8,
gtol=1.0e-6,
maxiter=25,
maxfev=300,
nupdate=5,
epsfcn=1.0e-7,
)
opt_silica()
print("cost", opt_silica.best_cost)
print(
"oxide", oxide_sigma.value,
"substrate", substrate_sigma.value,
"lateral", lateral.value,
"I0", I0.value,
)
model.show().config(ylog=True, xlabel="theta [deg]", ylabel="Intensity [a.u.]")
cost 75.91411033491815 oxide 4.0 substrate 3.0 lateral 400.0 I0 1.0333160385618665
opt_silica
Name: Levenberg-Marquardt Parameters number: 7 Parameter Value +- Error Units Fixed I0 1.0333 +- 0.0019673 0 Oxide thickness 250 +- 0 Å 1 Oxide roughness 4 +- 0 Å 1 Lateral correlation 400 +- 0 Å 1 Hurst 0.8 +- 0 1 Silicon density 2.3293 +- 0 g/cm^3 1 Substrate roughness 3 +- 0 Å 1