Experimental#
experimental.py module contains functions for implementing algorithms that
are still experimental. No guarantees are made regarding the performance of
the algorithms in this module.
—-
- monalysa.experimental.get_move_segment_times(vel: array, delt: float, speedth: float = 0.05, onth: float = 0.1, offth: float = 0.1, remove_on_before_off: bool = True, durtol: float = 0.1) array#
Return start and stop indices for different movement segments from velocity data.
- Parameters:
vel (np.array) – Velocity data with columns corresponding to different components, and rows corresponding to different samples.
delt (float) – Sampling time of the given velocity data in seconds. This should be a positive number.
speedth (float) – Speed threshold (ratio with respect to maximum speed) for detecting movement segments. Time instants where speed is lower than this threshold multiplied by the max speed are considered rest. This should be a number between 0 and 1. The default value is 0.05.
onth (float) – Time duration threshold in seconds below which movements segments are ignored. This should be a positive number. The default value is 0.1.
offth (float) – Time duration threshold in seconds below which an interval between movements segments are ignored. This should be a positive number. The default value is 0.1.
remove_on_before_off (bool) – If True, remove short movement segments first, before removing short intervals between movement. The default value is True.
durtol (float) – Percentage of duration before and after a movement segment to consider for identifying movement segments. This value should be between 0 and 1. The default value is 0.1.
- Returns:
An (Nx2) array with start and stop indices for different movement segments. The first column corresponds to start times, and the second column corresponds to stop times.
- Return type:
np.array