File: SR_Research_Implementation_Notes.rst

package info (click to toggle)
psychopy 2023.2.4%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 124,456 kB
  • sloc: python: 126,213; javascript: 11,982; makefile: 152; sh: 120; xml: 9
file content (702 lines) | stat: -rw-r--r-- 18,629 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
###########
SR Research
###########

**Platforms:** 

* Windows 7 / 10
* Linux
* macOS

**Required Python Version:** 

* Python 3.6 +
        
**Supported Models:**

* EyeLink 1000
* EyeLink 1000 Plus

Additional Software Requirements
#################################

The SR Research EyeLink implementation of the ioHub common eye tracker 
interface uses the pylink package written by SR Research. If using a 
|PsychoPy|3 standalone installation, this package should already be included.

If you are manually installing PsychPy3, please install
the appropriate version of pylink. Downloads are available to SR Research
customers from their support website.

On macOS and Linux, the EyeLink Developers Kit must also be installed for
pylink to work. Please visit SR Research support site for information about
how to install the EyeLink developers kit on macOS or Linux. 

EyeTracker Class
################

.. autoclass:: psychopy.iohub.devices.eyetracker.hw.sr_research.eyelink.EyeTracker()
    :members: runSetupProcedure, setRecordingState, enableEventReporting, isRecordingEnabled, getLastSample, getLastGazePosition, getPosition, trackerTime, trackerSec, getConfiguration, getEvents, clearEvents, sendCommand, sendMessage
                
Supported Event Types
#####################

The EyeLink implementation of the ioHub eye tracker interface supports 
monoculor or binocular eye samples as well as fixation, saccade, and blink 
events. 

Eye Samples
~~~~~~~~~~~

.. autoclass:: psychopy.iohub.devices.eyetracker.MonocularEyeSampleEvent

    .. attribute:: time

        time of event, in sec.msec format, using psychopy timebase.

    .. attribute:: eye

        Eye that generated the sample. Either EyeTrackerConstants.LEFT_EYE
        or EyeTrackerConstants.RIGHT_EYE.
        
    .. attribute:: gaze_x

        The horizontal position of the eye on the computer screen,
        in Display Coordinate Type Units. Calibration must be done prior
        to reading (meaningful) gaze data.
        
    .. attribute:: gaze_y

        The vertical position of the eye on the computer screen,
        in Display Coordinate Type Units. Calibration must be done prior
        to reading (meaningful) gaze data.

    .. attribute:: angle_x

        Horizontal eye angle.
        
    .. attribute:: angle_y

        Vertical eye angle.

    .. attribute:: raw_x

        The uncalibrated x position of the eye in a device specific
        coordinate space.
        
    .. attribute:: raw_y

        The uncalibrated y position of the eye in a device specific
        coordinate space.
                
    .. attribute:: pupil_measure_1

        Pupil size. Use pupil_measure1_type to determine what type of pupil
        size data was being saved by the tracker.

    .. attribute:: pupil_measure1_type
    
        Coordinate space type being used for left_pupil_measure_1.

    .. attribute:: ppd_x

        Horizontal pixels per visual degree for this eye position as 
        reported by the eye tracker.

    .. attribute:: ppd_y

        Vertical pixels per visual degree for this eye position as 
        reported by the eye tracker.


    .. attribute:: velocity_x

        Horizontal velocity of the eye at the time of the sample;
        as reported by the eye tracker.

    .. attribute:: velocity_y

        Vertical velocity of the eye at the time of the sample;
        as reported by the eye tracker.

    .. attribute:: velocity_xy

        2D Velocity of the eye at the time of the sample;
        as reported by the eye tracker.
        
    .. attribute:: status

        Indicates if eye sample contains 'valid' data. 
        0 = Eye sample is OK.
        2 = Eye sample is invalid.

.. autoclass:: psychopy.iohub.devices.eyetracker.BinocularEyeSampleEvent

    .. attribute:: time

        time of event, in sec.msec format, using psychopy timebase.
        
    .. attribute:: left_gaze_x

        The horizontal position of the left eye on the computer screen,
        in Display Coordinate Type Units. Calibration must be done prior
        to reading (meaningful) gaze data.
        
    .. attribute:: left_gaze_y

        The vertical position of the left eye on the computer screen,
        in Display Coordinate Type Units. Calibration must be done prior
        to reading (meaningful) gaze data.
        
    .. attribute:: left_angle_x

         The horizontal angle of left eye the relative to the head.
        
    .. attribute:: left_angle_y

        The vertical angle of left eye the relative to the head.

    .. attribute:: left_raw_x

        The uncalibrated x position of the left eye in a device specific
        coordinate space.
        
    .. attribute:: left_raw_y

        The uncalibrated y position of the left eye in a device specific
        coordinate space.

    .. attribute:: left_pupil_measure_1

        Left eye pupil diameter.

    .. attribute:: left_pupil_measure1_type
    
        Coordinate space type being used for left_pupil_measure_1.

    .. attribute:: left_ppd_x

        Pixels per degree for left eye horizontal position as reported by 
        the eye tracker. Display distance must be correctly set for this to
        be accurate at all.

    .. attribute:: left_ppd_y

        Pixels per degree for left eye vertical position as reported by 
        the eye tracker. Display distance must be correctly set for this to
        be accurate at all.

    .. attribute:: left_velocity_x

        Horizontal velocity of the left eye at the time of the sample;
        as reported by the eye tracker.

    .. attribute:: left_velocity_y

        Vertical velocity of the left eye at the time of the sample;
        as reported by the eye tracker.

    .. attribute:: left_velocity_xy

        2D Velocity of the left eye at the time of the sample;
        as reported by the eye tracker.
        
    .. attribute:: right_gaze_x

        The horizontal position of the right eye on the computer screen,
        in Display Coordinate Type Units. Calibration must be done prior
        to reading (meaningful) gaze data.

    .. attribute:: right_gaze_y

        The vertical position of the right eye on the computer screen,
        in Display Coordinate Type Units. Calibration must be done prior
        to reading (meaningful) gaze data.

    .. attribute:: right_angle_x

        The horizontal angle of right eye the relative to the head.
        
    .. attribute:: right_angle_y

        The vertical angle of right eye the relative to the head.

    .. attribute:: right_raw_x

        The uncalibrated x position of the right eye in a device specific
        coordinate space.
        
    .. attribute:: right_raw_y

        The uncalibrated y position of the right eye in a device specific
        coordinate space.
        
    .. attribute:: right_pupil_measure_1

        Right eye pupil diameter.

    .. attribute:: right_pupil_measure1_type
    
        Coordinate space type being used for right_pupil_measure1_type.
        
    .. attribute:: right_ppd_x

        Pixels per degree for right eye horizontal position as reported by 
        the eye tracker. Display distance must be correctly set for this to
        be accurate at all.

    .. attribute:: right_ppd_y

        Pixels per degree for right eye vertical position as reported by 
        the eye tracker. Display distance must be correctly set for this to
        be accurate at all.

    .. attribute:: right_velocity_x

        Horizontal velocity of the right eye at the time of the sample;
        as reported by the eye tracker.

    .. attribute:: right_velocity_y

        Vertical velocity of the right eye at the time of the sample;
        as reported by the eye tracker.

    .. attribute:: right_velocity_xy

        2D Velocity of the right eye at the time of the sample;
        as reported by the eye tracker.
        
    .. attribute:: status

        Indicates if eye sample contains 'valid' data for left and right eyes. 
        0 = Eye sample is OK.
        2 = Right eye data is likely invalid.
        20 = Left eye data is likely invalid.
        22 = Eye sample is likely invalid.

Fixation Events
~~~~~~~~~~~~~~~

Successful eye tracker calibration must be performed prior to 
reading (meaningful) fixation event data.

.. autoclass:: psychopy.iohub.devices.eyetracker.FixationStartEvent

    .. attribute:: time

        time of event, in sec.msec format, using psychopy timebase.

    .. attribute:: eye

        Eye that generated the event. Either EyeTrackerConstants.LEFT_EYE
        or EyeTrackerConstants.RIGHT_EYE.
        
    .. attribute:: gaze_x

        Horizontal gaze position at the start of the event,
        in Display Coordinate Type Units. 
        
    .. attribute:: gaze_y

        Vertical gaze position at the start of the event,
        in Display Coordinate Type Units. 

    .. attribute:: angle_x

        Horizontal eye angle at the start of the event.
        
    .. attribute:: angle_y

        Vertical eye angle at the start of the event.
                
    .. attribute:: pupil_measure_1

        Pupil size. Use pupil_measure1_type to determine what type of pupil
        size data was being saved by the tracker.

    .. attribute:: pupil_measure1_type
    
        EyeTrackerConstants.PUPIL_AREA

    .. attribute:: ppd_x
    
        Horizontal pixels per degree at start of event.

    .. attribute:: ppd_y

        Vertical pixels per degree at start of event.

    .. attribute:: velocity_xy

        2D eye velocity at the start of the event.

    .. attribute:: status

        Event status as reported by the eye tracker.
                  
.. autoclass:: psychopy.iohub.devices.eyetracker.FixationEndEvent

    .. attribute:: time

        time of event, in sec.msec format, using psychopy timebase.
        
    .. attribute:: eye

        Eye that generated the event. Either EyeTrackerConstants.LEFT_EYE
        or EyeTrackerConstants.RIGHT_EYE.
        
    .. attribute:: duration

        Duration of the event in sec.msec format. 

    .. attribute:: start_gaze_x

        Horizontal gaze position at the start of the event,
        in Display Coordinate Type Units. 
        
    .. attribute:: start_gaze_y

        Vertical gaze position at the start of the event,
        in Display Coordinate Type Units. 

    .. attribute:: start_angle_x

        Horizontal eye angle at the start of the event.
        
    .. attribute:: start_angle_y

        Vertical eye angle at the start of the event.
                
    .. attribute:: start_pupil_measure_1

        Pupil size at the start of the event.

    .. attribute:: start_pupil_measure1_type
    
        EyeTrackerConstants.PUPIL_AREA

    .. attribute:: start_ppd_x
    
        Horizontal pixels per degree at start of event.

    .. attribute:: start_ppd_y

        Vertical pixels per degree at start of event.

    .. attribute:: start_velocity_xy

        2D eye velocity at the start of the event.

    .. attribute:: end_gaze_x

        Horizontal gaze position at the end of the event,
        in Display Coordinate Type Units. 
        
    .. attribute:: end_gaze_y

        Vertical gaze position at the end of the event,
        in Display Coordinate Type Units. 

    .. attribute:: end_angle_x

        Horizontal eye angle at the end of the event.
        
    .. attribute:: end_angle_y

        Vertical eye angle at the end of the event.
                
    .. attribute:: end_pupil_measure_1

        Pupil size at the end of the event.

    .. attribute:: end_pupil_measure1_type
    
        EyeTrackerConstants.PUPIL_AREA

    .. attribute:: end_ppd_x
    
        Horizontal pixels per degree at end of event.

    .. attribute:: end_ppd_y

        Vertical pixels per degree at end of event.

    .. attribute:: end_velocity_xy

        2D eye velocity at the end of the event.

    .. attribute:: average_gaze_x

        Average horizontal gaze position during the event,
        in Display Coordinate Type Units. 
        
    .. attribute:: average_gaze_y

        Average vertical gaze position during the event,
        in Display Coordinate Type Units. 

    .. attribute:: average_angle_x

        Average horizontal eye angle during the event,
        
    .. attribute:: average_angle_y

        Average vertical eye angle during the event,
                
    .. attribute:: average_pupil_measure_1

        Average pupil size during the event. 

    .. attribute:: average_pupil_measure1_type
    
        EyeTrackerConstants.PUPIL_AREA

    .. attribute:: average_velocity_xy
    
        Average 2D velocity of the eye during the event.

    .. attribute:: peak_velocity_xy

        Peak 2D velocity of the eye during the event.

    .. attribute:: status

        Event status as reported by the eye tracker.


Saccade Events
~~~~~~~~~~~~~~~

Successful eye tracker calibration must be performed prior to 
reading (meaningful) saccade event data.

.. autoclass:: psychopy.iohub.devices.eyetracker.SaccadeStartEvent

    .. attribute:: time

        time of event, in sec.msec format, using psychopy timebase.

    .. attribute:: eye

        Eye that generated the event. Either EyeTrackerConstants.LEFT_EYE
        or EyeTrackerConstants.RIGHT_EYE.
        
    .. attribute:: gaze_x

        Horizontal gaze position at the start of the event,
        in Display Coordinate Type Units. 
        
    .. attribute:: gaze_y

        Vertical gaze position at the start of the event,
        in Display Coordinate Type Units. 

    .. attribute:: angle_x

        Horizontal eye angle at the start of the event.
        
    .. attribute:: angle_y

        Vertical eye angle at the start of the event.
                
    .. attribute:: pupil_measure_1

        Pupil size. Use pupil_measure1_type to determine what type of pupil
        size data was being saved by the tracker.

    .. attribute:: pupil_measure1_type
    
        EyeTrackerConstants.PUPIL_AREA

    .. attribute:: ppd_x
    
        Horizontal pixels per degree at start of event.

    .. attribute:: ppd_y

        Vertical pixels per degree at start of event.

    .. attribute:: velocity_xy

        2D eye velocity at the start of the event.

    .. attribute:: status

        Event status as reported by the eye tracker.

                  
.. autoclass:: psychopy.iohub.devices.eyetracker.SaccadeEndEvent

    .. attribute:: time

        time of event, in sec.msec format, using psychopy timebase.
        
    .. attribute:: eye

        Eye that generated the event. Either EyeTrackerConstants.LEFT_EYE
        or EyeTrackerConstants.RIGHT_EYE.
        
    .. attribute:: duration

        Duration of the event in sec.msec format. 

    .. attribute:: start_gaze_x

        Horizontal gaze position at the start of the event,
        in Display Coordinate Type Units. 
        
    .. attribute:: start_gaze_y

        Vertical gaze position at the start of the event,
        in Display Coordinate Type Units. 

    .. attribute:: start_angle_x

        Horizontal eye angle at the start of the event.
        
    .. attribute:: start_angle_y

        Vertical eye angle at the start of the event.
                
    .. attribute:: start_pupil_measure_1

        Pupil size at the start of the event.

    .. attribute:: start_pupil_measure1_type
    
        EyeTrackerConstants.PUPIL_AREA

    .. attribute:: start_ppd_x
        
    Horizontal pixels per degree at start of event.

    .. attribute:: start_ppd_y

        Vertical pixels per degree at start of event.

    .. attribute:: start_velocity_xy

        2D eye velocity at the start of the event.

    .. attribute:: end_gaze_x

        Horizontal gaze position at the end of the event,
        in Display Coordinate Type Units. 
        
    .. attribute:: end_gaze_y

        Vertical gaze position at the end of the event,
        in Display Coordinate Type Units. 

    .. attribute:: end_angle_x

        Horizontal eye angle at the end of the event.
        
    .. attribute:: end_angle_y

        Vertical eye angle at the end of the event.
                
    .. attribute:: end_pupil_measure_1

        Pupil size at the end of the event.

    .. attribute:: end_pupil_measure1_type
    
        EyeTrackerConstants.PUPIL_AREA

    .. attribute:: end_ppd_x
        
        Horizontal pixels per degree at end of event.

    .. attribute:: end_ppd_y

        Vertical pixels per degree at end of event.

    .. attribute:: end_velocity_xy

        2D eye velocity at the end of the event.

    .. attribute:: average_gaze_x

        Average horizontal gaze position during the event,
        in Display Coordinate Type Units. 
        
    .. attribute:: average_gaze_y

        Average vertical gaze position during the event,
        in Display Coordinate Type Units. 

    .. attribute:: average_angle_x

        Average horizontal eye angle during the event,
        
    .. attribute:: average_angle_y

        Average vertical eye angle during the event,
                
    .. attribute:: average_pupil_measure_1

        Average pupil size during the event. 

    .. attribute:: average_pupil_measure1_type
    
        EyeTrackerConstants.PUPIL_AREA

    .. attribute:: average_velocity_xy
        
        Average 2D velocity of the eye during the event.

    .. attribute:: peak_velocity_xy

        Peak 2D velocity of the eye during the event.

    .. attribute:: status

        Event status as reported by the eye tracker.

Blink Events
~~~~~~~~~~~~

.. autoclass:: psychopy.iohub.devices.eyetracker.BlinkStartEvent

    .. attribute:: time

        time of event, in sec.msec format, using psychopy timebase.

    .. attribute:: eye

        Eye that generated the event. Either EyeTrackerConstants.LEFT_EYE
        or EyeTrackerConstants.RIGHT_EYE.
        
    .. attribute:: status

        Event status as reported by the eye tracker.
        
.. autoclass:: psychopy.iohub.devices.eyetracker.BlinkEndEvent

    .. attribute:: time

        time of event, in sec.msec format, using psychopy timebase.

    .. attribute:: eye

        Eye that generated the event. Either EyeTrackerConstants.LEFT_EYE
        or EyeTrackerConstants.RIGHT_EYE.

    .. attribute:: duration

        Blink duration, in sec.msec format.
        
    .. attribute:: status

        Event status as reported by the eye tracker.     


Default Device Settings
#######################

.. literalinclude:: ../default_yaml_configs/default_eyelink_eyetracker.yaml
    :language: yaml
    
    
**Last Updated:** January, 2021