GrazingSample

class nexus.GrazingSample(layers, geometry='r', angle=0.0, length=10, roughness='a', effective_thickness=0.3, drive_detuning=[], function_time=None, divergence=0.0, id='')

Bases: BasicSample

Constructor for GrazingSample.

Added in version 2.0.0.

Parameters:
  • layers (list) – List of Layer in order of beam propagation.

  • geometry (string) –

    Scattering geometry of the sample.

    • r - reflection in grazing incidence scattering

    • t - transmission in grazing incidence scattering

  • angle (float or Var) – Angle of incidence in grazing geometry (degree).

  • length (float) – length of the sample along beam direction. Only used for grazing geometry.

  • roughness (string) –

    Roughness model in grazing geometry.

    • n - no roughness

    • a - analytical model

    • e - effective density model

  • effective_thickness (float) – Layer thickness in the effective density model (nm).

  • drive_detuning (list or ndarray) – Detuning values for a sample on a Moessbauer drive.

  • function_time (FunctionTime) – A FunctionTime implementation of the user to describe sample motion. Must return the phase factor \(\phi(t) = k x(t)\), where \(k\) is the photon wave vector along beam direction and \(x(t)\) the sample motion along the beam propagation direction.

  • divergence (float or Var) – Divergence of the incidence angle given as the FWHM of the divergence (deg).

  • id (string) – User identifier.

layers

List of Layer in order of beam propagation.

Type:

list

geometry

Scattering geometry of the sample.

  • r - reflection in grazing incidence scattering

  • t - transmission in grazing incidence scattering

Type:

string

angle

Angle of incidence in grazing geometry (degree).

Type:

float or Var

length

length of the sample along beam direction. Only used for grazing geometry.

Type:

float

roughness

Roughness model in grazing geometry.

  • n - no roughness

  • a - analytical model

  • e - effective density model

Type:

string

effective_thickness

Layer thickness in the effective density model (nm).

Type:

float

drive_detuning

Detuning values for a sample on a Moessbauer drive.

Type:

list or ndarray

function_time

A FunctionTime implementation of the user to describe sample motion. Must return the phase factor \(\phi(t) = k x(t)\), where \(k\) is the photon wave vector along beam direction and \(x(t)\) the sample motion along the beam propagation direction.

Type:

FunctionTime

divergence

Divergence of the incidence angle given as the FWHM of the divergence (deg).

Type:

float or Var

id

User identifier.

Type:

string

effective_coordinates

Layer coordinates in the effective density model.

Type:

list

effective_layers

List of EffectiveLayer objects.

Type:

list

EffectiveLayerSystem(nuclear)

Create an effective density model from the sample. Electronic scattering factors and matrices are always calculated.

Parameters:

nuclear (bool) – Calculate the matrices for nuclear scattering in addition to the electronic ones.

ElectronicAmplitude(energy)

Calculates the relative electronic amplitude behind the sample. The geometry (reflection, transmission) is determined from the geometry.

Parameters:

energy (float) – X-ray energy (eV)

Returns:

Electronic amplitude.

Return type:

complex

ElectronicAmplitudeMatrix(energy)

Calculates the relative electronic amplitude matrix behind the sample. The geometry (reflection, transmission) is determined from the geometry.

Parameters:

energy (float) – X-ray energy (eV)

Returns:

Electronic amplitude.

Return type:

complex

ElectronicAmplitudeThickness(energy, thickness)

Calculates the electronic X-ray field amplitude in the sample at a certain thickness.

Parameters:
  • energy (float) – X-ray energy (eV).

  • thickness (float) – Thickness value (nm).

Returns:

Electronic field amplitude in the sample.

Return type:

complex

ElectronicFieldAmplitude(energy, num_points)

Calculates the electronic X-ray field amplitude in the sample.

Parameters:
  • energy (float) – X-ray energy (eV).

  • num_points (int) – Number of points of the output.

Returns:

Electronic field amplitude in the sample.

Return type:

complex

ElectronicFieldIntensity(energy, num_points)

Calculates the electronic X-ray field intensity in the sample.

Parameters:
  • energy (float) – X-ray energy (eV).

  • num_points (int) – Number of points of the output.

Returns:

Electronic field intensity.

Return type:

float

ElectronicIntensity(energy)

Calculates the relative electronic field intensity behind the sample. The geometry (reflection, transmission) is determined from the geometry.

Parameters:

energy (float) – X-ray energy (eV)

Returns:

Electronic field intensity.

Return type:

complex

ElectronicIntensityThickness(energy, thickness)

Calculates the electronic X-ray field intensity in the sample at a certain thickness.

Parameters:
  • energy (float) – X-ray energy (eV).

  • thickness (float) – Thickness value (nm).

Returns:

Electronic field intensity.

Return type:

float

ElectronicReflectivity(energy)

Calculates the reflectivity intensity of the sample.

Parameters:

energy (float) – X-ray energy (eV).

Returns:

Reflectivity.

Return type:

float

ElectronicReflectivityAmplitude(energy)

Calculates the complex reflectivity amplitude of the sample.

Parameters:

energy (float) – X-ray energy (eV).

Returns:

Complex reflectivity amplitude.

Return type:

complex

ElectronicSampleMatrix(energy)

Calculates the electronic 2x2 sample matrix in grazing incidence geometry. It is the product of all layer matrices.

Parameters:

energy (float) – X-ray energy (eV).

Returns:

Complex 2x2 matrix.

Return type:

ndarray

ElectronicSampleMatrixThickness(energy, thickness)

Calculates the electronic 2x2 sample matrix up to a certain sample thickness. It is the product of all layer matrices up to this thickness.

Parameters:
  • energy (float) – X-ray energy (eV).

  • thickness (float) – Thickness at which the sample matrix should be calculated (nm).

Returns:

Complex 2x2 matrix.

Return type:

ndarray

ElectronicTransmission(energy)

Calculates the transmission intensity of the sample in grazing incidence geometry.

Parameters:

energy (float) – X-ray energy (eV).

Returns:

Transmission.

Return type:

float

ElectronicTransmissionAmplitude(energy)

Calculates the complex transmission amplitude of the sample.

Parameters:

energy (float) – X-ray energy (eV).

Returns:

Complex reflectivity amplitude.

Return type:

complex

Ids()

List with all layer id of the sample.

Returns:

Layers ids.

Return type:

list

Interfaces()

A list with the positions of the layer interfaces.

Returns:

Position of the Layer interfaces.

Return type:

list

KzSigma(energy, angle_kz)

Calculates the product \(k_z \sigma\) for each layer in the sample. The product should be << 1 for the validity of the W matrix calculation.

Parameters:
  • energy (float) – X-ray energy (eV).

  • angle (float) – Incidence angle (deg).

Returns:

List of \(k_z \sigma\) values for each layer.

Return type:

list

LayerCenters()

A list with the center coordinates of all layers in the sample.

Returns:

Position of the Layer centers.

Return type:

list

ObjectMatrix(isotope, detuning, calc_transitions)

Calculates the detuning-dependent complex 2x2 object matrix.

Parameters:
  • isotope (MoessbauerIsotope) – Moessbauer isotope of the experiment.

  • detuning (list or ndarray) – n-dimensional array with detuning values.

  • calc_transitions (bool) – Set to True for calculations of the nuclear transitions in the object.

Returns:

List of complex 2x2 matrices.

Return type:

list

TotalThickness()

Calculates the total thickness of the sample.

Returns:

Total thickness of the sample (nm).

Return type:

float

TotalThicknessEffective()

Total thickness of the sample in the effective density model.

Returns:

Total thickness in the effective density model.

Return type:

float