Occupational#

The occupational module contains functions for working with site occupancies required for setting up an occupational refinement.

composition(nu, nv, nw, n_atm, value=0.5)[source]#

Generate random relative site occupancies.

Parameters:
nu, nv, nwint

Number of grid points \(N_1\), \(N_2\), \(N_3\) along the \(a\), \(b\), and \(c\)-axis of the supercell.

n_atmint

Number of atoms in the unit cell

valuefloat, 1d array, optional

Average of site occupancies, defualt value=0.5.

Returns:
A1d array

Array has a flattened shape of size nu*nw*nv*n_atm.

intensity(A_k, i_dft, factors)[source]#

Chemical scattering intensity.

Parameters:
A_k1d array

Fourier transform of relative site occupancies.

i_dft1d array, int

Array indices of Fourier transform corresponding to reciprocal space.

factors1d array

Prefactors of form factors, phase factors, and composition factors.

Returns:
I1d array

Intensity. Array has a flattened shape of size i_dft.shape[0].

structure(A_k, i_dft, factors)[source]#

Partial chemical structure factor.

Parameters:
A_k1d array

Fourier transform of relative site occupancies.

i_dft1d array, int

Array indices of Fourier transform corresponding to reciprocal space.

factors1d array

Prefactors of form factors, phase factors, and composition factors.

Returns:
F1d array

Structure factor. Array has a flattened shape of size i_dft.shape[0]

prod1d array

Partial structure factor. Array has a flattened shape of size i_dft.shape[0]*n_atm.

transform(A_r, H, K, L, nu, nv, nw, n_atm)[source]#

Discrete Fourier transform of relative occupancy parameter.

Parameters:
A_r1d array

Relative occupancy parameter \(A\).

H, K, L1d array, int

Supercell index along the \(a^*\), \(b^*\), and \(c^*\)-axis in reciprocal space.

nu, nv, nwint

Number of grid points \(N_1\), \(N_2\), \(N_3\) along the \(a\), \(b\), and \(c\)-axis of the supercell.

n_atmint

Number of atoms in the unit cell.

Returns:
A_k1d array

Fourier transform of relative occupancy parameter. Array has a flattened shape of size nu*nw*nv*n_atm.

i_dft1d array, int

Fourier transform indices. Array has a flattened shape of size nu*nw*nv*n_atm.