dispel.signal.filter module#
Signal filtering functions.
- dispel.signal.filter.butterworth_band_pass_filter(data, lower_bound, upper_bound, order=2, freq=None, zero_phase=True)[source]#
Filter a series with a butterworth band-pass filter.
- Parameters:
data (Series) – The time series to be filtered
lower_bound (float) – The lower bound of frequencies to filter
upper_bound (float) – The upper bound of frequencies to filter
freq (float | None) – The sampling frequency of the time series in Hz. If the passed
data
has an evenly spaced time series index it will be determined automatically.order (int) – The order of the filter
zero_phase (bool | None) – Boolean indicating whether zero phase filter (filtfilt) to be used
- Returns:
The filtered
data
.- Return type:
- dispel.signal.filter.butterworth_high_pass_filter(data, cutoff, order=2, freq=None, zero_phase=True)[source]#
Filter a series with a butterworth high-pass filter.
- Parameters:
data (Series) – The time series to be filtered
cutoff (float) – The upper bound of frequencies to filter
freq (float | None) – The sampling frequency of the time series in Hz. If the passed
data
has an evenly spaced time series index it will be determined automatically.order (int) – The order of the filter
zero_phase (bool | None) – Boolean indicating whether zero phase filter (filtfilt) to be used
- Returns:
The filtered
data
.- Return type:
- dispel.signal.filter.butterworth_low_pass_filter(data, cutoff, order=2, freq=None, zero_phase=True)[source]#
Filter a series with a butterworth low-pass filter.
- Parameters:
data (Series) – The time series to be filtered
cutoff (float) – The lower bound of frequencies to filter
order (int) – The order of the filter
freq (float | None) – The sampling frequency of the time series in Hz. If the passed
data
has an evenly spaced time series index it will be determined automatically.zero_phase (bool | None) – Boolean indicating whether zero phase filter (filtfilt) to be used
- Returns:
The filtered
data
.- Return type: