pymovements.utils.filters.filter_candidates_remove_nans#
- pymovements.utils.filters.filter_candidates_remove_nans(candidates: list[ndarray], values: ndarray) list[ndarray] #
Filter a list of candidates for an event-detection algorithm.
Removes leading and ending np.nans for all candidates in candidates
- Parameters:
candidates (list[np.ndarray]) – List of candidates; each candidate consists of a list of indices
values (np.ndarray) – shape (N, 1) or shape (N, 2) Corresponding continuous 1D/2D values time series.
- Returns:
Returns a filtered list of candidates.
- Return type:
list[np.ndarray]