Configure GazeParser

GazeParser configuration file is a plain text file. This is a sample of GazeParser configuration file.

[GazeParser]
RECORDED_EYE = L
SCREEN_ORIGIN = BottomLeft
TRACKER_ORIGIN = BottomLeft
SCREEN_WIDTH = 1024
SCREEN_HEIGHT = 768
DOTS_PER_CENTIMETER_H = 24.26
DOTS_PER_CENTIMETER_V = 24.26
VIEWING_DISTANCE = 57.2957795131
SACCADE_VELOCITY_THRESHOLD = 22
SACCADE_ACCELERATION_THRESHOLD = 3800
SACCADE_MINIMUM_DURATION = 12
SACCADE_MINIMUM_AMPLITUDE = 1.0
FIXATION_MINIMUM_DURATION = 12
BLINK_MINIMUM_DURATION = 50
RESAMPLING = 0
FILTER_TYPE = identity
FILTER_WN = 0.2
FILTER_SIZE = 5
FILTER_ORDER = 3

It is recommended to prepare GazeParser configuration file for each experimental conditions. For example, suppose that resolution of a display for stimulus presentation is XGA (1024x768) in some experiments and FullHD (1920x1080) in the other experiments. In such a case, prepare two configuration files named ‘GazeParser-XGA.cfg’ and ‘GazeParser-FullHD.cfg’ (or any names as you like). Then, edit parameters concerning display resolution in each configuration file. Probably not only SCREEN_WIDTH and SCREEN_HIGHT but also DOTS_PER_CENTIMETER_H and DOTS_PER_CENTIMETER_V would have to be edited.:

(GazeParser-XGA.cfg)
SCREEN_WIDTH = 1024
SCREEN_HEIGHT = 768
DOTS_PER_CENTIMETER_H = 34.11
DOTS_PER_CENTIMETER_V = 34.11

(GazeParser-FullHD.cfg)
SCREEN_WIDTH = 1920
SCREEN_HEIGHT = 1080
DOTS_PER_CENTIMETER_H = 24.26
DOTS_PER_CENTIMETER_V = 24.26

In experiments with XGA display, send parameters in GazeParser-XGA.cfg to SimpleGazeTraker by sendSettings().:

import GazeParser.Configuration
import GazeParser.TrackingTools

(snip)
tracker = GazeParser.TrackingTools.getController(backend='PsychoPy')

#load configuration file
conf = GazeParser.Configuration.Config('GazeParser-XGA.cfg')
#send
tracker.sendSettings(conf.getParametersAsDict())

In a similar way, send parameters in GazeParser-FullHD.cfg in experiments with Full HD display.:

import GazeParser.Configuration
import GazeParser.TrackingTools

(snip)
tracker = GazeParser.TrackingTools.getController(backend='PsychoPy')

#load configuration file
conf = GazeParser.Configuration.Config('GazeParser-FullHD.cfg')
#send
tracker.sendSettings(conf.getParametersAsDict())

These codes insert parameters of GazeParser in SimpleGazeTracker configuration file. GazeParser.Converter.TrackerToGazeParser() utilizes inserted parameters to detect saccades and fixations.

Parameters

Parameter Description
RECORDED_EYE Specify recorded eye(s). ‘L’ for the left eye only, ‘R’ for the right eye only, or ‘B’ for binocular recording.
SCREEN_ORIGIN Specify the origin of the presentation screen. ‘Center’, ‘BottomLeft’ or ‘TopLeft’.
TRACKER_ORIGIN Specify the origin of the tracker origin. Usually, this parameter is coincide with SCREEN_ORIGIN
SCREEN_WIDTH Specify the width of the presentation screen in px. (e.g. 1024 for XGA screen)
SCREEN_HEIGHT Specify the height of the presentation screen in px. (e.g. 768 for XGA screen)
DOTS_PER_CENTIMETER_H Specify how many dots are horizontally arranged in one centimeter on the presentation screen. (Screen width[px] / Screen width[cm])
DOTS_PER_CENTIMETER_V Specify how many dots are vertically arranged in one centimeter on the presentation screen. (Screen height[px] / Screen height[cm])
VIEWING_DISTANCE Specify the distance between the presentation screen and the participant’s eye. The unit is cm.
SACCADE_VELOCITY_THRESHOLD Eye movements faster than this value is considered as saccadic eye movement.
SACCADE_ACCELERATION_THRESHOLD Eye movements accerelating quicker than this value is considered as saccadic eye movement.
SACCADE_MINIMUM_DURATION Specify minimum saccade duration in milliseconds. Saccadic eye movements shorter than this value is marged to neighboring fixations.
SACCADE_MINIMUM_AMPLITUDE Specify minimum saccade amplitude in degree. Saccadic eye movements shorter than this value is marged to neighboring fixations. New in 0.6.1
FIXATION_MINIMUM_DURATION Specify minimum fixation duration in milliseconds. Fixational eye movements shorter than this value is marged to neighboring saccades.
BLINK_MINIMUM_DURATION Specify minimum blink duration in milliseconds. A lack of data longer than this value is considered as a blink.
RESAMPLING If RESAMPLING is a positive number, timestamps and gaze position data are resampled at a frequency specified by this value before applying lowpass filter. If zero, data are not resampled. Default value is 0. New in 0.6.6
FILTER_TYPE Specify smoothing filter for noise reduction. ‘identity’ for no filtering, ‘ma’ for moving average, ‘butter’ for butterworth low-pass filter, or ‘butter-filtfilt’ for forward-backward butterworth filter.
FILTER_WN If FILTER_TYPE is ‘butter’ or ‘butter-filtfilt’, the cutoff frequency is specifiyed by this parameter. The range of the value is from 0.0 to 1.0. 1.0 means the half of the sampling frequency.
FILTER_SIZE If FILTER_SIZE is ‘ma’, the range of moving average is specified by this parameer.
FILTER_ORDER If FILTER_TYPE is ‘butter’ or ‘butter-filtfilt’, the order of the filter is specified by this parameter.