4.13. cpforager.processing.add_filtered_acc

cpforager.processing.add_filtered_acc(df, params)

Add to the dataframe the additional ax_s, ay_s, az_s, ax_d, ay_d and az_d columns of the static and the dynamic components triaxial accelerations.

Parameters:
  • df (pandas.DataFrame) – dataframe with step_time, ax, ay and az columns.

  • params (dict) – parameters dictionary.

Returns:

the dataframe with the additional ax_s, ay_s, az_s, ax_d, ay_d and az_d columns of the static and the dynamic components of triaxial acceleration using a filter or a rolling window.

Return type:

pandas.DataFrame

Accelerations can be filtered using :
  • a rolling average of the dynamical acceleration over a given time window.

  • a Butterworth high-pass filter.

Note

The required fields in the parameters dictionary are filter_type and according to this value, either acc_time_window for rolling average or cutoff_f and order for high-pass filtering.