histogram#

anri.index.histogram(x, val, row, ring_tth, tth_tol, om0, b_e, b_o, n_ring, n_e, n_o, n_k)[source]#

Bin pixels into H[ring, eta, omega, row] (flattened).

A pixel goes to the nearest ring if within tth_tol of it; eta bins are periodic over 360 degrees from -180, omega bins start at om0. Pixels with row -1 are dropped.

Parameters:
  • x (Array) – [N, 3] (2theta, eta, omega) from pixel_angles()

  • val (Array) – [N] intensity and dty row of each pixel

  • row (Array) – [N] intensity and dty row of each pixel

  • ring_tth (Array) – [n_ring] 2theta of the rings

  • tth_tol (Array | ndarray | bool | number | bool | int | float | complex) – 2theta tolerance (degrees), a scalar or one per ring

  • om0 (float) – First omega bin edge, and the bin widths in eta and omega (degrees)

  • b_e (float) – First omega bin edge, and the bin widths in eta and omega (degrees)

  • b_o (float) – First omega bin edge, and the bin widths in eta and omega (degrees)

  • n_ring (int) – Numbers of rings, eta bins, omega bins and rows

  • n_e (int) – Numbers of rings, eta bins, omega bins and rows

  • n_o (int) – Numbers of rings, eta bins, omega bins and rows

  • n_k (int) – Numbers of rings, eta bins, omega bins and rows

Returns:

jax.Array – [n_ring * n_e * n_o * n_k] intensity per bin