agora.utils.association.validate_association

validate_association(association, indices, match_column=None)[source]
Select rows from the first array that are present in both.

We use casting for fast multiindexing, generalising for lineage dynamics

Parameters
associationnp.ndarray

2-D array where columns are (trap, mother, daughter) or 3-D array where dimensions are (X, (trap,mother), (trap,daughter))

indicesnp.ndarray

2-D array where each column is a different level.

match_column: int

int indicating a specific column is required to match (i.e. 0-1 for target-source when trying to merge tracklets or mother-bud for lineage) must be present in indices. If it is false one match suffices for the resultant indices vector to be True.

Returns
np.ndarray

1-D boolean array indicating valid merge events.

np.ndarray

1-D boolean array indicating indices with an association relationship.

[ True False False] [ True True False]

Return type

Tuple[ndarray, ndarray]