pymovements.events.ivt.ivt
- pymovements.events.ivt.ivt(positions: list[list[float]] | np.ndarray, velocities: list[list[float]] | np.ndarray, velocity_threshold: float) list[Fixation][source]
Identification of fixations based on velocity-threshold
The algorithm classifies each point as a fixation if the velocity is below the given velocity threshold. Consecutive fixation points are merged into one fixation.
The implementation is based on the description and pseudocode from Salvucci and Goldberg [Salvucci and Goldberg, 2000].
- Parameters
positions (array-like, shape (N, 2)) – Continuous 2D position time series.
velocities (array-like, shape (N, 2)) – Corresponding continuous 2D velocity time series.
velocity_threshold (float) – Threshold for a point to be classified as a fixation. If the velocity is below the threshold, the point is classified as a fixation.
- Returns
List of Fixation events
- Return type
list[Fixation]
- Raises
ValueError – If positions or velocities are None If positions or velocities do not have shape (N, 2) If positions and velocities have different shapes If velocity threshold is None. If velocity threshold is not greater than 0.