GazeParser.MicroSaccade - detect microsaccades

Detecting microsaccades with the method of Engbert & Kliegl (2003). The class Microsacc and the binsacc function are port of Engbert and Kliel’s matlab scripts.

Example

import GazeParser
(data, additionalData) = GazeParser.load('datafile.db')
from GazeParser.MicroSacc import MicroSacc, buildMicroSaccadesListMonocular

#get a list of microsaccades in the same format
# as that of the original matlab function.
microsacc = MicroSacc(data[0].L, 250)

#get a list of microsaccades as a list of the GazeParser.Core.Saccade objects.
microsacc = buildMicroSaccadesListMonocular(data[0].L, samplingFreq=250)
REFERENCE:
Engbert, R., & Kliegl, R. (2003). Microsaccades uncover the orientation of covert attention. Vision Res, 43(9), 1035-1045.
class GazeParser.MicroSaccade.MicroSacc(data, samplingFreq, velocityType='slow', vfac=6, minSamples=3)
Parameters:
  • data (numpy.ndarray) – gaze data.
  • samplingFreq (float) – sampling frequency.
  • velocityType (str) – ‘slow’ or ‘fast’. See Engbert & Kliegl (2003) for detail. Default value is ‘slow’.
  • vfac (int) – Modifying threshold for microsaccade detection. See Engbert & Kliegl (2003) for detail. Default value is 6.
  • minSamples (int) – Microsaccades must have samples equal or larger than this value. Default value is 3.
ms = None

An nx7 array which holds detected microsaccades

column description
0 index of the starting point of the microsaccade
1 index of the termination pointof the microsaccade
2 peak velocity
3 amplitude
4 direction
5 holizontal amplitude
6 vertical amplitude
GazeParser.MicroSaccade.buildMicroSaccadeListBinocular(gazeData, samplingFreq=None, velocityType='slow', vfac=6, minSamples=3)

Get a list of binocular microsaccades as a list of the GazeParser.Core.Saccade objects.

Parameters:
  • gazeData – an instance of GazeData
  • velocityType (str) – ‘slow’ or ‘fast’. See Engbert & Kliegl (2003) for detail. Default value is ‘slow’.
  • vfac (int) – Modifying threshold for microsaccade detection. See Engbert & Kliegl (2003) for detail. Default value is 6.
  • minSamples (int) – Microsaccades must have samples equal or larger than this value. Default value is 3.
SamplingFreq:

sampling frequency of the data. If None, sampling frequency is calculated from the data. Default value is None.

GazeParser.MicroSaccade.buildMicroSaccadesListMonocular(gazeData, eye, samplingFreq=None, velocityType='slow', vfac=6, minSamples=3)

Get a list of microsaccades as a list of the GazeParser.Core.Saccade objects.

Parameters:
  • gazeData – an instance of GazeData
  • eye (str) – ‘L’ or ‘R’
  • velocityType (str) – ‘slow’ or ‘fast’. See Engbert & Kliegl (2003) for detail. Default value is ‘slow’.
  • vfac (int) – Modifying threshold for microsaccade detection. See Engbert & Kliegl (2003) for detail. Default value is 6.
  • minSamples (int) – Microsaccades must have samples equal or larger than this value. Default value is 3.
SamplingFreq:

sampling frequency of the data. If None, sampling frequency is calculated from the data. Default value is None.