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
saccade_VTI(
data,
sample_rate = NULL,
threshold = 150,
min_dur = 20,
participant_ID = "participant_ID"
)
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
- min_dur
minimum duration (ms) expected for saccades. This helps to avoid identification of very short saccades occurring at the boundary of velocity threshold
- participant_ID
the variable that determines the participant identifier. If no column present, assumes a single participant
Details
It can take either single participant data or multiple participants where there is a variable for unique participant identification.
The function looks for an identifier named participant_ID
by default and will treat this as multiple-participant data as default,
if not it is handled as single participant data, or the participant_ID needs to be specified
Examples
data <- combine_eyes(HCL)
saccade_VTI(data, participant_ID = "pNum")
#> pNum trial sac_n start end duration origin_x origin_y terminal_x
#> 1 118 1 1 747 790 43 924.8913 502.8802 572.8710
#> 2 118 1 2 1183 1216 33 550.2522 797.0665 904.1434
#> 3 118 1 3 2193 2243 50 1049.3491 235.9011 1507.8226
#> 4 118 1 4 2690 2750 60 1517.8485 787.2293 972.7982
#> 5 118 1 5 3676 3733 57 947.6657 123.4475 1472.9220
#> 6 118 1 6 4223 4279 56 1517.9491 759.8224 973.0053
#> 7 118 1 7 5343 5383 40 928.6512 492.2177 551.4663
#> 8 118 1 8 6792 6826 34 524.8298 829.4756 916.6670
#> 9 118 1 9 7106 7129 23 1008.0858 598.3720 1031.5074
#> 10 118 1 10 7602 7639 37 890.4656 644.2127 524.1420
#> 11 118 1 11 9295 9335 40 573.7701 847.7756 925.2699
#> 12 118 1 12 10435 10489 54 929.5371 135.1185 618.2629
#> 13 118 1 13 10705 10738 33 590.4193 758.2291 945.4900
#> 14 118 1 14 12138 12192 54 977.1132 436.3669 1473.5748
#> 15 118 1 15 12972 13025 53 1538.2589 820.1288 980.1268
#> 16 118 2 1 366 399 33 1009.5214 634.7551 1433.6206
#> 17 118 2 2 1146 1196 50 1488.0968 803.8687 1011.9555
#> 18 118 2 3 1793 1819 26 940.0593 177.6297 931.9980
#> 19 118 2 4 1989 2029 40 899.9465 504.8037 502.1575
#> 20 118 2 5 2626 2679 53 503.8431 787.9458 927.8132
#> 21 118 2 6 3106 3129 23 951.3465 175.7282 971.6648
#> 22 118 2 7 5142 5189 47 990.5532 289.0873 1440.6756
#> 23 118 2 8 5339 5395 56 1439.0196 846.2477 520.0998
#> 24 118 2 9 6235 6285 50 891.8324 167.0562 475.0865
#> 25 118 2 10 6752 6789 37 519.1636 786.9284 939.9464
#> 26 118 2 11 7209 7255 46 989.1180 467.5686 1513.2444
#> 27 118 2 12 7635 7662 27 1513.4448 779.3846 1131.6693
#> 28 118 3 1 933 983 50 1002.7010 194.4611 1485.5097
#> 29 118 3 2 1200 1260 60 1476.1744 841.7218 499.3671
#> 30 118 3 3 1826 1866 40 504.8058 792.4104 896.1292
#> 31 118 3 4 2993 3039 46 996.6983 498.0212 1529.1658
#> 32 118 3 5 3553 3586 33 1453.7949 842.5720 1005.8556
#> 33 118 4 1 160 196 36 981.6367 811.0610 1404.6870
#> 34 118 4 2 540 583 43 1488.3788 767.7919 1037.8731
#> 35 118 4 3 1066 1120 54 932.6748 180.0326 492.1770
#> 36 118 4 4 2389 2443 54 1472.4171 833.8392 637.4518
#> 37 118 4 5 3353 3399 46 529.1758 794.9559 975.5111
#> 38 118 4 6 4156 4189 33 980.6287 176.0979 1218.9348
#> 39 118 4 7 4196 4216 20 1260.4098 660.6613 1388.2071
#> 40 118 4 8 5459 5506 47 529.8645 768.2352 845.4405
#> 41 118 4 9 6166 6216 50 988.4912 480.0328 1513.9437
#> 42 118 4 10 8009 8072 63 1482.7134 866.4826 505.3686
#> 43 118 4 11 8609 8669 60 595.8946 909.1639 1486.6987
#> 44 118 4 12 8915 8969 54 1493.1766 844.0545 946.8369
#> 45 118 5 1 169 193 24 920.7457 793.6681 665.0876
#> 46 118 5 2 436 469 33 647.7492 768.7432 907.6719
#> 47 118 5 3 766 786 20 907.0568 491.8643 820.8612
#> 48 118 5 4 1059 1113 54 600.8392 824.8404 1462.8866
#> 49 118 5 5 1666 1703 37 1495.7123 778.3008 1060.7272
#> 50 118 5 6 2606 2652 46 964.1227 348.4754 1476.4087
#> 51 118 5 7 2996 3036 40 1529.3674 791.3107 1017.8775
#> 52 118 5 8 3682 3739 57 947.3045 301.1887 1499.1632
#> 53 118 5 9 3926 3979 53 1489.7973 768.8057 957.5302
#> 54 118 6 1 323 343 20 771.3237 683.6370 950.7294
#> 55 118 6 2 577 630 53 964.7887 466.5898 1466.3880
#> 56 118 6 3 1160 1216 56 1447.6491 814.8381 544.1528
#> 57 118 6 4 1526 1580 54 549.6498 756.5507 929.6189
#> 58 118 6 5 2823 2843 20 949.0222 189.3002 933.8608
#> 59 118 6 6 3763 3819 56 1453.7815 824.7820 533.1560
#> 60 118 6 7 4286 4323 37 498.8213 790.8234 925.9516
#> 61 119 1 1 419 439 20 937.4859 596.6131 959.2361
#> 62 119 1 2 963 1009 46 926.6087 448.9321 408.7369
#> 63 119 1 3 1386 1419 33 445.2828 730.4440 774.1377
#> 64 119 1 4 1566 1586 20 821.7980 493.3183 961.6049
#> 65 119 1 5 1859 1886 27 987.8758 332.9815 982.6170
#> 66 119 1 6 2066 2102 36 1008.7884 584.3139 1449.6108
#> 67 119 1 7 3022 3089 67 1475.4953 753.0909 454.0886
#> 68 119 1 8 3292 3326 34 473.3284 717.6178 948.4116
#> 69 119 1 9 4159 4205 46 937.9460 474.0402 483.8080
#> 70 119 1 10 4655 4715 60 505.6226 779.1145 1494.9923
#> 71 119 1 11 5005 5059 54 1433.3890 760.0195 592.4676
#> 72 119 1 12 7301 7371 70 531.4111 724.3928 1471.0353
#> 73 119 1 13 7885 7941 56 1557.4926 706.1470 1031.2273
#> 74 119 1 14 8448 8488 40 940.5212 332.6466 428.2784
#> 75 119 1 15 8848 8901 53 329.9313 650.1681 961.6728
#> 76 119 1 16 9111 9148 37 915.4118 334.5176 506.0964
#> 77 119 1 17 9608 9638 30 491.3408 780.1579 878.9651
#> 78 119 1 18 9984 10024 40 913.6017 468.3063 431.8043
#> 79 119 2 1 160 196 36 930.1504 786.8685 506.3560
#> 80 119 2 2 563 626 63 507.0262 754.6377 1422.9613
#> 81 119 2 3 1086 1123 37 1536.6883 737.5674 1171.5084
#> 82 119 2 4 2969 2999 30 958.4742 287.2842 936.6324
#> 83 119 2 5 3216 3249 33 904.4740 653.2866 534.9389
#> 84 119 2 6 3563 3602 39 529.6488 744.3024 943.8313
#> 85 119 2 7 4002 4026 24 935.2114 349.1000 813.9743
#> 86 119 2 8 4216 4256 40 741.5883 472.8151 527.5179
#> 87 119 2 9 4462 4522 60 565.8551 782.8804 1449.5204
#> 88 119 3 1 187 220 33 929.6976 731.8546 491.3072
#> 89 119 3 2 667 727 60 499.3447 755.1829 1465.4223
#> 90 119 3 3 1167 1197 30 1388.1631 659.8787 1009.4100
#> 91 119 3 4 2226 2280 54 1083.8245 440.7186 1366.5362
#> 92 119 3 5 3113 3180 67 1499.9854 787.7492 475.7855
#> 93 119 3 6 3929 3993 64 448.9802 745.1622 1460.1439
#> 94 119 3 7 4989 5069 80 1359.4973 693.7878 484.6122
#> 95 119 3 8 5093 5119 26 446.2522 690.6419 394.5154
#> 96 119 3 9 5692 5742 50 451.1674 677.6303 1005.6018
#> 97 119 3 10 7135 7162 27 933.4311 313.1571 735.9905
#> 98 119 3 11 7365 7405 40 858.5582 358.8731 506.7146
#> 99 119 4 1 237 270 33 926.5049 725.0489 514.1258
#> 100 119 4 2 1390 1440 50 553.2898 758.5523 1410.9398
#> 101 119 4 3 1853 1896 43 1400.3527 761.2807 959.3316
#> 102 119 4 4 2993 3026 33 410.2407 759.6056 834.9296
#> 103 119 4 5 3256 3296 40 878.8572 486.6256 511.0056
#> 104 119 4 6 4143 4199 56 545.5005 791.4970 1429.2845
#> 105 119 4 7 5416 5479 63 1449.6049 722.3000 503.8289
#> 106 119 4 8 6066 6119 53 538.4092 777.9468 1352.3635
#> 107 119 4 9 6625 6682 57 1457.5757 735.3299 509.4560
#> 108 119 4 10 7355 7405 50 455.0061 766.4567 1029.1588
#> 109 119 4 11 7749 7769 20 962.0985 371.5052 975.0627
#> 110 119 4 12 8605 8625 20 961.2967 482.5752 946.2679
#> 111 119 5 1 214 250 36 929.7282 740.4175 495.4903
#> 112 119 5 2 1100 1160 60 562.2012 777.7919 1469.1228
#> 113 119 5 3 2193 2227 34 1623.7868 783.7612 1626.5978
#> 114 119 5 4 2397 2450 53 1624.6249 782.5055 1623.9142
#> 115 119 5 5 2470 2523 53 1626.5158 776.7604 1624.3390
#> 116 119 5 6 2720 2796 76 1575.6467 801.0315 580.4435
#> 117 119 5 7 2890 2916 26 434.0244 734.8002 448.7737
#> 118 119 5 8 3386 3453 67 487.2023 770.7846 1445.4084
#> 119 119 5 9 4503 4569 66 1305.5712 789.1685 518.6549
#> 120 119 5 10 5519 5596 77 559.5449 750.5246 1466.2904
#> 121 119 5 11 6606 6679 73 1538.5927 769.7452 531.8304
#> 122 119 5 12 7395 7429 34 561.1405 727.3658 929.0725
#> 123 119 5 13 8215 8235 20 959.0783 363.6570 1002.1730
#> 124 119 5 14 9009 9055 46 966.1764 181.1402 490.9862
#> 125 119 5 15 9565 9592 27 514.3670 682.0681 863.4544
#> 126 119 5 16 10575 10615 40 863.9232 536.9596 477.5950
#> 127 119 5 17 11755 11798 43 431.9173 762.7475 895.9795
#> 128 119 5 18 12374 12401 27 928.1233 339.4489 708.4844
#> 129 119 6 1 590 626 36 893.5909 421.1214 445.4796
#> 130 119 6 2 3053 3106 53 456.9632 729.2448 1304.1947
#> 131 119 6 3 4232 4262 30 1372.3698 735.7928 1024.0037
#> 132 119 6 4 6778 6818 40 1008.7615 446.5270 1449.8786
#> 133 119 6 5 6832 6852 20 1556.7990 621.5306 1709.8604
#> 134 119 6 6 6938 6965 27 1635.7978 766.4061 1625.8207
#> 135 119 6 7 7558 7588 30 1524.0060 686.7242 1142.0919
#> 136 119 6 8 9365 9415 50 1000.8005 293.0768 1397.7841
#> 137 119 6 9 10281 10344 63 1419.5092 783.3005 522.3444
#> 138 119 6 10 11021 11084 63 495.6926 799.3568 1323.7945
#> 139 119 6 11 11581 11644 63 1488.0635 757.2932 501.3444
#> 140 119 6 12 11994 12021 27 469.7133 707.4822 724.9794
#> 141 119 6 13 12034 12064 30 775.1127 552.5540 998.6819
#> terminal_y mean_velocity peak_velocity
#> 1 808.04272 272.0719 395.9481
#> 2 572.85360 316.7302 453.9688
#> 3 815.95874 386.9464 625.7100
#> 4 362.66265 302.4458 469.8918
#> 5 773.01410 374.0754 677.1370
#> 6 344.40579 314.8859 528.6695
#> 7 811.74409 305.6079 450.8875
#> 8 655.82093 318.3651 433.8923
#> 9 628.36295 460.6067 813.2725
#> 10 812.66139 276.7305 385.7442
#> 11 507.11854 309.8654 482.5005
#> 12 687.51196 300.0947 551.1295
#> 13 500.89552 335.7184 483.5760
#> 14 820.45975 294.8974 433.1550
#> 15 421.15891 332.3372 556.0732
#> 16 800.74046 338.0242 533.7107
#> 17 458.93763 319.0884 498.4291
#> 18 480.38578 287.3068 412.3196
#> 19 806.82680 318.1431 479.9948
#> 20 253.97420 320.7305 509.6067
#> 21 465.01123 298.0109 535.9660
#> 22 817.47684 376.8634 686.3874
#> 23 853.99013 410.4180 646.4818
#> 24 749.27484 363.0964 583.9827
#> 25 510.38435 337.2354 479.5637
#> 26 806.21239 334.1602 496.3421
#> 27 548.60528 403.9584 626.7593
#> 28 811.01401 392.2602 704.5965
#> 29 866.36876 401.7532 668.6773
#> 30 493.93989 305.0853 498.3301
#> 31 836.79907 348.0278 522.8867
#> 32 514.52377 491.6945 940.9658
#> 33 807.59300 287.5080 542.0505
#> 34 407.89316 340.8041 549.9472
#> 35 849.41309 372.3638 682.6705
#> 36 817.06385 392.9800 562.8329
#> 37 465.23668 302.3889 451.5560
#> 38 623.21881 377.2465 638.9682
#> 39 770.51439 226.3191 292.3708
#> 40 270.38513 326.6025 500.9741
#> 41 882.37852 333.3510 522.9800
#> 42 889.74747 390.4924 594.2668
#> 43 885.09883 368.3861 500.0104
#> 44 416.29324 325.9488 520.0476
#> 45 815.40923 266.0412 345.0138
#> 46 460.19167 309.8647 547.6748
#> 47 647.49100 241.6338 265.9115
#> 48 881.41554 400.8789 551.9868
#> 49 485.14086 362.7474 579.3783
#> 50 741.68104 347.4845 582.0994
#> 51 393.74462 402.2922 560.8864
#> 52 815.85457 333.7099 678.1116
#> 53 181.31785 376.2447 501.5131
#> 54 494.17258 323.9945 437.9123
#> 55 819.45070 296.8699 452.1997
#> 56 813.94843 399.3451 566.2307
#> 57 311.93170 283.0760 419.7385
#> 58 411.30941 272.1999 352.9484
#> 59 830.62670 407.6950 590.8397
#> 60 578.07589 319.3377 476.5302
#> 61 385.89048 260.9885 344.0042
#> 62 736.63587 324.3933 434.2459
#> 63 522.73404 296.6378 410.5417
#> 64 332.33636 256.1753 426.8395
#> 65 557.67814 223.7085 328.0712
#> 66 731.04919 320.0954 429.2777
#> 67 723.96569 383.2730 491.2732
#> 68 530.82351 382.9479 588.4055
#> 69 726.20847 288.5307 374.7079
#> 70 785.48033 415.1605 528.5762
#> 71 525.59939 473.8119 743.0872
#> 72 765.71968 341.5394 457.9189
#> 73 277.11461 313.5698 436.8604
#> 74 636.55022 375.8033 499.0219
#> 75 303.23776 341.9668 622.1347
#> 76 685.16739 370.5781 452.2549
#> 77 529.08806 391.3190 552.3656
#> 78 724.13881 351.4721 461.0372
#> 79 762.26611 297.5999 426.9278
#> 80 771.04969 358.1187 445.2741
#> 81 521.52158 286.5191 397.1683
#> 82 584.14036 274.4019 407.1357
#> 83 773.08285 292.5576 499.0374
#> 84 234.80312 402.2470 593.6050
#> 85 447.56302 185.0116 226.6963
#> 86 786.49801 255.1360 324.2736
#> 87 750.54686 375.3919 507.6846
#> 88 758.72776 333.9467 430.0696
#> 89 706.53287 407.0248 550.9162
#> 90 416.62787 388.9843 489.7593
#> 91 692.01373 205.8450 293.0141
#> 92 749.79324 386.8453 502.5075
#> 93 739.73714 407.6405 537.7067
#> 94 624.15468 373.7313 1115.0761
#> 95 683.99888 463.8779 1100.6011
#> 96 446.39116 318.2834 454.2633
#> 97 401.45857 215.2665 328.7371
#> 98 760.78629 334.8229 447.9468
#> 99 746.55221 309.2715 424.1522
#> 100 760.38561 434.8770 571.5508
#> 101 585.73589 319.6162 648.4422
#> 102 477.50542 376.0354 486.7126
#> 103 735.42724 282.0661 427.6063
#> 104 725.27627 391.7386 537.5821
#> 105 750.76249 372.1765 467.8713
#> 106 565.98955 442.0678 787.8743
#> 107 768.40618 426.3005 527.1309
#> 108 449.86136 329.3471 437.1229
#> 109 87.88856 339.1982 511.9953
#> 110 279.86526 303.9638 545.1370
#> 111 735.73645 299.1483 411.6772
#> 112 745.15599 383.1175 476.7420
#> 113 781.91854 211.2320 237.4411
#> 114 780.19254 188.1914 220.4659
#> 115 796.44055 193.7776 304.9300
#> 116 621.57478 385.5504 1039.0288
#> 117 794.40469 535.5625 1214.4254
#> 118 731.99651 363.0420 500.4153
#> 119 771.84247 298.7340 383.5385
#> 120 769.89695 307.3374 426.0481
#> 121 588.35225 431.3113 633.0452
#> 122 426.38805 375.2556 498.2850
#> 123 150.70444 273.8312 374.0092
#> 124 573.53000 340.5078 509.5577
#> 125 402.05052 412.5502 531.8462
#> 126 694.73338 274.7713 385.2882
#> 127 340.18672 366.3897 592.3796
#> 128 422.20742 322.6645 453.3187
#> 129 719.21666 375.5822 457.9678
#> 130 747.38857 415.7951 491.1134
#> 131 514.08373 369.4279 456.7224
#> 132 602.33134 292.5606 343.2613
#> 133 546.70075 508.1420 1343.3812
#> 134 792.84668 230.2802 314.2327
#> 135 403.44032 400.7679 495.4042
#> 136 657.71066 284.4779 403.2665
#> 137 756.58455 354.0906 461.9427
#> 138 779.42050 329.7486 492.7481
#> 139 729.33815 392.8480 497.1965
#> 140 584.69650 264.4616 394.0575
#> 141 409.76345 246.3566 395.1653