tomodrgn.analysis.convert_original_indices#

convert_original_indices(ind_sel: ndarray, n_original: int, ind_original_sel: ndarray | None = None) ndarray[source]#

Convert selected indices relative to a filtered particle stack into indices relative to the unfiltered particle stack. Often useful when selecting a subset of indices when analyzing a model itself trained using –ind to filter the referenced particle stack.

Parameters:
  • ind_sel – indices to keep from filtered particle stack

  • n_original – the number of particles in the original unfiltered particle stack

  • ind_original_sel – indices used to generate the filtered particle stack from the unfiltered particle stack

Returns:

array of ind_sel indices re-indexed to be relative to the unfiltered particle stack