GazeParser.Converter - convert data files to GazeParser format

GazeParser.Converter.EyelinkToGazeParser(EDFfile, eye, overwrite=False, config=None)

Convert an Eyelink EDF file to a GazeParser file. ‘edf2asc.exe’ must be in a directory that is in your PATH. If EDF file name is ‘foo.edf’, the output file name is ‘foo.db’

Parameters:
  • inputfile (str) – name of EDF file to be converted.
  • eye (str) – Output both-eye (‘B’), left-eye (‘L’) or right-eye (‘R’) data.
  • overwrite (Boolean) – If this parameter is true, output file is overwritten. The default value is False.
  • str config (GazeParser.Configuration,) – An instance of GazeParser.Configuration that Specifies conversion configurations. If value is a string, it is interpreted as a filename of GazeParser.configuration file. If value is none, default configuration is used. The default value is None.
GazeParser.Converter.TobiiToGazeParser(inputfile, overwrite=False, config=None)

Convert an Tobii TSV file to a GazeParser file. Text export configuration should be ‘All data’. If TSV file name is ‘foo.tsv’, the output file name is ‘foo.db’

Parameters:
  • inputfile (str) – name of TSV file to be converted.
  • overwrite (Boolean) – If this parameter is true, output file is overwritten. The default value is False.
  • str config (GazeParser.Configuration,) – An instance of GazeParser.Configuration that Specifies conversion configurations. If value is a string, it is interpreted as a filename of GazeParser.configuration file. If value is none, default configuration is used. The default value is None.
GazeParser.Converter.TrackerToGazeParser(inputfile, overwrite=False, config=None, useFileParameters=True)

Convert an SimpleGazeTracker data file to a GazeParser file. If GazeTracker data file name is ‘foo.csv’, the output file name is ‘foo.db’

Parameters:
  • inputfile (str) – name of GazeParser file to be converted.
  • overwrite (Boolean) – If this parameter is true, output file is overwritten. The default value is False.
  • str config (GazeParser.Configuration,) – An instance of GazeParser.Configuration that Specifies conversion configurations. If value is a string, it is interpreted as a filename of GazeParser.configuration file. If value is none, default configuration is used. The default value is None.
  • useFileParameters (Boolean) – If this parameter is true, conversion configurations are overwritten by parameters defined in the data file. The default value is True.
GazeParser.Converter.applyFilter(T, HV, config, decimals=2)

Apply filter to gaze data. Filter type is specified by GazeParser.Configuration.Config object.

Parameters:
  • T – Timestamp (N x 1)
  • HV – Horizontal and vertical gaze position (N x 2)
  • config – GazeParser.Configuration.Cofig object.
Decimals:

filtered data are rounded to the given number of this parameter. Default value is 2.

Returns:

filtered data.

GazeParser.Converter.buildEventListBinocular(T, LHV, RHV, config)
GazeParser.Converter.buildEventListMonocular(T, HV, config)
GazeParser.Converter.buildMsgList(M)
GazeParser.Converter.linearInterpolation(t, w)

Fill missing data by linear interpolation.

Parameters:
  • t – Timestamp (N x 1)
  • w – Data to be interpolated (N x 1)
Returns:

Filled data.

GazeParser.Converter.parseBlinkCandidates(T, HVs, config)
GazeParser.Converter.parseSaccadeCandidatesWithVACriteria(T, HV, config)
GazeParser.Converter.rectifyData(T, HV, frequency)
Parameters:
  • T – Timestamp (N x 1)
  • HV – Horizontal and vertical gaze position (N x 2)
  • frequency – sammpling frequency in Hz.
GazeParser.Converter.rectifyTimeStamp(t, threshold=None)
Parameters:
  • t – Timestamp (N x 1)
  • threshold

Note

This function is obsolete.