Skip to contents

Use the velocity threshold algorithm from Salvucci & Goldberg (1996) to determine saccadic eye movements. Returns a summary of the saccades found per trial, including start and end coordinates, timing, duration, mean velocity, and peak velocity.

Usage

VTI_saccade(data, sample_rate = NULL, threshold = 150, minDur = 20)

Arguments

data

A dataframe with raw data (time, x, y, trial) for one participant

sample_rate

sample rate of the eye-tracker. If default of NULL, then it will be computed from the timestamp data and the number of samples

threshold

velocity threshold (degrees of VA / sec) to be used for identifying saccades

minDur

minimum duration (ms) expected for saccades. This helps to avoid identification of very short saccades occuring at the boundary of velocity threshold

Value

a data frame giving the saccades found by trial

Examples

VTI_saccade(example_raw_sac[example_raw_sac$trial<=10,])
#>    trialNumber sac_n start  end duration  origin_x origin_y terminal_x
#> 1            1     1   227  277       50  892.2850 532.7300   156.2932
#> 2            1     2   460  523       63  226.1151 499.5046  1459.3134
#> 3            1     3   630  653       23 1491.4453 494.5910  1752.0873
#> 4            2     1   227  283       56  892.2656 541.0739   192.1308
#> 5            2     2   763  840       77  173.7718 520.9121  1541.3770
#> 6            3     1   160  217       57  913.1104 545.6854   152.2252
#> 7            3     2  1093 1120       27 1692.0314 553.0065  1266.2649
#> 8            4     1   283  340       57  935.8781 530.3051   131.5811
#> 9            4     2   696  730       34  128.5837 523.6625   618.0759
#> 10           5     1   246  296       50 1010.6296 542.1412  1706.7832
#> 11           5     2   653  690       37 1672.3358 546.2828   973.2900
#> 12           6     1   197  247       50  841.1113 534.1552   177.3586
#> 13           6     2   590  620       30  173.2091 523.7553   748.6539
#> 14           7     1   180  220       40  760.8648 535.6373   205.1067
#> 15           7     2   554  574       20  218.5966 527.2309   529.1069
#> 16           8     1   174  230       56  913.3894 547.4196   190.8072
#> 17           8     2   574  657       83  171.3734 509.5301  1661.4254
#> 18           9     1   170  230       60  898.6670 544.0779   151.9758
#> 19           9     2   477  567       90  193.5306 521.3675  1662.9927
#> 20          10     1   194  250       56  882.5818 540.6511   207.0548
#> 21          10     2   540  627       87  180.0508 524.4571  1650.8567
#>    terminal_y mean_velocity peak_velocity
#> 1    501.7069      366.2823      456.5382
#> 2    485.6333      488.4571      648.8721
#> 3    550.6735      284.5512      346.2462
#> 4    509.7467      309.1363      445.3536
#> 5    519.1016      445.2093      589.4391
#> 6    523.3356      337.3887      490.4680
#> 7    630.4558      470.6155      773.2718
#> 8    519.0336      357.9397      462.2791
#> 9    596.0885      433.1852      699.4864
#> 10   539.4524      351.2853      463.7055
#> 11   570.9793      495.2926      846.3831
#> 12   525.5338      328.2392      436.6294
#> 13   492.8537      462.8836      668.5812
#> 14   525.2300      344.0023      451.4492
#> 15   674.4199      537.9353      697.1391
#> 16   527.3348      318.2145      471.2241
#> 17   552.5213      448.7033      612.8071
#> 18   530.6465      311.5706      415.2190
#> 19   546.2215      408.7111      594.9715
#> 20   527.9641      297.9789      412.7535
#> 21   563.3275      423.4526      604.0540