get_centroid_box_all#
- anri.fwd.get_centroid_box_all(ubi, origin_sample, hkl, etasign, wavelength, ky, kz, wedge, chi, y0, sc_lab, fc_lab, norm_lab)#
Vectorized version of get_centroid_box. Takes similar arguments as get_centroid_box but with additional array axes over which get_centroid_box is mapped.
Original documentation:
Vectorized version of get_centroid_box. Takes similar arguments as get_centroid_box but with additional array axes over which get_centroid_box is mapped.
Original documentation:
Forward project (ubi, hkl) to get 3D peak centroid on detector (sc, fc, omega) in the box-beam case.
This can be vectorised over ubis and origin_samples, see
get_centroid_box_all_grains(). It can then be vectorised in an outer loop over hkl, seeget_centroid_box_all().- Parameters:
ubi (
Array) – [3,3] (U.B)^(-1) matrix of the grain/voxelorigin_sample (
Array) – [3] origin position of the voxel in the sample reference framehkl (
Array) – [3] (h,k,l) reciprocal space vectoretasign (
int) – +1 (omega1 in ImageD11) or -1 (omega2 in ImageD11) to select which omega solution to returnwavelength (
float) – Wavelength in angstromsky (
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 beamsc_lab (
Array) – [3] Laboratory basis vector for the slow direction on the detector fromanri.geom.detector_basis_vectors_lab().fc_lab (
Array) – [3] Laboratory basis vector for the fast direction on the detector fromanri.geom.detector_basis_vectors_lab().norm_lab (
Array) – [3] Laboratory basis vector for the detector normal fromanri.geom.detector_basis_vectors_lab().
- Returns:
centroid (
jax.Array) – [3] Peak centre-of-mass in (sc, fc, omega)
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.