agepy.mag.trajectory.get_vavg

get_vavg(df, periods=1, dim_col='x', cutoff=0.5)

Calculates the mean velocity of the particles.

Takes the dataframe of particles, calculates diff for given dimension, then mean of absolute value for each particle in this df. Finally returns the mean of all these particles.

Parameters:
df: DataFrame

with particle data (from trackpy)

periods: int, optional

Window of frames to get diff/velocity from. Default is 1.

dim_col: string, optional

Calculate velocity on column x or y. Default is “x”.

cutoff: float, optional

Will only evaluate velocities which are x% of max. v.

Returns:
vavg: pd.Series

The mean absolute maximum velocity of each particle.

Return type:

Series