ring_widths#

anri.index.ring_widths(prof, lo, step, ring_tth, frac=0.95, max_hw=0.5)[source]#

Measure each ring’s offset and half-width (degrees 2theta) from a 2theta profile.

Each ring is looked at within half the gap to its neighbours (at most max_hw). Background: the median of the outer fifth of that window. Offset: the centroid minus the ring’s 2theta. Half-width: the distance from the centroid that holds frac of the ring’s net intensity. It sums everything that spreads a ring: parallax (sample size / distance), strain, peak size and detector distortion. A ring without intensity gets offset 0 and the whole window.

Parameters:
Returns:

offset, half_width (np.ndarray) – [Nr] each, in degrees