pymovements.events.peak_velocity#
- pymovements.events.peak_velocity(*, velocity_column: str = 'velocity', n_components: int = 2) Expr[source]#
Peak velocity of an event.
The peak velocity is calculated as:
\[\text{Peak Velocity} = \max \left(\sqrt{v_x^2 + v_y^2} \right)\]where \(v_x\) and \(v_y\) are the velocity components in \(x\) and \(y\) direction, respectively.
- Parameters:
velocity_column – The column name of the velocity tuples.
n_components – Number of positional components. Usually these are the two components yaw and pitch.
- Raises:
ValueError – If number of components is not 2.