sit2standpy.v2.get_stillness¶
-
sit2standpy.v2.utility.
get_stillness
(filt_accel, dt, window, gravity, thresholds)¶ Stillness determination based on filtered acceleration magnitude and jerk magnitude
Parameters: - filt_accel : numpy.ndarray
1D array of filtered magnitude of acceleration data, units of m/s^2
- dt : float
Sampling time, in seconds
- window : float
Moving statistics window length, in seconds
- gravity : float
Gravitational acceleration, as measured by the sensor during static periods.
- thresholds : dict
Dictionary of the 4 thresholds to be used - accel moving avg, accel moving std, jerk moving avg, and jerk moving std. Acceleration average thresholds should be for difference from gravitional acceleration.
Returns: - still : numpy.ndarray
(N, ) boolean array of stillness (True)
- starts : numpy.ndarray
(Q, ) array of indices where stillness starts. Includes index 0 if still[0] is True. Q < (N/2)
- stops : numpy.ndarray
(Q, ) array of indices where stillness ends. Includes index N-1 if still[-1] is True. Q < (N/2)