diffract#

Diffraction-related utilities and functions.

Functions

k_to_q_lab(k_in, k_out)

Convert from scaled normalised $vec{k_{text{in}}}$ and $vec{k_{text{out}}}$ to scattering vector $vec{Q}$.

omega_solns(q_sample, etasign, k_in_sample)

Compute omega angles that satisfy the Ewald condition for a given $vec{Q}$ in the sample frame.

peak_lab_to_k_out(peak_lab, origin_lab, ...)

Convert from vector of peak in lab frame to normalised scaled $vec{k_{text{out}}}$ in the lab frame.

q_lab_to_k_out(q_lab, k_in)

Convert from scattering vector $vec{Q}$ and scaled normalised $vec{k_{text{in}}}$ to scaled normalised $vec{k_{text{out}}}$.

q_lab_to_tth_eta(q_lab, wavelength)

Convert from scattering vector $vec{Q}$ in lab frame to (tth, eta) angles.

scale_norm_k(k_vec, wavelength)

Normalise and scale k-vector according to ImageD11 convention (1/wavelength).

tth_eta_to_k_out(tth, eta, wavelength)

Convert from (tth, eta) angles to scaled normalised $vec{k_{text{out}}}$ in the lab frame.

q_to_ds(q)

Convert q (in whatever reference frame) to d-star (1/d).

ds_to_tth(ds, wavelength)

Convert from inverse length (d-star) and wavelength to two-theta.