import numpy as np
import escape as esc
esc.require("0.9.8")
Loading material database from C:\dev\escape-core\python\src\escape\scattering\..\data\mdb\materials.db
Interfacial Roughness and Proximity Effects in Superconductor/Ferromagnet CuNi/Nb Heterostructures¶
This notebook fits a multilayer specular X-ray reflectivity example with interfacial roughness and proximity effects. It is a good reference for how structural parameters, roughness, and resolution corrections enter a realistic reflectivity workflow.
Authors: Yu. Khaydukov, R. Morari, O. Soltwedel, T. Keller, G. Christiani, G. Logvenov, M. Kupriyanov, A. Sidorenko, and B. Keimer
Citation: Journal of Applied Physics 118, 213905 (2015); doi: 10.1063/1.4936789
In this study, we present the results of fitting experimental data from the publication mentioned above. We selected data from two samples, where the CuNi layers differ in terms of thickness and roughness, to showcase the capabilities of a simultaneous fit with shared parameters. Rather than fitting the Scattering Length Densities (SLDs), we will focus on fitting the mass densities of the layer compounds.
This notebook also demonstrates how to add temporary records to the default material database. This approach allows new material records to be kept within the notebook alongside the code, rather than creating a new local material database.
src = esc.xrays(0.1540562, "nm")
Capping = {
"name": "Capping",
"type": "amorphous",
"density": 2.32,
"atoms": [
{"Si": {"repeat": 1}},
],
}
CuNi = {
"name": "CuNi",
"type": "amorphous",
"density": 8.93,
"atoms": [
{"Cu": {"repeat": 1}},
{"Ni": {"repeat": 1}},
],
}
SiO2 = {
"name": "SiO2",
"type": "amorphous",
"density": 2.62,
"atoms": [
{"Si": {"repeat": 1}},
{"O": {"repeat": 2}},
],
}
from escape.scattering.mdb import default_mdb
default_mdb.add(Capping)
default_mdb.add(CuNi)
default_mdb.add(SiO2)
Cap_common = esc.amorphous("Capping", density="mdb")
CuNi_common = esc.amorphous("CuNi", density="mdb")
SiO2Lay = esc.layer(
"SiO2", thkn="3+-2nm", rough="1+-1nm", bydensity=True
)
NbLay = esc.layer("Nb", thkn="10+-2nm", rough="1+-1nm", bydensity=True)
Sub = esc.substrate("Si", rough="1+-1nm", bydensity=True)
sample_10 = esc.multilayer(
formula="Cap_common(10+-8nm,1+-1nm)/CuNi_common(10+-5nm,1+-1nm)/NbLay/SiO2Lay//Sub",
bydensity=True,
globals=globals(),
)
sample_21 = esc.multilayer(
formula="Cap_common(10+-8nm,1+-1nm)/CuNi_common(30+-5nm,1+-1nm)/NbLay/SiO2Lay//Sub",
bydensity=True,
globals=globals(),
)
w10 = sample_10.show(source=src)
w21 = sample_21.show(source=src)
esc.show(w10, w21)
Qz = esc.var("qz")
fwhm_10 = esc.par("FWHM_10", 0.005, userlim=[0.003, 0.03], fixed=False)
fwhm_21 = esc.par("FWHM_21", 0.005, userlim=[0.003, 0.03], fixed=False)
specrefl_10 = esc.specrefl(Qz, sample_10, "matrix", source=src)
specrefl_10 = esc.average_normal(specrefl_10, fwhm_10, Qz)
specrefl_21 = esc.specrefl(Qz, sample_21, "matrix", source=src)
specrefl_21 = esc.average_normal(specrefl_21, fwhm_21, Qz)
B10 = esc.par("Bgr 10", 1, scale=1e-6, userlim=[0, 5])
B21 = esc.par("Bgr 21", 1, scale=1e-6, userlim=[0, 5])
I10 = specrefl_10 + B10
I21 = specrefl_21 + B21
qz, y, err = np.loadtxt(
"data/JAP15/XRR/Silicon/s10/ASCII/Si10.dat", unpack=True, skiprows=2
)
qz = qz * 10
dobj10 = esc.data(qz, y, err, copy=True)
qz, y, err = np.loadtxt(
"data/JAP15/XRR/Silicon/s21/ASCII/Si21.dat", unpack=True, skiprows=2
)
qz = qz * 10
dobj21 = esc.data(qz, y, err, copy=True)
mobj10 = esc.model(I10, dobj10, residuals_scale="sqrt", weight_type="none", cost_weight=1.0, normalize_cost=True)
mobj21 = esc.model(I21, dobj21, residuals_scale="sqrt", weight_type="none", cost_weight=1.0, normalize_cost=True)
opt = esc.diffevol(
[mobj10, mobj21],
popsize=7,
maxiter=50,
ftol=1e-3,
nupdate=1,
strategy="best1bin",
polish_final_maxiter=50,
polish_candidate_maxiter=0,
)
opt()
opt.show().config_model(ylog=True)
opt
Name: Differential Evolution Parameters number: 22 Parameter Value +- Error Units Fixed FWHM_10 0.0069825 +- 0.00077151 0 Capping density 2.9796 +- 0.0041344 g/cm^3 0 Cap_common Thickness 12.214 +- 0.0073694 nm 0 Cap_common Roughness 1.5 +- 0 nm 0 CuNi density 9.4693 +- 0.0010195 g/cm^3 0 CuNi_common Thickness 13.849 +- 0.088585 nm 0 CuNi_common Roughness 0.66725 +- 0.0025419 nm 0 Nb Density 8.9907 +- 0.0083987 0 Layer: Thickness 12 +- 0.11427 nm 0 Layer: Roughness Sigma 2 +- 0 nm 0 SiO2 Density 1.8188 +- 0.24649 0 Layer: Thickness 1.9217 +- 0.084548 nm 0 Layer: Roughness Sigma 1.6308 +- 0.029865 nm 0 Si Density 3.495 +- 0 0 Substrate: Roughness Sigma 0.78057 +- 0.059601 nm 0 Bgr 10 4.5164 +- 0.15488 x1e-06 0 FWHM_21 0.016671 +- 0.00021063 0 Cap_common Thickness 8.5979 +- 0.0074399 nm 0 Cap_common Roughness 1.5 +- 0 nm 0 CuNi_common Thickness 32.944 +- 0.088769 nm 0 CuNi_common Roughness 0.60802 +- 0.0026498 nm 0 Bgr 21 5 +- 0.24562 x1e-06 0
w10 = sample_10.show(source=src)
w21 = sample_21.show(source=src)
esc.show(w10, w21)