hkl_to_k_omega_both#
- anri.fwd.hkl_to_k_omega_both(ubi, hkl, wavelength, k_in_lab, ky, kz, wedge, chi)[source]#
Forward-project (h,k,l) into k-vectors and omega angles for both Friedel solutions.
- Parameters:
ubi (
Array) – [3,3] (U.B)^(-1) matrix of the grain/voxelhkl (
Array) – [3] (h,k,l) reciprocal space vectorwavelength (
float) – Wavelength in angstromsk_in_lab (
Array) – [3] Direction of the incoming beam before divergence, lab frame (any length, not vertical)ky (
float) – Horizontal beam divergence: small tilt of the beam (radians) along the horizontal across it, seeanri.geom.beam_basis(). Usually zero.kz (
float) – Vertical beam divergence: small tilt of the beam (radians) along the vertical across it, seeanri.geom.beam_basis(). Usually zero.wedge (
float) – Wedge motor value (degrees)chi (
float) – Chi motor value (degrees)
- Returns:
k_in_lab (
jax.Array) – [3] k-in vector in laboratory frame (incoming beam) - not scaled or normalised!k_out_lab (
jax.Array) – [2,3] k_out vectors in laboratory frame, index 0 foretasign = +1omega (
jax.Array) – [2] Omega angles in degrees, index 0 foretasign = +1valid (
jax.Array) – Boolean indicating if a valid solution exists, shared by both branches
Notes
Q in the sample frame, the beam normalisation and the sample-frame beam vector are all properties of the geometry rather than of the branch, as is everything
anri.diffract.omega_solns_core()computes. Producing both solutions together evaluates that shared part once. Only the omega rotation of Q and the resulting k_out differ per branch.See also
hkl_to_k_omegaSingle-solution version, taking an
etasignargument.