Layer
A layer is made of a Material
and has a certain thickness.
The other two lateral dimensions are assumed to be infinite.
It also holds information on the thickness distribution via the thickness_fwhm
in forward scattering or via the roughness
in grazing-incidence geometry.
The following parameters are Var
objects and can be fit:
thickness
roughness
thickness fwhm
All values are given in nanometer.
Thickness
The thickness defines the only dimension given for a Layer
.
In forward geometry the thickness is given along the beam propagation direction.
In gracing incidence geometry the thickness is assumed to be almost perpendicular to the beam propagation direction, depending on the incidence angle specified in the Sample
.
Thickness FWHM
This parameter is only used in forward scattering geometry.
The thickness_fwhm
value gives the full width half maximum of an assumed Gaussian distribution of thickness values around thickness
.
Contributions to the scattering intensity originating from different thicknesses are treated incoherently, see Thickness and divergence distributions.
Roughness
The roughness is only taken into account in grazing incidence geometry.
The roughness
specifies the \(\sigma\) value of a Gaussian distribution around the thickness
value.
In contrast to the thickness_fwhm
, the roughness
is treated coherently.
How the roughness is treated is defined in the Sample
by the specified roughness model, see Sample.
Setting up a layer
import nexus as nx
mat = nx.Material.Template(nx.lib.material.Fe2O3)
layer = nx.Layer(id = "my iron oxide layer",
thickness = 1000, # in nanometer
material = mat,
roughness = 30,
thickness_fwhm = 50)
print(layer)
Here, we have defined a material first, followed by the Layer
definition.
You can define the Material
directly in the layer initialization.
Then, a new Material
object is automatically created by the Layer
.
This is helpful in setting up the experiment for non-resonant calculations and fitting.
layer = nx.Layer(id = "my iron oxide layer",
thickness = 1000, # in nanometer
roughness = 30,
thickness_fwhm = 50
composition = [["Fe", 2], ["O", 3]],
density = 5.3)
print(layer)
For convenience, the density and composition of a Material
can also be accessed via the Layer
directly.
This is not possible for nuclear properties of the Material
.
# access density via material properties
layer.material.density = 6.1
print(layer)
# access density via layer directly
layer.density = 4.9
print(layer)
Note
Changing material properties via one Layer
will change all Layers
referencing to the same material.
Therefore, this procedure should only be done when the material was defined automatically in the Layer
initialization.
Then, no other Layer
is using this Material
.
Layer methods
There are several methods to retrieve the scattering matrix, refractive index, critical angle and many other properties of a layer. For example,
# refractive index of a layer
ref_index = layer.ElectronicRefractiveIndex(energy = 14412.5)
print(ref_index)
# outputs (0.9999952911043145+1.4925088081386838e-07j)
# critical angle at 16 keV
ang = layer.CriticalAngle(energy=16e3)
print(ang * 180/np.pi)
# outputs (0.1583868640530339)
Notebooks
Please have a look to the API Reference for more information.