trackpy.relate_frames

trackpy.relate_frames(t, frame1, frame2, pos_columns=None)

Find the displacement vector of all particles between two frames.

Parameters:

t : DataFrame

trajectories

pos_columns = list

names of column with position [‘x’, ‘y’]

frame1 : integer

frame2 : integer

Returns:

DataFrame

indexed by particle, containing: x, y, etc. (corresponding to frame1) x_b, y_b, etc. (corresponding to frame2) dx, dy, etc. dr direction (only if pos_columns=[‘x’, ‘y’])