3.13. cpforager.processing.add_filtered_acc

cpforager.processing.add_filtered_acc(df, params)

Add to the dataframe the additional ax_f, ay_f and az_f columns of the filtered 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_f, ay_f and az_f columns of the filtered triaxial accelerations.

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.