skdh.features.SPARC#
- class skdh.features.SPARC(padlevel=4, fc=10.0, amplitude_threshold=0.05)#
A quantitative measure of the smoothness of a signal. SPARC stands for the SPectral ARC length.
- Parameters:
- padlevelint
Indicates the level of zero-padding to perform on the signal. This essentially multiplies the length of the signal by 2^padlevel. Default is 4.
- fc: float, optional
The max. cut off frequency for calculating the spectral arc length metric. Default is 10.0 Hz.
- amplitude_thresholdfloat, optional
The amplitude threshold to used for determining the cut off frequency up to which the spectral arc length is to be estimated. Default is 0.05
- Attributes:
- amp_thresh
- fc
- padlevel
Methods
compute(signal, fs, *[, columns, windowed])Compute the SPARC
References
[1]S. Balasubramanian, A. Melendez-Calderon, A. Roby-Brami, and E. Burdet, “On the analysis of movement smoothness,” J NeuroEngineering Rehabil, vol. 12, no. 1, p. 112, Dec. 2015, doi: 10.1186/s12984-015-0090-9.
- compute(signal, fs, *, columns=None, windowed=False)#
Compute the SPARC
- Parameters:
- signalarray-like
Array-like containing values to compute the SPARC for.
- fsfloat, optional
Sampling frequency in Hz. If not provided, default is 1.0Hz
- axisint, optional
Axis along which the signal entropy will be computed. Ignored if signal is a pandas.DataFrame. Default is last (-1).
- Returns:
- sparcnumpy.ndarray
Computed SPARC.