Scattering Length
Functions to calculate the electronic and nuclear scattering lengths E and N and set the computation method.
- nexus.GetAtomicScatteringFactorCXRO()
Get the calculation method of the atomic scattering factors. If
False
the scattering factors are calculated from Klein-Nishina cross sections and tabulated photo-effect cross sections. IfTrue
the tabulated scattering factors from the Center of X-ray Optics are used.- Returns:
atomic_scattering_factor_cxro.
- Return type:
bool
- nexus.SetAtomicScatteringFactorCXRO(cxro)
Set the calculation method of the atomic scattering factors.
- Parameters:
cxro (bool) – Determines the calculation of the atomic scattering factors. If
False
the scattering factors are calculated from Klein-Nishina scattering and tabulated photo-effect cross sections. IfTrue
the tabulated scattering factors from the Center of X-ray Optics are used.
- nexus.ElectronicScatteringLength(element, energy, cxro)
Calculates the electronic scattering length as given in Eq.(4.11) [Roehlsberger]. Note that the definition differs by a factor of \(1/(2\pi)\) from the one given in Eq. (4, 16) [Sturhahn]. The Debye-Waller factor is one here, because only forward and grazing incidence scattering are considered. An additional relativistic correction is applied to the real part, after Eq. (78) [Henke].
- Parameters:
element (
Element
) – Element for which the scattering length is calculated.energy (float) – X-ray energy (eV).
cxro (bool) – Determines the calculation of the atomic scattering factors. If
False
the scattering factors are calculated from Klein-Nishina cross sections and tabulated photo-effect cross sections (as in CONUSS). IfTrue
the tabulated scattering factors from the Center of X-ray Optics are used (as in GenX).
- Returns:
Electronic scattering length (m).
- Return type:
complex
- nexus.ElectronicScatteringLengthTheory(element, energy)
Calculates the electronic scattering length as defined in Eq.(4.11) [Roehlsberger]. Note that the definition differs by a factor of \(1/(2\pi)\) from the one given in Eq. (4, 16) [Sturhahn]. Klein Nishina cross sections are calculated after [KleinNishina]. Photoeffect cross sections are calculated after [Smith]. The Debye-Waller factor is one here, because only forward and grazing incidence scattering are considered. An additional relativistic correction is applied to the real part, after Eq. (78) [Henke].
- Parameters:
element (
Element
) – Element for which the scattering length is calculated.energy (float) – X-ray energy (eV).
- Returns:
Electronic scattering length (m).
- Return type:
complex
- nexus.ElectronicScatteringLengthCXRO(element, energy)
Calculates the electronic scattering length as defined in Eq.(4.11) [Roehlsberger] but with the atomic scattering factors from the CXRO database [Henke]. Note that the definition differs by a factor of \(1/(2\pi)\) from the one given in Eq. (4, 16) [Sturhahn]. The complex correction to the refractive index in [Roehlsberger] and [Henke] are defined differently. The factor \(E_i\) from [Roehlsberger] is \(E_i = -r_e (f_1 - i f_2)\). The Debye-Waller factor is one here, because only forward and grazing incidence scattering are considered. An additional relativistic correction is applied to the real part, after Eq. (78) [Henke].
- Parameters:
element (
Element
) – Element for which the scattering length is calculated.energy (float) – X-ray energy (eV).
- Returns:
Electronic scattering length (m).
- Return type:
complex
- nexus.ElectronicScatteringLengthMatrix(*args)
Overload 1:
Electronic scattering length in the base of \(\sigma\) and \(\pi\) polarization, Eq. (4.11), [Roehlsberger]. Note that the definition differs by a factor of \(1/(2\pi)\) from the one given in Eq. (4, 16) [Sturhahn]. The Debye-Waller factor is one here, because only forward and grazing incidence scattering are considered. An additional relativistic correction is applied to the real part, after Eq. (78) [Henke].
- Parameters:
element (
Element
) – Element for the calculation.energy (float) – X-ray energy (eV).
cxro (bool) – Determines the calculation of the atomic scattering factors. If
False
the scattering factors are calculated from Klein-Nishina cross sections and tabulated photo-effect cross sections (as in CONUSS). IfTrue
the tabulated scattering factors from the Center of X-ray Optics are used (as in GenX).
- Returns:
2x2 matrix of the electronic scattering length (m).
- Return type:
ndarray
Overload 2:
Electronic scattering length in the base of \(\sigma\) and \(\pi\) polarization, Eq. (4.11), [Roehlsberger]. Note that the definition differs by a factor of \(1/(2\pi)\) from the one given in Eq. (4, 16) [Sturhahn]. The Debye Waller factor is one here, because only forward and grazing incidence scattering are considered. An additional relativistic correction is applied to the real part, after Eq. (78) [Henke]. The electronic scattering length is calculated around the transition energy of
MoessbauerIsotope
.- Parameters:
element (
Element
) – Element for the calculation.isotope (
MoessbauerIsotope
) – TheMoessbauerIsotope
for which the electronic scattering length should be calculated.detuning (list or ndarray) – Detuning values around the isotope transition energy.
cxro (bool) – Determines the calculation of the atomic scattering factors. If
False
the scattering factors are calculated from Klein-Nishina cross sections and tabulated photo-effect cross sections (as in CONUSS). IfTrue
the tabulated scattering factors from the Center of X-ray Optics are used (as in GenX).
- Returns:
Array of 2x2 matrices of the electronic scattering length (m).
- Return type:
array
- nexus.NuclearScatteringLength(material, isotope, detuning, calc_transitions=True)
Nuclear scattering length in the base of \(\sigma\) and \(\pi\) polarization. Eq. (11), [Sturhahn]. Note that the definition differs by a factor of \(1/(2\pi)\) from the one given in Eq. (11, 16) [Sturhahn]. The nuclear scattering length is calculated around the transition energy of
MoessbauerIsotope
.- Parameters:
material (
Material
) – Material for the X-ray interaction.isotope (
MoessbauerIsotope
) – TheMoessbauerIsotope
for which the nuclear scattering length should be calculated.detuning (list or ndarray) – Detuning values around the isotope transition energy.
calc_transition (bool) – Specifies if the nuclear transitions of the material are calculated before the nuclear scattering length is determined.
- Returns:
Array of 2x2 matrices of the nuclear scattering length (m).
- Return type:
array
- nexus.MaterialWeightedScatteringLength(material, energy)
Electronic scattering length for a material. Calculation mode is defined by the function
SetAtomicScatteringFactorCXRO()
.- Parameters:
material (
Material
) – Material for the calculation.energy (float) – Energy for the calculation in eV.
- Returns:
Electronic scattering length (1/m^2).
- Return type:
complex
- nexus.MaterialWeightedScatteringLengthMatrix(*args)
Overload 1:
Electronic scattering length for a material in the base of \(\sigma\) and \(\pi\) polarization. Calculation mode is defined by the function
SetAtomicScatteringFactorCXRO()
. SeeElectronicScatteringLength()
.- Parameters:
material (
Material
) – Material for the calculation.energy (float) – Energy for the calculation in eV.
- Returns:
2x2 matrix electronic scattering length (1/m^2).
- Return type:
array
Overload 2:
Electronic scattering length for a material in the base of \(\sigma\) and \(\pi\) polarization for a detuning range. Calculation mode is defined by the function
SetAtomicScatteringFactorCXRO()
. SeeElectronicScatteringLength()
.- Parameters:
material (
Material
) – Material for the calculation.( (isotope) – class:MoessbauerIsotope): The
MoessbauerIsotope
for the calcuaiton.detuning (list or ndarray) – Detuning values around the isotope transition energy.
- Returns:
Array of 2x2 matrices of the electronic scattering length (1/m^2).
- Return type:
array
- nexus.MaterialWeightedNuclearScatteringLength(material, isotope, detuning_grid, calc_transitions)
Nuclear scattering length in the base of \(\sigma\) and \(\pi\) polarization already weighted by the isotope density.
- Parameters:
material (
Material
) – Material for the X-ray interaction.isotope (
MoessbauerIsotope
) – TheMoessbauerIsotope
for which the nuclear scattering length should be calculated.detuning (list or ndarray) – Detuning values around the isotope transition energy.
calc_transition (bool) – Specifies if the nuclear transitions of the material are calculated before the nuclear scattering length is determined.
- Returns:
Array of 2x2 matrices of the nuclear scattering length (1/m^2).
- Return type:
array
- nexus.MaterialWeightedCoherentScatteringLength(material, isotope, detuning_grid, calc_transitions)
Coherent (electronic + nuclear) scattering length in the base of \(\sigma\) and \(\pi\) polarization already weighted by the material properties.
- Parameters:
material (
Material
) – Material for the X-ray interaction.isotope (
MoessbauerIsotope
) – TheMoessbauerIsotope
for which the nuclear scattering length should be calculated.detuning (list or ndarray) – Detuning values around the isotope transition energy.
calc_transition (bool) – Specifies if the nuclear transitions of the material are calculated before the nuclear scattering length is determined.
- Returns:
Array of 2x2 matrices of the nuclear scattering length (1/m^2).
- Return type:
array
Examples
# electronic scattering length of 20 keV photons in iron
Fe = nx.Element(element = "Fe")
scattering_length = nx.ElectronicScatteringLength(Fe, 20e3, cxro = True)
print(scattering_length)
# nuclear scattering length at 57-Fe transition energy
mat_Fe = nx.Material.Template(nx.lib.material.Fe_enriched)
site1 = nx.Hyperfine(magnetic_field = 33)
mat_Fe.hyperfinesites = [site1]
detuning = np.linspace(-200, 200, 201)
scattering_length = nx.NuclearScatteringLength(mat_Fe, nx.lib.moessbauer.Fe57, detuning)
print(scattering_length)