deepof.annotation_utils.close_double_contact

deepof.annotation_utils.close_double_contact(pos_dframe: DataFrame, left1: str, left2: str, right1: str, right2: str, tol: float, arena_abs: int, arena_rel: int, 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.

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

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

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

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

  • tol (float) – maximum distance for which a contact is reported

  • arena_abs (int) – length in mm of the diameter of the real arena

  • arena_rel (int) – length in pixels of the diameter of the arena in the video

  • 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)