deepof.annotation_utils.close_double_contact

deepof.annotation_utils.close_double_contact(pos_dframe: DataFrame, left1: str, left2: str, right1: str, right2: str, rel_tol: float, rev: bool = False) array

Return a boolean array that’s True if the specified body parts are closer than tol.

Parameters:
  • pos_dframe (pandas.DataFrame) – DLC output as pandas.DataFrame; only applicable to two-animal experiments.

  • #left_len (float) – Length of animal 1

  • left1 (string) – First contact point of animal 1

  • left2 (string) – Second contact point of animal 1

  • #right_len (float) – Length of animal 2

  • right1 (string) – First contact point of animal 2

  • right2 (string) – Second contact point of animal 2

  • rel_tol (float) – relative shar which affects the maximum distance for which a contact is reported

  • rev (bool) – reverses the default behaviour (nose2tail contact for both mice)

Returns:

True if the distance between the two specified points is less than tol, False otherwise

Return type:

double_contact (np.array)