The harmonic ratio quantifies the smoothness/rhythmicity of trunk acceleration over a stride from its Fourier series: because there are two steps per stride, the even harmonics carry the step-to-step-symmetric (in-phase) content and the odd harmonics the asymmetric content. For anterior-posterior and vertical acceleration the ratio is even/odd (higher = smoother); for medio-lateral it is odd/even (Menz et al. 2003; Bellanca et al. 2013).
Usage
harmonicRatio(
signal,
n_strides = 1L,
direction = c("AP", "vertical", "ML"),
n_harmonics = 20L
)Arguments
- signal
Numeric acceleration over an integer number of strides (a single stride if
n_strides = 1).- n_strides
Number of strides spanned by
signal(default 1); the Fourier fundamental is the stride frequency.- direction
"AP"/"vertical"(even/odd) or"ML"(odd/even).- n_harmonics
Number of harmonics summed (default 20).