tobac.analysis.cell_analysis.calculate_overlap#
- tobac.analysis.cell_analysis.calculate_overlap(track_1, track_2, min_sum_inv_distance=None, min_mean_inv_distance=None)#
Count the number of time frames in which the individual cells of two tracks are present together and calculate their mean and summed inverse distance.
- Parameters:
track_1 (pandas.DataFrame) – The tracks conaining the cells to analyze.
track_2 (pandas.DataFrame) – The tracks conaining the cells to analyze.
min_sum_inv_distance (float, optional) – Minimum of the inverse net distance for two cells to be counted as overlapping. Default is None.
min_mean_inv_distance (float, optional) – Minimum of the inverse mean distance for two cells to be counted as overlapping. Default is None.
- Returns:
overlap – DataFrame containing the columns cell_1 and cell_2 with the index of the cells from the tracks, n_overlap with the number of frames both cells are present in, mean_inv_distance with the mean inverse distance and sum_inv_distance with the summed inverse distance of the cells.
- Return type:
pandas.DataFrame