deepof.annotation_utils.following_path

deepof.annotation_utils.following_path(distance_dframe: DataFrame, position_dframe: DataFrame, follower: str, followed: str, frames: int = 20, tol: float = 0) array

Return True if ‘follower’ is closer than tol to the path that followed has walked over the last specified number of frames.

For multi animal videos only.

Args:

distance_dframe (pandas.DataFrame): distances between bodyparts; generated by the preprocess module position_dframe (pandas.DataFrame): position of bodyparts; generated by the preprocess module follower (str) identifier for the animal who’s following followed (str) identifier for the animal who’s followed frames (int) frames in which to track whether the process consistently occurs, tol (float) Maximum distance for which True is returned

Returns:

follow (np.array): boolean sequence, True if conditions are fulfilled, False otherwise