trackpy.motion.diagonal_size

trackpy.motion.diagonal_size(single_trajectory, pos_columns=None, t_column='frame')

Measure the diagonal size of a trajectory.

Parameters:
single_trajectoryDataFrame containing a single trajectory
pos_columns = list

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

t_column = ‘frame’
Returns:
floatlength of diangonal of rectangular box containing the trajectory

Examples

>>> diagonal_size(single_trajectory)
>>> many_trajectories.groupby('particle').agg(tp.diagonal_size)
>>> many_trajectories.groupby('particle').filter(lambda x: tp.diagonal_size(x) > 5)