hkl_to_k_omega#

anri.fwd.hkl_to_k_omega(ubi, hkl, etasign, wavelength, ky, kz, wedge, chi, y0)[source]#

Forward-project a reciprocal space vector (h,k,l) with basis vectors (a*, b*, c*) into k-vectors and omega angles.

This just chains together various transforms from anri.diffract() and anri.geom().

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

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

  • etasign (int) – +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

Returns:

  • k_in_lab (jax.Array) – [3] k-in vector in laboratory frame (incoming beam) - not scaled or normalised!

  • k_out_lab (jax.Array) – [3] k_out vector in laboratory frame

  • omega (float) – Omega angle where diffraction occurs in degrees

  • valid (float) – Boolean indicating if a valid solution exists