Multilayers

This module contains factory functions for creation of multilayer_obj and layer_obj instances These classes are used for description of layered thin film samples with several or multiple layers.

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

escape.scattering.layer.layer(name, material_obj material, thkn, rough)

Factory function to create a layer object.

Parameters
material: material_obj

Material description

thkn: parameter_obj or value

Layer thickness

rough: roughness_obj or value

RMS roughness

Returns

object of type ‘layer_obj’

escape.scattering.layer.magnetic_layer(name, material_obj material, b_phi, b_theta, thkn, rough)

Factory function to create a magnetic layer object.

Parameters
material: material_obj

Material instance.

b_phi: parameter_obj or value

\(\phi\) angle in degrees Inplane angle between layer magnetization and direction of external magnetic field

b_theta: parameter_obj or value

\(\theta\) angle in degrees Out of plane angle layer magnetization and direction of external magnetic field

thkn: parameter_obj or value

Layer thickness

rough: roughness_obj or value

RMS roughness

Returns

object of type ‘layer_obj’

escape.scattering.layer.substrate(name, material_obj material, rough)

Factory function to create a substrate object.

Parameters
material: material_obj

Material description

rough: roughness_obj or value

RMS roughness

Returns

object of type ‘layer_obj’

escape.scattering.layer.magnetic_substrate(name, material_obj material, b_phi, b_theta, rough)

Factory function to create a magnetic substrate object.

Parameters
material: material_obj

Material description

b_phi: parameter_obj or value

\(\phi\) angle in degrees between layer magnetization and direction of external magnetic field

b_theta: parameter_obj or value

:math:` heta` angle in degrees between layer magnetization and direction of external magnetic field

rough: roughness_obj or value

RMS roughness

Returns

object of type ‘layer_obj’

escape.scattering.layer.env(name, material_obj material)

Factory function to create a foreground, i.e. environment.

Parameters
material: material_obj

Material description

Returns

object of type ‘layer_obj’

escape.scattering.layer.air(name)

Factory function to create an air foreground.

Returns

object of type ‘layer_obj’

escape.scattering.layer.layer_stack(name, repeat)

Factory function to create an empty layerstack.

Parameters
repeat: integer

repetition of layers in the stack

Returns

object of type ‘layerstack_obj’

escape.scattering.layer.multilayer(name, layer_obj frgr, layer_obj bkgr)

Factory function to create a multilayer.

Parameters
frgr: layer_obj

foreground, i.e. environment

bkgr: layer_obj

background, i.e. substrate

Returns

instance of ‘multilayer_obj’

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

Factory function to create 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

Bases: object

roughness_obj is a container for surface roughness parameters.

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)
Returns

Parameter object with ordinal index i.

rms
Returns

Root-mean-square roughness parameter value

class escape.scattering.layer.layer_obj

Bases: object

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

material
Returns

Material instance.

name
Returns

Object name.

num_of_params
Returns

Number of parameters

parameter(self, size_t i)
Returns

Parameter object with ordinary index i.

roughness
Returns

Roughness instance

thkn
Returns

Value of thickness parameter.

class escape.scattering.layer.layerstack_obj

Bases: object

‘This class allows to create stacks of layers. It is useful if several layers are repeated many times.

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

name
Returns

Object name

num_of_params
Returns

Number of parameters

parameter(self, size_t i)
Returns

Parameter object with index ‘i’

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

class escape.scattering.layer.multilayer_obj

Bases: object

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

add(self, obj)

Appends layer or layerstack

erase(self, size_t idx)

Erases layer or layerstack

erase_all(self)

Erases all layers

insert(self, size_t idx, obj)

Inserts layer or layerstack

move_down(self, size_t idx)

Moves layer or layerstack down

move_up(self, size_t idx)

Moves layer or layerstack up

name
Returns

Object name

num_of_params
Returns

Number of parameters

parameter(self, size_t i)
profile_sld0
Returns

Profile as an array: [z0, sldre0, sldim0, z1, sldre1, sldim1,…]

set(self, size_t idx, obj)

Replaces layer or layerstack