trackpy.diagonal_size

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

Measure the diagonal size of a trajectory.

Parameters:

single_trajectory : DataFrame containing a single trajectory

pos_columns = list

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

t_column = ‘frame’

Returns:

float : length 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)