Multilayers¶
The escape.scattering.layer module provides methods for creating of multilayer_obj and layer_obj instances These classes are used for description of layered thin film samples with several or multiple layers.
The instances of multilayer_obj 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)¶
Returns 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)¶
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:
- 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
- Returns:
object of type ‘layer_obj’
- escape.scattering.layer.substrate(name, material_obj material, rough)¶
Returns 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)¶
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:
- 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
- Returns:
object of type layer_obj
- escape.scattering.layer.env(name, material_obj material)¶
Returns a foreground, i.e. environment.
- Parameters:
- material: material_obj
Material description
- Returns:
object of type ‘layer_obj’
- escape.scattering.layer.air(name)¶
Returns an air foreground.
- Returns:
object of type ‘layer_obj’
- escape.scattering.layer.layer_stack(name, repeat)¶
Returns 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)¶
Returns 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)¶
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.
- 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¶
‘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¶
‘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¶
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