3

I am designing an experiment using psychopy. I hope to get eye movement data using eye-tribe eye-tracker too.

I saw Sol's code for eyetribe. Is there any tutorial or instruction on how to use pyTribe.py so I can track eye movement using eyetribe within psychopy?

Thanks!

https://github.com/psychopy/psychopy/blob/7a6ffe699341338d1054f930b17e3027f11bc96d/psychopy/iohub/devices/eyetracker/hw/theeyetribe/pyTribe.py

Jibo

Donald Duck
  • 8,409
  • 22
  • 75
  • 99
  • +1 for mentioning PsychoPy. My guess is you're out of luck here: the [documentation](http://www.psychopy.org/about/overview.html) only mentions "Input from keyboard, mouse, microphone or button boxes." – Drux Aug 04 '14 at 14:42
  • Take look at eyetracker.py in the same folder. It seems there is function for returning 2d coordinates – sviter Aug 04 '14 at 21:00
  • Hi, sviter, I find the eyetracker.py at the this link. https://github.com/psychopy/psychopy/blob/dae85517020cb1da2e5bebc9d804f0fa9465a71c/psychopy/app/builder/components/eyetracker.py , but I am still not very clear on how to build an eye-tracking project using psychopy. More advices please. Thanks! – user2535361 Aug 05 '14 at 00:37
  • Sorry, I haven't any experience with eye-tracking :( But [this file](https://github.com/psychopy/psychopy/blob/7a6ffe699341338d1054f930b17e3027f11bc96d/psychopy/iohub/devices/eyetracker/hw/theeyetribe/eyetracker.py) I am talking about. And in string #284 there are `getLastGazePosition` function that Returns the latest 2D eye gaze position retrieved from the TheEyeTribe device. Hope it helpful – sviter Aug 05 '14 at 09:50
  • @user2535361 Also take a look at [this demo](https://github.com/psychopy/psychopy/blob/master/psychopy/demos/coder/iohub/eyetracking/eyetribeexample.py) – sviter Aug 05 '14 at 09:59

2 Answers2

4

You don't need to use pyTribe as PsychoPy has a generic eye tracker interface (ioHub, written by Sol) which should include support for EyeTribe. You use the same code as for any eye tracker: the only thing that differs is an EyeTribe-specific configuration text file.

So you can start with the demo code as indicated by @sviter in the comment above. Otherwise, you can also integrate eye tracking within PsychoPy's Builder interface by just using snippets of code as required.

A more responsive answer will need more detail than that you want to "track eye movement data within PsychoPy". What exactly do you want to do?

Michael MacAskill
  • 2,411
  • 1
  • 16
  • 28
2

Likely this answer is too late for you now Jibo, sorry. As Michael's reply suggests, to use theeyetribe system in psychopy, you can use psychopy.iohub to access the eye tracker device.

As an example, the psychopy/demos/coder/iohub/eyetracking/gccursor/run.py demo can be used with theeyetribe by changing the iohub_config.yaml file in the psychopy/demos/coder/iohub/eyetracking/gccursor folder:

  1. Remove the configuration for the default eye tracker hardware the demo is using.

    - eyetracker.hw.XXXXXXX:
        [remove all settings 
         for the currently specified
         eye tracker hardware]
    
  2. Add the configuration information needed for theeyetribe system:

    - eyetracker.hw.theeyetribe.EyeTracker:
        enable: True
        name: tracker
        monitor_event_types: [BinocularEyeSampleEvent, ]
    

Note that the current implementation of the theeyetribe ioHub eye tracker interface does not currently support running calibration using the iohub api. To calibrate theeyetribe use the vendor provided calibration software, then start your psychopy experiment and access the streaming eye position data via ioHub.

Sol Simpson
  • 101
  • 3