trackpy.motion.direction_corr

trackpy.motion.direction_corr(t, frame1, frame2)

Compute the cosine between every pair of particles’ displacements.

Parameters:
tDataFrame

trajectories, containing columns particle, frame, x, and y

frame1frame number
frame2frame number
Returns:
DataFrame for all particle pairs, including dx, dy, and direction