pymovements.events.engbert.compute_threshold#

pymovements.events.engbert.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 and Kliegl, 2003].

  • engbert2015: This is the threshold method as described in [Engbert et al., 2015].

Parameters:
  • arr (np.ndarray) – Array for which threshold is to be computed.

  • method (str) – Method for threshold computation.

Returns:

Threshold values for horizontal and vertical direction.

Return type:

np.ndarray

Raises:

ValueError – If passed method is not supported.