skdh.features.RangePowerSum#
- class skdh.features.RangePowerSum(padlevel=2, low_cutoff=0.0, high_cutoff=5.0, demean=False, use_modulus=False, normalize=False)#
Sum of power spectral density values within the specified range. Can be normalized to the power spectral sum across the entire frequency range.
- Parameters:
- padlevelint, optional
Padding (factors of 2) to use in the FFT computation. Default is 2.
- low_cutofffloat, optional
Low value of the frequency range. Default is 0.0 Hz
- high_cutofffloat, optional
High value of the frequency range. Default is 5.0 Hz
- demeanbool, optional
Demean (ignore 0 frequency component). Default is False.
- use_modulusbool, optional
Use modulus instead of power. Default is False
- normalizebool, optional
Normalize the range power sum by the total power spectral sum. Default is False.
- Attributes:
- demean
- high_cut
- low_cut
- normalize
- pad
- use_modulus
Methods
compute(signal[, fs, axis])Compute the power spectral density sum within the specified range.
Notes
The padlevel parameter effects the number of points to be used in the FFT computation by factors of 2. The computation of number of points is per
\[nfft = 2^{ceil(log_2(N)) + padlevel}\]So padlevel=2 would mean that for a signal with length 150, the number of points used in the FFT would go from 256 to 1024.
- compute(signal, fs=1.0, *, axis=-1)#
Compute the power spectral density sum within the specified range.
- Parameters:
- signalarray-like
Array-like containing values to compute the power spectral sum for.
- fsfloat, optional
Sampling frequency in Hz. If not provided, default is assumed to be 1Hz.
- axisint, optional
Axis along which the signal entropy will be computed. Ignored if signal is a pandas.DataFrame. Default is last (-1).
- Returns:
- pssnumpy.ndarray
Computed power spectral sum.