#This program uses a univariate spline interpolation to compute a velocity profile from raw sample data and report peak velocity, with error metrics and optional
#angular thresholding.
#
#
# Configuration Options:
configMonocular=False# False for binocular files, True for monocular.Assumes that binocular data is reported with every second sample from the same eye, so if that's the...
# ...format you have, there is no need to separate the files.
configAngleEccentricity=1000.0# Average angular eccentricity threshold, 0.0 to exclude nothing. Optional filter to remove saccades with non-human levels of angular curvature across...
# ...the saccade (i.e. not ballistic with curvature that's impossible - typical of system noise).
configStartBaseline=True# Adds a start baseline value to the velocity profile of each saccade if True. This should be calculated based on spatial precision during fixations. I used...
# ...the mode of rounded intersample velocities.
#configBaselineDistance = 0.002 # How far (seconds) to place the baseline velocity point from the real saccade samples
configEndBaseline=False# Adds an end baseline value to the velocity profile of each saccade if True
configPixelsPerDegree=40.4# Number of pixels per degree of viewing angle
configMaxIntersample=1000# Degrees/sec for which we filter intersample velocities for the calculation of baseline velocity.
configBaselineMethod="accel"# Methods, one of: "mode", "accel", "velocity" can be used to calculate the baseline velocity value
configSampleRate=625# Hertz
configDecimationRate=2# Ratio of 1:n samples. 1 for no decimation.
#configBaselineDistance = 1.0 / (float(configSampleRate)/float(configDecimationRate)) # How far (seconds) to place the baselines from the real samples
configSaccMethod="baseline"# How to detect saccades ("system" or "baseline") baseline will use a simple velocity thresholding to identify saccades, but if a
# system event detection variable is present in the data, this can be used instead
# File format declaration
configDelimiter="\t"# Column separator in files - "\t" is tab.
configTerminator=""# Value in 'sacx' or 'sacy' fields that marks saccade end. In this case, it's a system missing value
# Column header names
configColumnTime="GazeTime"# Absolute time field (seconds)
configColumnSaccX="sacx"# Marked saccades x values
configColumnSaccY="sacy"# Marked saccades x values
configColumnRawX="x"# Raw X
configColumnRawY="y"# Raw Y
configColumnSubject="subject"# A subject delimits a group.
#configColumnSubjectNr = "Trial" # For some systems where the subject is marked as a 'trial' variable (stupid variable name for a subject, but it happens....)
configColumnSubjectNr="subjectnumber"# An individual within that group
configColumnCondition="condition"# An experimental trial identifier which you can insert if you want to compile files later
# Output column names
configColumnPeakVelocity="PeakVelocity"# What to call peak velocity in the output
configColumnErrorRate="ErrorRate"# Error metric calculation in output - this error metric is based on calculus and identifies movements in the data which cannot be eye movements, since they do not obey the calculus of rotations. They are present even in high end systems.
configColumnAmplitude="Amplitude"# Total saccade amplitude calculation - based on the sum of intersample distances
configColumnSkew="Skew"# What to call the skew variable in the output - this is the skew of the velocity profile
configFixedBaseline=0.0
# Input filename
# NOTE: This is overriden by filenames given on the command line
# Discard saccades that have too few velocity points for interpolation (at least two measured samples/one velocity point are necessary even with baseline velocity points added)
iflen(xvals)<=3:
self.isSaccade=False
return
ifyvals[1]==0.0:
yvals[1]=yvals[0]
ifangles[1]==0.0:
angles[1]=angles[2]
ifconfigStartBaseline:
angles[0]=angles[1]# We couldn't set this initially, so set it now.