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 coordinates

  • k_in_lab (Array) – [3] Incoming wave-vector in lab frame

  • omega (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 omega

  • origin_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 - y0 equals y_ray - v_lab[1], and the y coordinate of the shifted position collapses to y_ray. Both return values therefore come from a single rotation of v_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, and origin_lab equals sample_to_lab(v_sample, omega, wedge, chi, dty_required, y0).

See also

find_dty_for_beam_xy

Returns the dty value alone.

sample_to_lab

The underlying sample to lab transform.