remove_average function takes a multi-channel signal and removes the average value over a filtering window.

remove_average(df, sr, order = 0.5)

Arguments

df

dataframe. The input multi-channel signal. The first column is timestamps in POSXlct format. The rest columns are signal values.

sr

number. Sampling rate in Hz of the input signal.

order

number. Window size (in seconds) of the filter. Default is 500 ms.

Value

dataframe. Filtered signal.

Details

This function filters the input multi-channel signal by removing the average value within each sliding window. The sliding window size is decided by \(w = sr * order\).

How is it used in MIMS-unit algorithm?

This function has been considered as one of filtering options during the development of MIMS-unit algorithm. But the released version of MIMS-unit algorithm does not use this function for filtering.

See also

Other filtering functions: bandlimited_interp(), bessel(), iir()

Examples

# Use sample data df = sample_raw_accel_data # View input illustrate_signal(df, plot_maxed_out_line = FALSE)
# Apply filtering output = remove_average(df, sr=80, order=0.5) # View output illustrate_signal(output, plot_maxed_out_line = FALSE)