get_centroid_box_both#
- anri.fwd.get_centroid_box_both(ubi, origin_sample, hkl, wavelength, k_in_lab, ky, kz, wedge, chi, s_step_lab, f_step_lab, det_origin_lab)[source]#
Forward project (ubi, hkl) to both Friedel 3D peak centroids on the detector in the box-beam case.
This can be vectorised over ubis and origin_samples, see
get_centroid_box_all_grains_both(). It can then be vectorised in an outer loop over hkl, seeget_centroid_box_all_both().- 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 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)s_step_lab (
Array) – [3] Lab-frame step of one pixel along the slow direction, fromanri.geom.detector_basis_vectors_lab().f_step_lab (
Array) – [3] Lab-frame step of one pixel along the fast direction, fromanri.geom.detector_basis_vectors_lab().det_origin_lab (
Array) – [3] Lab-frame position of pixel (0, 0), fromanri.geom.detector_basis_vectors_lab().
- Returns:
Notes
There is no
etasignargument. Both solutions come from one call toanri.fwd.hkl_to_k_omega_both(), which evaluates the geometry shared between the branches once. Only ray-tracing to the detector is done per branch.See also
get_centroid_boxSingle-solution version, taking an
etasignargument.