amplitude#
- pymovements.measure.samples.amplitude(*, position_column: str = 'position', n_components: int = 2) Expr[source]#
Amplitude of an event.
The amplitude is calculated as:
\[\text{Amplitude} = \sqrt{(x_{\text{max}} - x_{\text{min}})^2 + (y_{\text{max}} - y_{\text{min}})^2}\]where \((x_{\text{min}},\; x_{\text{max}})\) and \((y_{\text{min}},\; y_{\text{max}})\) are the minimum and maximum values of the \(x\) and \(y\) components of the gaze positions during an event.
- Parameters:
- Returns:
The amplitude of the event.
- Return type:
pl.Expr
- Raises:
ValueError – If number of components is not 2.