# What *Nexus* calculates

## Wavefield propagation

Nexus uses a scattering approach, a polarization-dependent transfer matrix formalism, to calculate the interaction of the wavefield with objects in the beam path. For that, the beam properties and the scattering properties of all objects in the beam path have to be specified or calculated.

The beam is described by a complex 2x2 coherency matrix in the general case or a Jones vector for calculations of amplitude parameters for fully coherent beams. The Jones vector \(\vec{E}\) describes a fully coherent beam, while the coherency matrix \(J\) also includes incoherent light. The Jones vector is

and the coherency matrix is related to the Jones vector via \(J_{ij} = \braket{E_i E_j^*}\), such that

Polarization properties are described along two orthogonal polarization vectors, here the linear polarization components along \(\sigma\) and \(\pi\) directions. For example, the normalized Jones vector of a fully polarized beam along \(\sigma\) direction is given by

while the coherency matrix is

The coherency matrix is Hermitian

The trace of the coherency matrix

corresponds to the intensity \(I\) of beam. *Nexus* always uses a normalized intensity input.

With an optical element \(M\) affecting the Jones vector \(\vec{E}\) the output vector is

while for \(J\) the relation is

The output field holds all the information of the scattering properties of the objects. In fact, the \(M(E)\) is actually energy dependent such that the spectra can be calculated.

The matrix \(M\) is the transfer matrix of the whole experiment and this is calculated from the parameters specified in all of the *Nexus* objects, either a sample or an analyzer.
The transfer matrix \(M = \prod_i m_i\) can consist of many different object matrices \(m_i\).
For a sample, each layer has its own layer matrix \(L_i\) and the sample matrix is \(m_s = \prod_i L_i\). These layers are described by a refractive index.
This refractive index is determined by the electronic and nuclear scattering cross sections which are calculated by *Nexus*.

See also

For more information on the Jones formalism and the coherency matrix, see [Born] chapter 10.9, https://en.wikipedia.org/wiki/Jones_calculus or https://en.wikipedia.org/wiki/Polarization_(waves) .

For more information on the transfer matrix formalism and the cross section calculations, see [Sturhahn] and [Roehlsberger].

## Nuclear response

By default, the complete response of the system is calculated by *Nexus*.
The incoming photon field as well as electronic and nuclear scattering are considered.
The transmitted field \(\vec{E}_{out}\) consist of two contributions [Smirnov]:
electronic scattering \(\vec{E}_{el}\) and coherent nuclear resonant scattering \(\vec{E}_{nuc}\)

where \(M_{el}\) is the total scattering response, \(M_{el}\) is the pure electronic scattering response, \(M_{nuc}\) is the nuclear response.

Sometimes one is only interested in the nuclear response, meaning that the transmitted pure electronic scattering should be excluded.
Some of the methods that calculate nuclear properties provide the parameter `electronic`

.
When set to `False`

only the nuclear response is calculated.
*Nexus* will then calculate the output field \(\vec{E}_{out} = M * \vec{E}_{in}\) from the total response and subtract the pure electronic response \(M_{el} * \vec{E}_{in}\)

For the intensity *Nexus* uses