get_centroid_scan#

anri.fwd.get_centroid_scan(ubi, origin_sample, hkl, etasign, wavelength, ky, kz, wedge, chi, y0, sc_lab, fc_lab, norm_lab)[source]#

Forward project (ubi, hkl) to get 4D peak centroid (sc, fc, omega, dty) in the Scanning 3DXRD case.

This can be vectorised over ubis and origin_samples, see get_centroid_scan_all_grains(). It can then be vectorised in an outer loop over hkl, see get_centroid_scan_all().

Parameters:
  • ubi (Array) – [3,3] (U.B)^(-1) matrix of the grain/voxel

  • origin_sample (Array) – [3] origin position of the voxel in the sample reference frame

  • hkl (Array) – [3] (h,k,l) reciprocal space vector

  • etasign (float) – +1 (omega1 in ImageD11) or -1 (omega2 in ImageD11) to select which omega solution to return

  • wavelength (float) – Wavelength in angstroms

  • ky (float) – y-component of the beam in the lab frame. Represents horizontal beam divergence, usually zero.

  • kz (float) – z-component of the beam in the lab frame. Represents vertical beam divergence, usually zero.

  • wedge (float) – Wedge motor value (degrees)

  • chi (float) – Chi motor value (degrees)

  • y0 (float) – The true value of dty when the rotation axis (untilted by wedge, chi) intersects the beam

  • sc_lab (Array) – [3] Laboratory basis vector for the slow direction on the detector from anri.geom.detector_basis_vectors_lab().

  • fc_lab (Array) – [3] Laboratory basis vector for the fast direction on the detector from anri.geom.detector_basis_vectors_lab().

  • norm_lab (Array) – [3] Laboratory basis vector for the detector normal from anri.geom.detector_basis_vectors_lab().

Returns:

centroid (jax.Array) – [4] Peak centre-of-mass in (sc, fc, omega, dty)

Notes

Propagates (h,k,l) into k-vectors using anri.fwd.hkl_to_k_omega()

Then computes the origin in the lab frame, and ray-traces into the detector.