Measure the diagonal size of a trajectory.
Parameters: | single_trajectory : DataFrame containing a single trajectory pos_columns = list
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)