# Neutron scattering potentials¶

## periodictable.nsf¶

Neutron scattering factors for the elements and isotopes.

For details of neutron scattering factor values, see Neutron. The property is set to None if there is no neutron scattering information for the element. Individual isotopes may have their own scattering information.

### Example¶

Print a table of coherent scattering length densities for isotopes of a particular element:

>>> import periodictable
>>> for iso in periodictable.Ni:
...     if iso.neutron.has_sld():
...         print("%s %7.4f"%(iso,iso.neutron.sld()[0]))
58-Ni 13.1526
60-Ni  2.5575
61-Ni  6.9417
62-Ni -7.9464
64-Ni -0.3379


### Details¶

There are a number of functions available in periodictable.nsf

neutron_energy()
Return neutron energy given wavelength.
neutron_wavelength()
Return wavelength given neutron energy.
neutron_wavelength_from_velocity()
Return wavelength given neutron velocity.
neutron_scattering()
Computes scattering length density, cross sections and penetration depth for a compound.
neutron_sld()
Computes scattering length density for a compound.
neutron_composite_sld()
Returns a scattering length density for a compound whose composition is variable.
energy_dependent_table()
Lists isotopes with energy dependence.
sld_table()
Lists scattering length densitys for all elements in natural abundance.
absorption_comparison_table()
Compares the imaginary bound coherent scattering length to the absorption cross section.
coherent_comparison_table()
Compares the bound coherent scattering length to the coherent scattering cross section.
total_comparison_table()
Compares the total scattering cross section to the sum of the coherent and incoherent scattering cross sections.

For private tables use init() to set the data.

The neutron scattering information table is reproduced from the Atomic Institute for Austrian Universities[1] (retrieve March 2008):

http://www.ati.ac.at/~neutropt/scattering/table.html

The above site has references to the published values for every entry in the table. We have included these in the documentation directory associated with the periodictable package.

 [1] (1, 2) Rauch, H. and Waschkowski, W. (2003) Neutron Scattering Lengths in ILL Neutron Data Booklet (second edition), A.-J. Dianoux, G. Lander, Eds. Old City Publishing, Philidelphia, PA. pp 1.1-1 to 1.1-17.
 [2] Rauch, H. and Waschkowski, W. (2000) Neutron scattering lengths. Schopper, H. (ed.). SpringerMaterials - The Landolt-Börnstein Database (http://www.springermaterials.com). doi: 10.1007/10499706_6
 [3] Koester, L., Rauch, H., Seymann. E. (1991) Atomic Data Nuclear Data Tables 49, 65
 [4] Lynn, J.E. and Seeger, P.A. (1990) Resonance effects in neutron scattering lengths of rare-earth nuclides. Atomic Data and Nuclear Data Tables 44, 191-207.
 [5] (1, 2) Sears, V. F. (1999) 4.4.4 Scattering lengths for neutrons. In Wilson & Prince eds. Intl. Tables for Crystallography C Kluwer Academic Publishers. pp 383.
 [6] Sears, V.F. (1992) Neutron scattering lengths and cross sections. Neutron News 3, No. 3, 26-37.
 [7] May, R.P., Ibel, K. and Haas, J. (1982) The forward scattering of cold neutrons by mixtures of light and heavy water. J. Appl. Cryst. 15, 15-19.
 [8] Smith, G.S. and Majkrzak, C.M. (2006) 2.9 Neutron reflectometry. In E. Prince ed. Intl. Tables for Crystallography C Wiley InterScience. pp 126-146. doi: 10.1107/97809553602060000584
 [9] Glinka, C.J. (2011) Incoherent Neutron Scattering from Multi-element Materials. J. Appl. Cryst. 44, 618-624. doi: 10.1107/S0021889811008223
class periodictable.nsf.Neutron

Bases: object

Neutron scattering factors are attached to each element in the periodic table for which values are available. If no information is available, then the neutron field of the element will be None. Even when neutron information is available, it may not be complete, so individual fields may be None.

The following fields are defined:

• b_c (fm)

Bounds coherent scattering length.

• total (barn)

Total scattering cross section $$\sigma_s$$. This does not include the absorption cross section. To compute the total collision cross section use $$\sigma_t = \sigma_s + \sigma_a$$

• absorption (barn)

Absorption cross section $$\sigma_a$$ at 1.798 Å. Scale to your beam by dividing by periodictable.nsf.ABSORPTION_WAVELENGTH and multiplying by your wavelength.

Additional fields not used for calculation include:

• b_c_i (fm)

Imaginary bound coherent scattering length. This is related to absorption cross section by $$\sigma_a = 4 \pi b_i/k$$ where $$k = 2 \pi/\lambda$$ and an additional factor of 1000 for converting between Å·fm and barns. b_c_i is not available for all isotopes for which absorption cross sections have been measured.

• bp, bm (fm)

Spin-dependent scattering for I+1/2 and I-1/2 (not always available). Incoherent scattering arises from the spin-dependent scattering b+ and b-. The Neutron Data Booklet[1] gives formulas for calculating coherent and incoherent scattering from b+ and b- alone.

• bp_i, bm_i (fm)

Imaginary portion of bp and bm.

• is_energy_dependent (boolean)

Do not use this data if scattering is energy dependent.

• coherent (barn)

Coherent scattering cross section. This is tabulated but not used. In theory coherent scattering is related to bound coherent scattering by $$\sigma_s = 4 \pi b_c^2/100$$. In practice, these values are different, with the following table showing the largest relative difference:

 Sc 3% Ti 4% V 34% Mn 1% Cd 4% Te 4% Xe 9% Sm 100% Eu 46% Gd 61% Tb 1% Ho 11% W 4% Au 7% Hg 2%
• incoherent (barn)

Incoherent scattering cross section $$\sigma_i$$. This is tabulated but not used. Instead, the incoherent cross section is computed from the total cross section minus the coherent cross section even for single atoms so that results from compounds are consistent with results from single atoms.

For elements, the scattering cross-sections are based on the natural abundance of the individual isotopes. Individual isotopes may have the following additional fields

• abundance (%)

Isotope abundance used to compute the properties of the element in natural abundance.

• nuclear_spin (string)

Spin on the nucleus: ‘0’, ‘1/2’, ‘3/2’, etc.

Each field T above has a corresponding T_units attribute with the name of the units. For scattering calculations, the scattering length density is the value of interest. This is computed from the number_density of the individual elements, as derived from the element density and atomic mass.

Note

1 barn = 100 fm2

has_sld()

Returns True if sld is defined for this element/isotope.

scattering(*args, **kw)

Returns neutron scattering information for the element at natural abundance and density.

Parameters: wavelength : float | Å sld : (float, float, float) | 10-6Å-2(real, -imaginary, incoherent) scattering length density xs : (float, float, float) | cm-1(coherent, absorption, incoherent) cross sections. penetration : float | cm1/e penetration length.

See neutron_scattering() for details.

sld(*args, **kw)

Returns scattering length density for the element at natural abundance and density.

Parameters: wavelength : float | Å sld : (float, float, float) | 10-6Å-2(real, -imaginary, incoherent) scattering length density.

See neutron_scattering() for details.

absorption = None
absorption_units = 'barn'
abundance = 0.0
abundance_units = '%'
b_c = None
b_c_i = None
b_c_units = 'fm'
bm = None
bm_i = None
bm_units = 'fm'
bp = None
bp_i = None
bp_units = 'fm'
coherent = None
coherent_units = 'barn'
incoherent = None
incoherent_units = 'barn'
is_energy_dependent = False
total = None
total_units = 'barn'
periodictable.nsf.init(table, reload=False)

Loads the Rauch table from the neutron data book.

periodictable.nsf.neutron_energy(wavelength)

Convert neutron wavelength to energy.

Parameters: wavelength : float or vector | Å energy : float or vector | meV

Wavelength is converted to energy using

$E = 1/2 m_n v^2 = h^2 / (2 m_n \lambda^2)$

where:

$$h$$ = planck’s constant in J·s

$$m_n$$ = neutron mass in kg

periodictable.nsf.neutron_wavelength(energy)

Convert neutron energy to wavelength.

Parameters: energy : float or vector | meV wavelength : float or vector | Å

Energy is converted to wavelength using

$E = 1/2 m_n v^2 = h^2 / (2 m_n \lambda^2) \Rightarrow \lambda = \sqrt{h^2 / (2 m_n E)}$

where

$$h$$ = planck’s constant in J·s

$$m_n$$ = neutron mass in kg

periodictable.nsf.neutron_wavelength_from_velocity(velocity)

Convert neutron velocity to wavelength.

Parameters: velocity : float or vector | m/s wavelength : float or vector | Å

Velocity is converted to wavelength using

$\lambda = h/p = h/(m_n v)$

where

$$h$$ = planck’s constant in J·s

$$m_n$$ = neutron mass in kg

periodictable.nsf.neutron_scattering(*args, **kw)

Computes neutron scattering cross sections for molecules.

Parameters: compound : Formula initializerChemical formula density : float | g·cm-3Mass density natural_density : float | g·cm-3Mass density of formula with naturally occuring abundances wavelength 1.798 : float | ÅNeutron wavelength. energy : float | meVNeutron energy. If energy is specified then wavelength is ignored. sld : (float, float, float) | 10-6Å-2(real, -imaginary, incoherent) scattering length density. xs : (float, float, float) | cm-1(coherent, absorption, incoherent) cross sections. penetration : float | cm1/e penetration depth of the beam AssertionError : density is missing.

The coherent and incoherent cross sections are calculated from the bound scattering lengths for nuclei. The actual cross sections depend on the incoming neutron energy and sample temperature, especially for light elements. For low energy neutrons (cold neutrons), the tabulated cross sections are generally a lower limit. The measured incoherent scattering from hydrogen, for example, can be considerably larger (by more than 20%) than its bound value. For example, the incoherent scattering cross section of H2O is 5.621/cm as computed from these tables compared to ~7.0/cm as measured with 5 meV neutrons at 290K. [7]

The scattering factor tables are not self consistent. The following functions show discrepencies between the various measurements of the scattering potential:

To compute the neutron cross sections we first need to average quantities for the unit cell of the molecule.

Molar mass m (g/mol) is the sum of the masses of each component:

$m = \sum{n_i m_i}\ {\rm for\ each\ atom}\ i=1,2,\ldots$

Cell volume $$V$$ (Å3/molecule) is molar mass $$m$$ over density $$rho$$, with a correction based on Avogadro’s number $$N_A$$ (atoms/mol) and the length conversion $$10^8$$ Å/cm:

$V = m/\rho \cdot 1/N_A \cdot (10^8)^3$

Number density $$N$$ is the number of scatterers per unit volume:

$N = \left.\sum{n_i} \right/ V$

Coherent scattering cross section $$\sigma_c$$ of the molecule is computed from the average scattering length of its constituent atoms, weighted by their frequency.

$b_c = \left.\sum n_i b_c \right/ \sum n_i$

This is converted to a scattering cross section and scaled by 1 barn = 100 fm2:

$\sigma_c = \left. 4 \pi b_c^2 \right/ 100$

Similarly, the absorption cross section $$\sigma_a$$, the incoherent cross section $$\sigma_i$$, and the total cross section $$\sigma_s$$ can be computed from the corresponding cross sections of the constituent elements,[5] already expressed in barns:

$\begin{split}\sigma_a &= \left. \sum n_j \sigma_{aj} \right/ \sum n_j \\ \sigma_i &= \left. \sum n_j \sigma_{ij} \right/ \sum n_j \\ \sigma_s &= \left. \sum n_j \sigma_{sj} \right/ \sum n_j\end{split}$

The neutron cross sections are tabulated at wavelength 1.798 Å. In the thermal neutron energy range most absorption cross sections scale linearly with wavelength,[4] and can be adjusted with a simple multiplication:

$\sigma_a = \sigma_a \lambda / \lambda_o = \sigma_a \lambda / 1.798$

If isotope.neutron.is_energy_dependent() is true for any part of the material, then this relation may not hold, and the returned values are only valid for 1.798 Å.

From the scattering cross sections, the scattering length for a material $$b = b' - i b''$$ can be computed using the following relations:[5]

$\begin{split}\sigma_c &= 4 \pi |b_c|^2 \\ \sigma_a &= \left. 4 \pi \left< b'' \right> \right/k \ {\rm for} \ k=2\pi / \lambda \\ \sigma_i &= 4 \pi |b_i|^2 \\ \sigma_s &= 4 \pi \left< |b|^2 \right>\end{split}$

Transforming we get:

$\begin{split}b'' &= \left. \sigma_a \right/ (2 \lambda) \\ b_i &= \sqrt{ \sigma_i / (4 \pi) }\end{split}$

The incoherent scattering length $$b_i$$ can be treated primarily as an absorption length in large scale structure calculations, with the complex scattering length approximated by $$b = b_c - i (b'' + b_i)$$.

The scattering potential is often expressed as a scattering length density (SLD). This is just the number density of the scatterers times their scattering lengths, with a correction for units.

$\begin{split}\rho_{\rm re} &= 10 N b_c \\ \rho_{\rm im} &= -N b'' / 100 \\ \rho_{\rm inc} &= 10 N b_i\end{split}$

with the factors of 10 chosen to give SLD in units of $$\AA^{-2}$$. The resulting $$\rho = \rho_{\rm re} + i \rho_{\rm im}$$ can be used in the scattering equations. Treatment of the incoherent scattering $$\rho_{\rm inc}$$ will depend on the equation. For example, it can be treated as an absorption in specular reflectivity calculations since the incoherently scattered neutrons are removed from the multilayer recurrence calculation.

Similarly, scattering cross section includes number density:

$\begin{split}\Sigma_{\rm coh} &= N \sigma_c \\ \Sigma_{\rm inc} &= N \sigma_i \\ \Sigma_{\rm abs} &= N \sigma_a \\ \Sigma_{\rm s} &= N \sigma_s\end{split}$

The 1/e penetration depth t_u represents the the depth into the sample at which the unscattered intensity is reduced by a factor of $e$:

$t_u = \left. 1 \right/ (\Sigma_{\rm s} + \Sigma_{\rm abs})$

Note that the calculated penetration depth includes the effects of both absorption and incoherent scattering (which spreads the beam in the full $$4\pi$$ spherical surface, and so it looks like absorption with respect to the beam), as well as the coherent scattering from the sample. If you instead want to calculate the effective shielding of the sample, you should recalculate penetration depth without the coherent scattering.

Transmission rate can be computed from $$e^{-d/t_u}$$ for penetration i depth $$t_u$$ and sample thickness $$d$$.

In general, the total scattering cross section is not the sum of the coherent and incoherent cross sections, $$\Sigma_{\rm s} \ne \Sigma_{\rm coh}+\Sigma_{\rm inc}$$.[9] Instead, we compute $$\Sigma_{\rm inc} = \Sigma_{\rm s} - \Sigma_{\rm coh}$$ in accordance with Sect. 4.4.4 of the Internation Tables for Crystallography Volume C.

Including unit conversion with $$\mu=10^{-6}$$ the full scattering equations are:

$\begin{split}\rho_{\rm re}\,(\mu/\AA^2) &= (N/\AA^3) \, (b_c\,{\rm fm}) \, (10^{-5} \AA/{\rm\,fm}) \, (10^6\,\mu) \\ \rho_{\rm im}\,(\mu/\AA^2) &= (N/\AA^3) \, (\sigma_a\,{\rm barn}) \, (10^{-8}\,\AA^2/{\rm barn}) / (2 \lambda\, \AA) \, (10^6\,\mu) \\ \rho_{\rm inc}\,(\mu/\AA^2) &= (N/\AA^3) \, \sqrt{(\sigma_i\, {\rm barn})/(4 \pi) \, (100\, {\rm fm}^2/{\rm barn})} \, (10^{-5}\, \AA/{\rm fm}) \, (10^6\, \mu) \\ \Sigma_{\rm coh}\,(1/{\rm cm}) &= (N/\AA^3) \, (\sigma_c\, {\rm barn}) \, (10^{-8}\, \AA^2/{\rm barn}) \, (10^8\, \AA/{\rm cm}) \\ \Sigma_{\rm inc}\,(1/{\rm cm}) &= (N/\AA^3) \,(\sigma_i\, {\rm barn}) \, (10^{-8}\, \AA^2/{\rm barn}) \, (10^8\, \AA/{\rm cm}) \\ \Sigma_{\rm abs}\,(1/{\rm cm}) &= (N/\AA^3) \,(\sigma_a\,{\rm barn}) \, (10^{-8}\, \AA^2/{\rm barn}) \, (10^8\, \AA/{\rm cm}) \\ \Sigma_{\rm s}\,(1/{\rm cm}) &= (N/\AA^3) \,(\sigma_s\,{\rm barn}) \, (10^{-8}\, \AA^2/{\rm barn}) \, (10^8\, \AA/{\rm cm}) \\ t_u\,({\rm cm}) &= 1/(\Sigma_{\rm s}\, 1/{\rm cm} \,+\, \Sigma_{\rm abs}\, 1/{\rm cm})\end{split}$
periodictable.nsf.neutron_sld(*args, **kw)

Computes neutron scattering length densities for molecules.

Parameters: compound : Formula initializerChemical formula density : float | g·cm-3Mass density natural_density : float | g·cm-3Mass density of formula with naturally occuring abundances wavelength : float | ÅNeutron wavelength. energy : float | meVNeutron energy. If energy is specified then wavelength is ignored. sld : (float, float, float) | 10-6Å-2(real, -imaginary, incoherent) scattering length density. AssertionError : density is missing.

Returns the scattering length density of the compound. See neutron_scattering() for details.

periodictable.nsf.neutron_composite_sld(materials, wavelength=1.798)

Create a composite SLD calculator.

Parameters: materials : [Formula]List of materials wavelength = 1.798: float OR [float] | Å Probe wavelength(s). calculator : f(w, density=1) -> (real, -imaginary, incoherent)

The composite calculator takes a vector of weights and returns the scattering length density of the composite. This is useful for operations on large molecules, such as calculating a set of contrasts or fitting a material composition.

Table lookups and partial sums and constants are precomputed so that the calculation consists of a few simple array operations regardless of the size of the material fragments.

periodictable.nsf.sld_plot(table=None)

Plots SLD as a function of element number.

Parameters: table : PeriodicTableThe default periodictable unless a specific table has been requested. None
periodictable.nsf.absorption_comparison_table(table=None, tol=None)

Prints a table comparing absorption to the imaginary bound coherent scattering length b_c_i. This is used to checking the integrity of the data and formula.

The relationship between absorption and b_c_i is:

$\sigma_a = -2 \lambda b_i \cdot 1000$

The wavelength $$\lambda = 1.798 \AA$$ is the neutron wavelength at which the absorption is tallied. The factor of 1000 transforms from Å·fm to barn.

Parameters: table : PeriodicTableThe default periodictable unless a specific table has been requested. tol = 0.01 : float | barnShow differences greater than this amount. None

Example

>>> absorption_comparison_table (tol=0.5)
Comparison of absorption and (-2000 lambda b_c_i)
3-He  5333.00  5322.08   0.2%
Li    70.50     ----
6-Li   940.00   934.96   0.5%
B   767.00   755.16   1.6%
10-B  3835.00     ----
N     1.90     ----
...

periodictable.nsf.coherent_comparison_table(table=None, tol=None)

Prints a table of $$4 \pi b_c^2/100$$ and coherent for each isotope. This is useful for checking the integrity of the data and formula.

The table only prints where b_c exists.

Parameters: table : PeriodicTableThe default periodictable unless a specific table has been requested. tol = 0.01 : float | barnAmount of difference to show None

Example

>>> coherent_comparison_table (tol=0.5)
Comparison of (4 pi b_c^2/100) and coherent
n   172.03    43.01 300.0%
1-n   172.03    43.01 300.0%
Sc    18.40    19.00  -3.2%
45-Sc    18.40    19.00  -3.2%
65-Cu    13.08    14.10  -7.2%
70-Zn     5.98     4.50  33.0%
84-Sr     3.14     6.00 -47.6%
...

periodictable.nsf.incoherent_comparison_table(table=None, tol=None)

Prints a table of incoherent computed from total and b_c with incoherent.

Parameters: table : PeriodicTableThe default periodictable unless a specific table has been requested. tol = 0.01 : float | barnAmount of difference to show None

Example

>>> incoherent_comparison_table (tol=0.5)
Comparison of incoherent and (total - 4 pi b_c^2/100)
Sc     4.50     5.10 -11.8%
45-Sc     4.50     5.10 -11.8%
65-Cu     0.40     1.42 -71.7%
70-Zn     0.00    -1.48 -100.0%
84-Sr     0.00     2.86 -100.0%
113-Cd     0.30     4.36 -93.1%
...

periodictable.nsf.total_comparison_table(table=None, tol=None)

Prints a table of neutron.total and sum coh,inc for each isotope where these exist. This is used to checking the integrity of the data and formula.

Parameters: table : PeriodicTableThe default periodictable unless a specific table has been requested. tol = 0.01 : float | barnAmount of difference to show None

Example

>>> total_comparison_table (tol=0.1)
Comparison of total cross section to (coherent + incoherent)
n    43.01     ----
1-n    43.01     ----
84-Kr     6.60     ----
149-Sm   200.00   200.50  -0.2%
Eu     9.20     9.07   1.4%
Gd   180.00   180.30  -0.2%
155-Gd    66.00    65.80   0.3%
161-Dy    16.00    16.30  -1.8%
180-Ta     7.00     6.70   4.5%
187-Os    13.00    13.30  -2.3%

periodictable.nsf.energy_dependent_table(table=None)

Prints a table of energy dependent isotopes.

Parameters: table : PeriodicTableIf table is not specified, use the common periodic table. None

Example

>>> energy_dependent_table()
Elements and isotopes with energy dependent absorption:
He-3
Cd Cd-113
Sm Sm-149
Eu Eu-151
Gd Gd-155 Gd-157
Yb-168
Hg-196 Hg-199

periodictable.nsf.sld_table(wavelength=1, table=None, isotopes=True)

Scattering length density table for wavelength 4.75 Å.

Parameters: table : PeriodicTableIf table is not specified, use the common periodic table. isotopes = True : booleanWhether to consider isotopes or not. None

Example

>>> sld_table(wavelength=4.75)
Neutron scattering length density table
atom       mass density     sld    imag   incoh
H         1.008   0.071  -1.582   0.000  10.691
1-H       1.008   0.071  -1.583   0.000  10.691
D         2.014   0.141   2.823   0.000   1.705
T         3.016   0.212   2.027   0.000   0.453
He        4.003   0.122   0.598   0.000   0.035
3-He      3.016   0.092   1.054   0.272   0.706 *
4-He      4.003   0.122   0.598   0.000   0.035
...
248-Cm  248.072  13.569   2.536   0.000   0.207
* Energy dependent cross sections

periodictable.nsf.neutron_sld_from_atoms(*args, **kw)

Deprecated since version 0.91: neutron_sld() now accepts dictionaries of {atom: count} directly.