FLOCK.VelocityFeats
index
c:\users\james\gitrepos\gps-ruck\flock\velocityfeats.py

Functions for calculation of velocity 
and functions for feature extraction related to that
 
Including velocity over time, velocity differences over time within the group (max-min and varaince)

 
Modules
       
numpy
pandas

 
Functions
       
acc_corr(acc_dfs, names=None, time_window=30)
get the correlation of acceleration across soldiers
 
input: list of acceleration dfs for movement periods
 
output: avearage over correlation matrix for each timepoint
get_accel(vel_dfs, names, UTM=True)
Get acceleration from velocity datasets using another differencing
 
Args:
    vel_dfs (list): list of velocity (first difference) DataFrames
    names (list): list of solider names
    UTM (bool, optional): True if using UTM data, false if GPS data. Defaults to True.
 
Returns:
    acc_dfs (list): DataFrames containing accelleration data
get_vel_feats(vel_dfs)
Get some velocity features from velocity datasets
Variance: how each soldiers velocity varies throughout each movement period
Difference: how different is the speed of the fastest soldier vs speed of slowest soldier
 
Args:
    vel_dfs (list): list of velocity (first difference) DataFrames
 
Returns:
    vel_var (list): list of varainces for the velocity dataframe
    vel_diff (list): list of max difference over time for soldier velocities
get_velocities(smoothed_movements, names, UTM=True)
Get velocities from smoothed datasets using the first difference
 
Args:
    smoothed_movements (list): list of extra smooth DataFrames
    names (list): list of individual's names
    UTM (bool, optional): True if using UTM data, false if GPS data. Defaults to True.
 
Returns:
    vel_dfs (list): DataFrames of first differences from the
vel_corr(vel_dfs, time_window=30)
get the correlation of velocity across soldiers
 
Args:
    vel_dfs (list of DataFrames): list of velosity DataFrames
    time_window (int, optional): time window for calculating at velocity correlation. Defaults to 30.
 
Returns:
    corr_dfs (list of DataFrames): list of dataframes with velocity correlation within the group over time