dty_and_origin_lab#
- anri.geom.dty_and_origin_lab(v_sample, k_in_lab, omega, wedge, chi, y0)[source]#
Find the dty that brings v_sample into the beam, and the lab position it then occupies.
This is only valid for the scanning case (beam can be approximated as a ray).
- Parameters:
v_sample (
Array) – [3] Vector in sample coordinatesk_in_lab (
Array) – [3] Incoming wave-vector in lab frameomega (
float) – Omega motor value (degrees)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:
dty_required (
jax.Array) – dty value that brings v_sample into beam at angle omegaorigin_lab (
jax.Array) – [3] Where the beam passes through v_sample’s column at that dty: v_sample in lab coordinates (sample_to_lab(v_sample, omega, wedge, chi, dty_required, y0)), raised to the height of a tilted beam
Notes
Applying dty shifts the lab position by
(0, dty - y0, 0). Because dty is chosen so that the point sits on the beam,dty - y0equalsy_ray - v_lab[1], and the y coordinate of the shifted position collapses toy_ray. Both return values therefore come from a single rotation ofv_sample.A beam tilted out of the horizontal plane is taken to cross the rotation axis at the point’s own height (in a 2D map, the layer’s height), so that a point’s height never depends on other layers. The beam is a pencil and the voxel a column, so the scattering happens where the pencil crosses the column: the origin is raised by
(k_z / k_x) * v_lab[0]. For a beam in the horizontal plane this is zero, andorigin_labequalssample_to_lab(v_sample, omega, wedge, chi, dty_required, y0).See also
find_dty_for_beam_xyReturns the dty value alone.
sample_to_labThe underlying sample to lab transform.