resurfemg.postprocessing.baseline module¶
- Copyright 2024 University of Twente Licensed under the Apache License, version
2.0. See LICENSE for details.
This file contains functions to calculate moving baselines from a filtered EMG envelope.
- resurfemg.postprocessing.baseline.moving_baseline(signal_env, window_s, step_s, set_percentile=33)¶
This function calculates a moving baseline from a envelope data in accordance with Graßhoff et al. (2021) ————————————————————————— :param emg_env: envelope signal :type emg_env: ~numpy.ndarray :param window_s: window length in samples :type window_s: int :param step_s: number of consecutive samples with the same baseline value :type step_s: int :param: set_percentile :type: numpy percentile
- Returns rolling_baseline:
The moving baseline for the signal envelope
- Rtype rolling_baseline:
numpy.ndarray
- resurfemg.postprocessing.baseline.slopesum_baseline(signal_env, window_s, step_s, fs, set_percentile=33, augm_percentile=25, ma_window=None, perc_window=None)¶
This function calculates the augmented version of the moving baseline over a signal envelope, using a slope sum. ————————————————————————— :param signal_env: envelope signal :type signal_env: ~numpy.ndarray :param window_s: window length in seconds :type window_s: int :param step_s: number of consecutive samples with the same baseline value :type step_s: int :param emg_fs: emg sampling rating :type emg_fs: int :param set_percentile :type set_percentile: float (0-100) :param ma_window: moving average window in samples for average dy/dt :type ma_window: int :param perc_window: number of consecutive samples with the same baseline value :type perc_window: int
- Returns _slopesum_baseline:
The slopesum baseline for the signal envelope
- Return type:
- Returns y_baseline_mean:
The running mean baseline of the baseline
- Return type:
- Returns y_baseline_std:
The running standard deviation of the baseline
- Return type:
- Returns y_baseline_series:
The running baseline series
- Return type: