In [1]:
import numpy as np
import escape as esc

esc.require("0.9.8")
Loading material database from /home/dkor/Data/Development/workspace_escape/escape-core/python/src/escape/scattering/../data/mdb/materials.db

Interfacial Roughness and Proximity Effects in Superconductor/Ferromagnet CuNi/Nb Heterostructures¶

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.

In [2]:
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)
In [3]:
Cap_common = esc.amorphous("Capping", density="mdb")
CuNi_common = esc.amorphous("CuNi", density="mdb")

SiO2Lay = esc.layer(
    "Layer: SiO2", "SiO2", thkn="3+-2nm", rough="1+-1nm", bydensity=True
)
NbLay = esc.layer("Layer: nb", "Nb", thkn="10+-2nm", rough="1+-1nm", bydensity=True)
Sub = esc.substrate("Substrate: Si", "Si", rough="1+-1nm", bydensity=True)

sample_10 = esc.multilayer(
    "CuNi/Nb/Si_10",
    formula="Cap_common(10+-8nm,1+-1nm)/CuNi_common(10+-5nm,1+-1nm)/NbLay/SiO2Lay//Sub",
    bydensity=True,
    globals=globals(),
)
sample_21 = esc.multilayer(
    "CuNi/Nb/Si_21",
    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)
Out[3]:
In [4]:
Qz = esc.var("qz")
Qz0 = esc.var("qz0")
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("Specrefl_10", Qz, sample_10, "matrix", source=src)
specrefl_10 = esc.average_normal(specrefl_10, fwhm_10, Qz, Qz0)

specrefl_21 = esc.specrefl("Specrefl_21", Qz, sample_21, "matrix", source=src)
specrefl_21 = esc.average_normal(specrefl_21, fwhm_21, Qz, Qz0)
In [5]:
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
In [6]:
qz, y, err = np.loadtxt(
    "data/JAP15/XRR/Silicon/s10/ASCII/Si10.dat", unpack=True, skiprows=2
)
qz = qz * 10
dobj10 = esc.data("S10.dat", 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("S21.dat", qz, y, err, copy=True)
In [7]:
mobj10 = esc.model("Model 10", I10, dobj10, residuals_scale="log", weight_type="none")
mobj21 = esc.model("Model 21", I21, dobj21, residuals_scale="log", weight_type="none")
In [9]:
opt = esc.diffevol(
    "DiffEvol",
    [mobj10, mobj21],
    popsize=7,
    maxiter=50,
    ftol=1e-3,
    nupdate=1,
    strategy="sqgabin",
    polish_final_maxiter=50,
    polish_candidate_maxiter=0,
)
# opt()
opt.show().config_model(ylog=True)
Out[9]:
In [10]:
opt
Out[10]:
Name: DiffEvol            	Parameters number:         22
Parameter           	Value          	+-	Error     	Units     	Fixed
FWHM_10             	           0.03	+-	0         	          	    0
Capping density     	          3.459	+-	0.0056259 	g/cm^3    	    0
Layer-Capping: Thickness	         4.4205	+-	0.010958  	nm        	    0
Layer-Capping: Roughness Sigma	              2	+-	0         	nm        	    0
CuNi density        	         9.6023	+-	0.0010653 	g/cm^3    	    0
Layer-CuNi: Thickness	         14.952	+-	0.074112  	nm        	    0
Layer-CuNi: Roughness Sigma	        0.53649	+-	0.0028486 	nm        	    0
Nb density          	         8.9139	+-	0.011239  	g/cm^3    	    0
Layer: nb: Thickness	         10.157	+-	0.090865  	nm        	    0
Layer: nb: Roughness Sigma	              2	+-	0         	nm        	    0
SiO2 density        	           3.93	+-	0         	g/cm^3    	    0
Layer: SiO2: Thickness	              1	+-	0.053145  	nm        	    0
Layer: SiO2: Roughness Sigma	         1.3737	+-	0.028826  	nm        	    0
Si density          	         1.9569	+-	0.080909  	g/cm^3    	    0
Substrate: Si: Roughness Sigma	        0.89732	+-	0.019177  	nm        	    0
Bgr 10              	         1.7058	+-	0.16225   	x1e-06	   	    0
FWHM_21             	       0.014865	+-	0.00021369	          	    0
Layer-Capping: Thickness	         8.7716	+-	0.0085063 	nm        	    0
Layer-Capping: Roughness Sigma	         1.7668	+-	0.0059497 	nm        	    0
Layer-CuNi: Thickness	         34.009	+-	0.074305  	nm        	    0
Layer-CuNi: Roughness Sigma	        0.48234	+-	0.0032619 	nm        	    0
Bgr 21              	         1.6461	+-	0.27029   	x1e-06	   	    0
In [11]:
w10 = sample_10.show(source=src)
w21 = sample_21.show(source=src)
esc.show(w10, w21)
Out[11]:
In [ ]: