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_tolof it; eta bins are periodic over 360 degrees from -180, omega bins start atom0. Pixels with row -1 are dropped.- Parameters:
x (
Array) – [N, 3] (2theta, eta, omega) frompixel_angles()val (
Array) – [N] intensity and dty row of each pixelrow (
Array) – [N] intensity and dty row of each pixelring_tth (
Array) – [n_ring] 2theta of the ringstth_tol (
Array|ndarray|bool|number|bool|int|float|complex) – 2theta tolerance (degrees), a scalar or one per ringom0 (
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 rowsn_e (
int) – Numbers of rings, eta bins, omega bins and rowsn_o (
int) – Numbers of rings, eta bins, omega bins and rowsn_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