Multilayers

This module provides methods for creating multilayer_obj and layer_obj instances. These classes are used for describing layered thin film samples with several or multiple layers.

The instances of multilayer_obj are used for the calculation of High Resolution X-ray Diffraction, Neutron and X-ray Specular Reflectivity, and Polarized Neutron Reflectivity.

escape.scattering.layer.layer(name, material, thkn=10, rough=1, bydensity=False, mdb_obj mdb=default_mdb)

Returns a layer object.

Parameters:
name: string

Layer name

material: material_obj or string

Material object or material name from the material database

thkn: parameter_obj or value

Layer thickness

rough: roughness_obj or value

RMS roughness

bydensity: bool

If True, the material is specified by density, otherwise by SLD.

mdb: mdb_obj

The material database mdb object.

Returns:

object of type ‘layer_obj’

escape.scattering.layer.magnetic_layer(name, material, b_phi, b_theta, thkn, rough, bydensity=False, mdb_obj mdb=default_mdb)

Returns magnetic layer object. The magnetization angles \(\phi\) and \(\theta\) define the magnetization components in the sample coordinate system as following

\[ \begin{align}\begin{aligned}M_x = cos(\phi) sin(\theta)\\ M_y = sin(\phi)\\ M_z = cos(\phi) cos(\theta)\end{aligned}\end{align} \]

The sample coordinate system is right-handed with X-axis directed towards the detector and Z-axis being normal to the sample plane. The magnetization angles \(\phi\) and \(\theta\) are chosen for the samples installed vertically, i.e. when the external magnetic field is directed along the sample Y-axis.

Parameters:
name: string

Layer name

material: material_obj

Material instance.

b_phi: parameter_obj or value

\(\phi\) angle in degrees between layer magnetization and XZ plane

b_theta: parameter_obj or value

\(\theta\) angle in degrees between projection of layer magnetization on XZ plane and Z-axis

thkn: parameter_obj or value

Layer thickness

rough: roughness_obj or value

RMS roughness

bydensity: bool

If True, the material is specified by density, otherwise by SLD.

mdb: mdb_obj

The material database mdb object.

Returns:

object of type ‘layer_obj’

escape.scattering.layer.substrate(name, material, rough, bydensity=False, mdb_obj mdb=default_mdb)

Returns a substrate instance.

Parameters:
name: string

Layer name

material: material_obj

Material description

rough: roughness_obj or value

RMS roughness

bydensity: bool

If True, the material is specified by density, otherwise by SLD.

mdb: mdb_obj

The material database mdb object.

Returns:

object of type layer_obj

escape.scattering.layer.magnetic_substrate(name, material, b_phi, b_theta, rough, bydensity=False, mdb_obj mdb=default_mdb)

Returns a magnetic substrate object. The magnetization angles \(\phi\) and \(\theta\) define the magnetization components in the sample coordinate system as following

\[ \begin{align}\begin{aligned}M_x = cos(\phi) sin(\theta)\\ M_y = sin(\phi)\\ M_z = cos(\phi) cos(\theta)\end{aligned}\end{align} \]

The sample coordinate system is right-handed with X-axis directed towards the detector and Z-axis being normal to the sample plane. The magnetization angles \(\phi\) and \(\theta\) are chosen for the samples installed vertically, i.e. when the external magnetic field is directed along the sample Y-axis.

Parameters:
name: string

Layer name

material: material_obj

Material description

b_phi: parameter_obj or value

\(\phi\) angle in degrees between layer magnetization and XZ plane

b_theta: parameter_obj or value

\(\theta\) angle in degrees between projection of layer magnetization on XZ plane and Z-axis

rough: roughness_obj or value

RMS roughness

bydensity: bool

If True, the material is specified by density, otherwise by SLD.

mdb: mdb_obj

The material database mdb object.

Returns:

object of type layer_obj

escape.scattering.layer.env(name, material, bydensity=False, mdb_obj mdb=default_mdb)

Returns a foreground, i.e. environment.

Parameters:
name: string

Layer name

material: material_obj

Material description

bydensity: bool

If True, the material is specified by density, otherwise by SLD.

mdb: mdb_obj

The material database mdb object.

Returns:

object of type ‘layer_obj’

escape.scattering.layer.air(name='Air')

Returns an air foreground.

Returns:

object of type ‘layer_obj’

escape.scattering.layer.layer_stack(name, formula=u'', repeat=1, bydensity=False, mdb_obj mdb=default_mdb, globals={})

Creates layerstack instance.

Parameters:
name: string

Layerstack name

formula: string

Layerstack formula

repeat: integer

repetition of layers in the stack

bydensity: bool

If True, the material is specified by density, otherwise by SLD.

mdb: mdb_obj

The material database mdb object.

Returns:

object of type ‘layerstack_obj’

escape.scattering.layer.multilayer(name, formula=u'', frgr=None, bkgr=None, bydensity=False, mdb_obj mdb=default_mdb, globals={})

Creates multilayer instance.

Parameters:
name: string

Multilayer name

formula: string

Multilayer formula

frgr: layer_obj

foreground, i.e. environment

bkgr: layer_obj

background, i.e. substrate

bydensity: bool

If True, the material is specified by density, otherwise by SLD.

mdb: mdb_obj

The material database mdb object.

Returns:

instance of ‘multilayer_obj’

escape.scattering.layer.roughness(name, rms, lateral=None, hurst=None)

Returns instance of ‘roughness_obj’.

Parameters:
rms: parameter_obj or value

root-mean-square roughness

lateral: parameter_obj or value

lateral correlation length of roughness

hurst: parameter_obj or value

Hurst parameter

Returns:

object of type ‘roughness_obj’

class escape.scattering.layer.roughness_obj

roughness_obj is a container for surface roughness parameters.

static convert(obj, name)

Converts the input object to a roughness object.

Parameters:
obj: roughness_obj or value

Roughness object or value

name: string

Roughness name

Returns:

roughness_obj: Roughness object instance.

hurst
Returns:

Hurst parameter value.

lateral
Returns:

Correlation length of lateral roughness.

name
Returns:

Object name.

num_of_params
Returns:

Number of parameters.

parameter(self, size_t i)

Get parameter object with ordinal index i.

Parameters:

i – Ordinal index of the parameter.

Returns:

Parameter object.

rms
Returns:

Root-mean-square roughness parameter value.

class escape.scattering.layer.layer_obj

‘layer_obj’ is a wrapper class for layers. It contains relevant parameters and material description for layer.

material

Returns material instance.

Returns:

material_obj instance

name

Returns object name.

Returns:

string value

num_of_params

Returns number of parameters.

Returns:

int value

parameter(self, size_t i)

Returns parameter object with index i.

Returns:

parameter_obj instance

roughness

Returns roughness instance. :return:

roughness_obj instance

thickness

Returns thickness value.

Returns:

double value

thkn

Returns thickness value.

Returns:

double value

class escape.scattering.layer.layerstack_obj

layerstack_obj is a wrapper class for layer stacks.

add(self, layer_obj lay)

Appends layer to stack.

Parameters:
lay: layer_obj

layer object

erase(self, size_t idx)

Erases layer with index ‘idx’ from stack.

erase_all(self)

Erases all layers from stack.

insert(self, size_t idx, layer_obj lay)

Inserts layer to stack.

Parameters:
idx: size_t

layer index to replace

lay: layer_obj

new layer object

min_thickness
Returns:

Minimal thickness of stack.

name

Returns object name.

Returns:

string value

num_of_params

Returns number of parameters.

Returns:

int value

parameter(self, size_t i)

Returns parameter object with index ‘i’.

Returns:

parameter_obj instance

set(self, size_t idx, layer_obj lay)

Replaces layer in stack.

Parameters:
idx: size_t

layer index to replace

lay: layer_obj

new layer object

total_thickness

Returns total thickness of stack.

Returns:

double value

class escape.scattering.layer.multilayer_obj

This class is used to describe layered samples. Layered samples can consist of layers or layer stacks. The topmost and bottommost layers are called the foreground (environment) and background (substrate), respectively, and are considered to have infinite thickness. Normally, the foreground layer has a zero scattering length density. If not, the wave-vector components of the incident wave will be corrected according to Snell’s law.

add(self, obj)

Appends layer or layerstack

Parameters:
obj: layer_obj or layerstack_obj

layer or layerstack object

erase(self, size_t idx)

Erases layer or layerstack

Parameters:
idx: size_t

layer index to replace

erase_all(self)

Erases all layers

Parameters:
idx: size_t

layer index to replace

insert(self, size_t idx, obj)

Inserts layer or layerstack

Parameters:
idx: size_t

layer index to replace

obj: layer_obj or layerstack_obj

layer or layerstack object

min_thickness

Return minimal thickness of multilayer

Returns:

double value

move_down(self, size_t idx)

Moves layer or layerstack down

Parameters:
idx: size_t

layer index to replace

move_up(self, size_t idx)

Moves layer or layerstack up

Parameters:
idx: size_t

layer index to replace

name

Returns object name.

Returns:

string value

num_of_params

Returns number of parameters.

Returns:

int value

parameter(self, size_t i)

Returns parameter object with index ‘i’.

Parameters:
i: size_t

parameter index

Returns:

parameter_obj instance

set(self, size_t idx, obj)

Replaces layer or layerstack

Parameters:
idx: size_t

layer index to replace

obj: layer_obj or layerstack_obj

layer or layerstack object

total_thickness

Return total thickness of multilayer

Returns:

double value