gaze_velocity: Gaze Velocity

Description Usage Arguments Examples

Description

Computes instantaneous gaze velocity using a Savitzky-Golay filter.

Usage

1
2
3
gaze_velocity(x, y, ez, ex = 0, ey = 0, timestamp = -1, blinks = NULL,
  samplerate, screen.resolution, screen.dimensions, minsac = 0.02,
  vt = 1000, at = 1e+05)

Arguments

x

the horizontal coordinate of a point on a screen (pixels)

y

the vertical coordinate of a point on a screen (pixels)

ez

the perpendicular distance from the viewer to the screen (mm)

ex

the horizontal offset of the viewer from screen center (mm)

ey

the vertical offset of the viewer from screen center (mm)

timestamp

vector of class "numeric" containing the external time corresponding to raw gaze samples

blinks

a vector of class logical indicating blinks or otherwise bad data in the velocity vector

samplerate

the number of samples taken in one second of time

screen.resolution

vector of class "numeric", the resolution of the screen (pixels)

screen.dimensions

vector of class "numeric", the physical dimensions of the screen (mm)

minsac

the minimum saccade duration in seconds

vt

the max peak velocity allowed for good data

at

the max peak acceleration allowed for good data

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
data(smi)
d <- with(smi, gaze_velocity(smi_sxl, smi_syl,
                             smi_ezl, smi_exl, smi_eyl,
                             timestamp=smi_time, blinks=(smi_dyl==0),
                             500, 1680, 1050, 473.76, 296.1)
d

d <- with(highspeed, gaze_velocity(x,y,1250,1024,768,.38,.30,.67,
                         blinks=(x==0|y==0)))
d

RyanHope/gazetools documentation built on May 9, 2019, 10:38 a.m.