mag2exp.sans.cross_section#
- mag2exp.sans.cross_section(field, /, method, polarisation=(0, 0, 1))#
Calculation of scattering cross sections.
The scattering cross sections can be calculated using
\[\frac{d\sum}{d\Omega} \sim |{\bf Q} \cdot {\bf \sigma}|^2,\]where \({\bf \sigma}\) is the Pauli vector
\[\begin{split}{\bf \sigma} = \begin{bmatrix} \sigma_x \\ \sigma_y \\ \sigma_z \end{bmatrix},\end{split}\]and
\[\begin{split}\begin{align} \sigma_x &= \begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix}, \\ \sigma_y &= \begin{pmatrix} 0 & -i \\ i & 0 \end{pmatrix}, \\ \sigma_z &= \begin{pmatrix} 1 & 0 \\ 0 & -1 \end{pmatrix}. \end{align}\end{split}\]\({\bf Q}\) is the magnetic interaction vector given by
\[\begin{equation} {\bf Q} = \hat{\bf q} \times \widetilde{\bf M} \times \hat{\bf q} \end{equation}\]\(\hat{\bf q}\) is the unit scattering vector and \(\widetilde{\bf M}\) is the Fourier transform of the magnetisation. The magnetic interaction vector is is dependent on the scattering geometry and the scattering vector is defined as
\[\begin{equation} {\bf q} = {\bf k}_1 - {\bf k}_0. \end{equation}\]The spin-flip and non-spin-flip neutron scattering cross sections can be calculated for specific scattering geometries using
\[\begin{split}\begin{equation} \frac{d\sum}{d\Omega} = \begin{pmatrix} \frac{d\sum^{++}}{d\Omega} & \frac{d\sum^{-+}}{d\Omega}\\ \frac{d\sum^{+-}}{d\Omega} & \frac{d\sum^{--}}{d\Omega} \end{pmatrix}. \end{equation}\end{split}\]The spin based cross sections then be combined in order to get the half polarised cross sections
\[\begin{split}\begin{align} \frac{d\sum^{+}}{d\Omega} &= \frac{d\sum^{++}}{d\Omega} + \frac{d\sum^{+-}}{d\Omega}, \\ \frac{d\sum^{-}}{d\Omega} &= \frac{d\sum^{--}}{d\Omega} + \frac{d\sum^{-+}}{d\Omega}. \end{align}\end{split}\]These can further be combined to get the unpolarised cross section
\[\begin{split}\begin{align} \frac{d\sum}{d\Omega} &= \frac{1}{2} \left( \frac{d\sum^{+}}{d\Omega} + \frac{d\sum^{-}}{d\Omega} \right), \\ \frac{d\sum}{d\Omega} &= \frac{1}{2} \left( \frac{d\sum^{++}}{d\Omega} + \frac{d\sum^{+-}}{d\Omega} + \frac{d\sum^{--}}{d\Omega} + \frac{d\sum^{-+}}{d\Omega} \right). \end{align}\end{split}\]- Parameters:
field (discretisedfield.field) – Magnetisation field.
method (str) –
Used to select the relevant cross section and can take the value of
pp - positive positive non-spin-flip cross section,
nn - negative negative non-spin-flip cross section,
pn - positive negative spin-flip cross section,
np - negative positive spin-flip cross section,
p - positive half polarised cross section,
n - negitive half polarised cross section,
unpol - unpolarised cross section.
polarisation (turple) – Defines the polarisation direction of the incoming reutron beam with respect to the sample reference frame.
- Returns:
Scattering cross section in arbitary units.
- Return type:
Examples
Visualising unpolarised cross section with
matplotlib
.
>>> import discretisedfield as df >>> import micromagneticmodel as mm >>> import numpy as np >>> import mag2exp >>> mesh = df.Mesh(p1=(-25e-9, -25e-9, -2e-9), ... p2=(25e-9, 25e-9, 50e-9), ... cell=(1e-9, 1e-9, 2e-9)) >>> def v_fun(point): ... x, y, z = point ... q = 10e-9 ... return (0, ... np.sin(2 * np.pi * x / q), ... np.cos(2 * np.pi * x / q)) >>> field = df.Field(mesh, nvdim=3, value=v_fun, norm=1e5) >>> field.sel('z').mpl() >>> cs = mag2exp.sans.cross_section(field, method='unpol', ... polarisation=(0, 0, 1)) >>> cs.sel(k_z=0).real.mpl.scalar()
Visualising spin-flip cross section with
matplotlib
.
>>> import discretisedfield as df >>> import micromagneticmodel as mm >>> import numpy as np >>> import mag2exp >>> mesh = df.Mesh(p1=(-25e-9, -25e-9, -2e-9), ... p2=(25e-9, 25e-9, 50e-9), ... cell=(1e-9, 1e-9, 2e-9)) >>> def v_fun(point): ... x, y, z = point ... q = 10e-9 ... return (0, ... np.sin(2 * np.pi * x / q), ... np.cos(2 * np.pi * x / q)) >>> field = df.Field(mesh, nvdim=3, value=v_fun, norm=1e5) >>> field.sel('z').mpl() >>> cs = mag2exp.sans.cross_section(field, method='pn', ... polarisation=(0, 0, 1)) >>> cs.sel(k_z=0).real.mpl.scalar()