Scattering#

The scattering module contains additional general functions for calculating diffuse scattering patterns.

form(ions, Q, source='x-ray')[source]#

Scattering form factor \(f(Q)\).

Parameters:
ions1d array, str

Ions.

Q1d array

Magnitude of wavevector.

sourcestr, optional

Radiation source. Either 'x-ray' or 'electron'. Defualt is source='x-ray'.

Returns:
f1d array

Has the same shape as the input wavevector.

length(atms, n_hkl)[source]#

Scattering length \(b\) of neutrons.

Parameters:
atms1d array, str

Atoms or isotopes.

n_hklint

Number of reciprocal space points.

Returns:
b1d array

Has the shape as the number of reciprocal space points.

phase(Qx, Qy, Qz, rx, ry, rz)[source]#

Phase factor \(e^{i\boldsymbol{Q}\cdot\boldsymbol{r}}\).

Parameters:
rx, ry, rz1d array

Components of spatial vector in Cartesian coordinates.

Qx, Qy, Qz1d array

Components of wavevector in Cartesian coordinates.

Returns:
factor1d array

Has the same shape as the input wavevector and spatial vector components.