compute_threshold#
- pymovements.events.detection.microsaccades.compute_threshold(arr: ndarray, method: str = 'engbert2015') ndarray[source]#
Determine threshold by computing variation.
The following methods are supported:
std: This is the channel-wise standard deviation.
mad: This is the channel-wise median absolute deviation.
engbert2003: This is the threshold method as described in [Engbert et al., 2003].
engbert2015: This is the threshold method as described in [Engbert et al., 2015].
- Parameters:
arr (numpy.ndarray) – Array for which threshold is to be computed.
method (str) – Method for threshold computation. (default: ‘engbert2015’)
- Returns:
Threshold values for horizontal and vertical direction.
- Return type:
- Raises:
ValueError – If passed method is not supported.