populations#
- anri.index.populations(f, cand, U_list, ops, radius_deg, p=4, m=16, eps=0.02, vb=16384)[source]#
Group each voxel’s occupied candidate orientations into up to p populations.
A voxel’s m most occupied candidates above
epsx its total are grouped greedily: the most occupied free candidate seeds a population, and every free candidate withinradius_degof it (over the Laue group) joins. Each population gets its share of the voxel’s occupancy, the occupancy-weighted mean of its members (aligned to the seed over the symmetry, then projected back to a rotation) and their weighted rms misorientation from that mean. Populations closer than the radius come out as one, with a larger spread: what the data cannot separate is reported as a mean and a spread. The spread includes the orientation grid’s own spacing (one orientation between grid points shares itself among the nearby points), so it is an upper bound.- Parameters:
f (
Array|ndarray|bool|number|bool|int|float|complex) – [Nv, K] occupancies and orientation indices, fromanri.index.fit_occupancy()cand (
Array|ndarray|bool|number|bool|int|float|complex) – [Nv, K] occupancies and orientation indices, fromanri.index.fit_occupancy()U_list (
Array|ndarray|bool|number|bool|int|float|complex) – [Nq, 3, 3] the orientations that cand indexesops (
Array|ndarray|bool|number|bool|int|float|complex) – [n, 3, 3] Laue-group rotations, fromanri.crystal.laue_rotations()radius_deg (
float) – Largest misorientation from a population’s seed, e.g. 1.8 grid stepsp (
int, default:4) – Populations per voxel at mostm (
int, default:16) – Candidates considered per voxeleps (
float, default:0.02) – Smallest occupancy considered, as a fraction of the voxel’s totalvb (
int, default:16384) – Voxels per call
- Returns:
fraction (
np.ndarray) – [Nv, p] share of each voxel’s occupancy (0 where absent), largest firstU (
np.ndarray) – [Nv, p, 3, 3] mean orientationsspread (
np.ndarray) – [Nv, p] rms misorientation from the mean, degreesn (
np.ndarray) – [Nv, p] candidates in each population