candidates#

anri.index.candidates(d, pred, ring_j, pos, scan, dims, k, vb, qc=16, log=<built-in function print>)[source]#

Pick each voxel’s k best orientations by the first MLEM update from unit occupancy.

f1 = A^T(d / A 1) / A^T 1: two passes over every (voxel, orientation), in blocks of vb voxels. Dividing by A 1 down-weights crowded cells, as MLEM does.

Parameters:
  • d (Array) – [n_cells] histogram

  • pred (tuple) – (eta, om, use, w), each [Nq, Nj] with Nq a multiple of qc

  • ring_j (Array) – [Nj] ring of each prediction

  • pos (Array) – [Nv, 3] positions, Nv a multiple of vb (pad_voxels())

  • scan (dict) – Rows and (b_e, b_o, n_e, n_o), see system()

  • dims (tuple) – Rows and (b_e, b_o, n_e, n_o), see system()

  • k (int) – Candidates per voxel

  • vb (int) – Voxels per block and orientations per chunk

  • qc (int, default: 16) – Voxels per block and orientations per chunk

  • log (Callable, default: <built-in function print>) – Progress messages

Returns:

f1, cand (jax.Array) – [Nv, k] first-update occupancies and orientation indices