pymovements.events.disposition#
- pymovements.events.disposition(*, position_column: str = 'position', n_components: int = 2) Expr[source]#
Disposition of an event.
The disposition is calculated as:
\[\text{Disposition} = \sqrt{(x_0 - x_n)^2 + (y_0 - y_n)^2}\]where \(x_0\) and \(y_0\) are the coordinates of the starting position and \(x_n\) and \(y_n\) are the coordinates of the ending position of an event.
- Parameters:
position_column – The column name of the position tuples.
n_components – Number of positional components. Usually these are the two components yaw and pitch.
- Raises:
TypeError – If position_columns not of type tuple, position_columns not of length 2, or elements of position_columns not of type str.